Section 4.3
Permutations and Combinations
Urn models
We are given set of n objects in an urn (dont ask
why its called an urn - probably due to some statistician
years ago) .
We are going to pick (select) r objects from the urn in
sequence. After we choos
Module #19 Probability
University of Florida
Dept. of Computer & Information Science & Engineering
COT 3100
Applications of Discrete Structures
Dr. Michael P. Frank
Slides for a Course Based on the Text
Discrete Mathematics & Its Applications
(5th Edition
The Department of Computer and Information Science
The School of Science
Indiana University-Purdue University at Indianapolis
723 W. Michigan Street SL 280
Indianapolis, IN 46202-5132
Phone: (317) 274-9727 FAX: (317) 274-9742
Hours: 8:00AM - 5:00PM, Monda
Section 5.1
Recurrence Relations
Definition: Given a sequence cfw_ag(0) , ag(1) , ag(2) ,., a
recurrence relation (sometimes called a difference
equation) is an equation which defines the nth term in the
sequence as a function of the previous terms:
ag( n
1. Use the Euclidean algorithm to find
a) gcd(123, 277).
b) gcd(1529, 14039).
c) gcd(1529, 14038)
d ) gcd(11111, 111111).
2. What are the first 5 numbers X1, X2, X3, X4, X 5 generated using the random
number generator xn+1 =(5x n + 3) mod 8 with seed x 0
1. Find out AB and BA for the following
A=
[ ]
2 5 7
3 4 6
1 6 2
B=
[
B=
[ ]
1 2 1
4 0 3
3 5 7
]
2. Let
A=
[ ]
1 1 0
0 1 0
1 0 1
0 1 1
1 0 1
0 1 0
Find a) AB b) AB
3. Find a matrix A such that
[ ] [ ]
2 3 A= 3 0
1 4
1 2
4. Prove or disprove that if a|bc,
1. Suppose that SmartphoneA has 256MBRAMand 32GB ROM, and the resolution of its
camera is 8 MP; Smartphone B has 288 MB RAM and 64 GB ROM, and the resolution
of its camera is 4 MP; and Smartphone C has 128 MB RAM and 32 GB ROM, and the
resolution of its c
1.A customer survey was done on 300 customers. It shows that 230 customers
drink coffee and 80 drink tea. 29 customers drink neither coffee nor tea. How
many customers drink both coffee and tea?
2. How many octal bitstrings of length 10 that either starts
1. Let C(x) be the statement x has a cat, let D(x) be the statement x has a dog,
and let F(x) be the statement x
has a ferret. Express each of these statements in terms of C(x), D(x), F(x),
quantifiers, and logical connectives.
Let the domain consist of a
1. What is the cardinality of each of the following sets?
1)cfw_1, 2, 3, 4,9
2)cfw_1, 3, 5, 7, 9, ,99
3) cfw_N, R
4) cfw_x Z | x is odd and |x| < 10
5) cfw_ ,
6) cfw_x R | x2 < 10
7) cfw_ , , cfw_
8) cfw_ , , cfw_, cfw_
2. Determine if the followin
Mark your calendar
Exam #2: 3/28
Exam #3: 4/27
Lecture 10
Matrix
Divisibility
Section 2.6, 4.1-4.2
Matrices
Section 2.6
Matrix
Definition: A matrix is a rectangular array of
numbers. A matrix with m rows and n columns
is called an m n matrix.
The plural
CS340 Discrete
Computational Structures
Instructor: Yuni Xia
[email protected]
Slides courtesy of Hauskrecht
Propositional Logic
Examples (cont.):
How are you?
x+5=3
2 is a prime number.
There are other life forms on other planets in
the universe.
Prop
Lecture 18
Probability, Bayes Theorem
7.2-7.3
Last Class: Conditional probability
Definition: Let E and F be two events such that
P(F) > 0. The conditional probability of E
given F
P(E|F) = P(E and F) / P(F)
Example:
P(lung cancer)
P(lung cancer|chest pa
Lecture 17
Probability, Bayes Theorem
7.2-7.3
Conditional probability
In the United States, 56% of all children get
an allowance and 41% of all children get an
allowance and do household chores. What is
the probability that a child does household
chores g
CSCI 340: Discrete Computational Structures
Problem Set 1
Instructor: Dr. Snehasis Mukhopadhyay
Due date: January 25, 2011
1. Let A, B , and C be the following statements:
A: roses are red.
B : violets are blue.
C : sugar is sweet. (sweet is equivalent to
CSCI 340: Discrete Computational Structures
Problem Set 2
Instructor: Dr. Snehasis Mukhopadhyay
Due date: February 15, 2011
1. For each of the following subsets f of IN IN, decide if f is a function or not. If f is a
function, decide which of the given or
Section 6.3
Representing Relations
Connection Matrices
Let R be a relation from
A = cfw_a1, a 2, . . . , a m
to
B = cfw_b1, b 2, . . . , b n.
Definition: An m xn connection matrix M for R is
defined by
Mij = 1 if <ai, b j> is in R,
= 0 otherwise.
_
Exampl
CSC 222
Section 5.2
Solving Recurrence Relations
If
ag( n ) = f ( ag(0) , ag(1) ,., ag( n1) )
find a closed form or an expression for ag(n).
Recall:
nth degree polynomials have n roots:
an x n + a n1 x n 1 + . + a1 x + a0 = 0
If the coefficients are rea
Section 6.5
Equivalence Relations
Now we group properties of relations together to define
new types of important relations.
_
Definition: A relation R on a set A is an equivalence
relation iff R is
reflexive
symmetric
and
transitive
_
It is easy to rec
Section 7.1
Introduction to Graphs
Undirected Graphs
A simple graph (V,E) consists of vertices, V, and
edges, E, connecting distinct elements of V.
- no arrows
- no loops
- can't have multiple edges joining vertices
_
Example:
_
A multigraph allows mult
Section 7.3
Representing Graphs and
Graph Isomorphism
We wish to be able to determine when two graphs are
identical except perhaps for the labeling of the vertices.
We derive some alternate representations which are
extensions of connection matrices we ha
Section 6.4
Closures of Relations
Definition: The closure of a relation R with respect to
property P is the relation obtained by adding the minimum
number of ordered pairs to R to obtain property P.
In terms of the digraph representation of R
To find the
Section 6.1
Relations and Their Properties
Definition: A binary relation R from a set A to a set B is
a subset R A B .
Note: there are no constraints on relations as there are on
functions.
We have a common graphical representation of relations:
Definitio
Section 7.4
Connectivity
We extent the notion of a path to undirected graphs.
An informal definition (see the text for a formal
definition):
There is a path v0, v1, v2, . . . , vn from vertex v0 to
vertex vn if there is a sequence of edges (joining the
ve
Section 4.1
The Basics of Counting
THE RULE OF SUM
If A and B are disjoint sets then | A B| =| A| +| B|
_
Example:
Suppose statement labels in a programming language must
be a single letter or a single decimal digit.
Since a label cannot be both at the sa
Section 7.2
Graph Terminology
Undirected Graphs
Definition: Two vertices u, v in V are adjacent or
neighbors if there is an edge e between u and v .
The edge e connects u and v .
The vertices u and v are endpoints of e.
_
Definition: The degree of a verte
BOOLEAN ALGEBRA AND LOGIC GATES
Boolean Algebra is an algebraic structure and a set of rules that are well
suited to describe twovalued logical systems. Many operations are similar
to the logical operations studied earlier.
Three Operations of Boolean Alg
Show All Solutions
Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples
Section 6.4-Expected Value and Variance
- Page references correspond to locations of Extra Examples icons in the textbook.
p.427, icon at Example 2 #1. You rol
Lecture 9:
Functions, Sequences
Section 2.3-2.4
Sequences
Examples:
(1) an = n2, where n = 0, 1,2,3.
What are the elements of the sequence?
(2) an = (-1) n, where n=0,1,2,3,.
Elements of the sequence?
3) an = 2 n, where n=0,1,2,3,.
Elements of the s