Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Structures By: Tony Thi By: Tony Thi Aaron Morales Aaron Morales CS 490 CS 490.

Similar presentations


Presentation on theme: "Discrete Structures By: Tony Thi By: Tony Thi Aaron Morales Aaron Morales CS 490 CS 490."— Presentation transcript:

1 Discrete Structures By: Tony Thi By: Tony Thi Aaron Morales Aaron Morales CS 490 CS 490

2 SETS: -Sets are a collection of object NOTATIONS: Î  belongs to/element of a set   does not belong to/ is not an element of a set   empty set U  universal set   subset

3 Definitions: A.) Equality of Sets: Two sets are equal if and only if they have the same elements. A = B if and only if  x [x  A  x  B]. Ex: A = { 2, 4, 6 } B = { 2, 4, 6 } B.) Subsets: For any sets A and B, A is a subset of B if and only if  x [ x  A  x  B ]. A  B Ex: A = { 1, 3} B = {1, 2, 3, 4, 5, 6} C.) Proper Subset: A  B. A is a subset of B, but A  B

4 D.) Cardinality: If a set S has n, distinct elements for some natural number n, n is the cardinality (size) of S and S is a finite set. The cardinality of a set is denoted by |S|. Ex: S = { 1, 3, 5, 7, 9} |S| = 5 E.) Power Set: the set of all subsets of a set S is called the power set of S and is denoted by 2 |S| of  (S). Ex: S = { 1, 5 }, P(S) = { {}, {1}, {5}, {1,5} }

5 F.) Empty Set: A set which has no elements is called an empty set. Ex:S = { } G.) Universal Set: a set which has all the elements in the universe of discourse.

6 SET OPERATIONS : A.) Union of Sets: Def. The union of sets A and B, denoted by A  B, is the set defined as A  B = { x | x  A  x  B } Ex: If A = { 1, 2, 3 } and B = { 3, 4, 5}, then A  B = { 1, 2, 3, 4, 5 }

7 B.) Intersection of Sets: Def. The intersection of sets A and B, denoted by A  B, is the set defined as A  B = { x | x  A  x  B } Ex: If A = { 1, 2, 3 } and B = { 3, 4, 5}, then A  B = {3}

8 C.) Difference: the difference of sets A & B, denoted by A – B is the set defined as A – B = { x | x  A  x  B } Ex: A = { 1, 2, 3, 4, 5 } B = { 3, 5, 7} A – B = { 1, 2, 4 } NOTE: Generally, A – B  B – A

9 D.) Complement: Given a universal set U and a subset X of U, the set U – X is called the complement of X. Ex. U ={ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } X = { 1, 2, 3, 4, 5 } Complement of X = {6, 7, 8, 9,10}

10 II.) Discrete Probability An experiment is an process that yields and outcome. An event is an outcome or combination of outcomes from and experiment. The sample space is the event consisting of all possible outcomes.

11 The probability P(E) of an event E from the finite sample space S is P(E) = |E| / |S| Ex: Two fair dice are rolled. What is the probability that the sum of the numbers on the dice is 10?

12 Ans: The 1 st die can be any one of the 6 numbers. The 2 nd die can also be one of the 6 numbers. 6 x 6 = 36 possible combinations S ={(1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (2,1), (2,2), (2,3), (2,4), (2,5), (2,6), (3,1), (3,2), (3,3), (3,4), (3,5), (3,6), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6), (5,1), (5,2), (5,3), (5,4), (5,5), (5,6), (6,1), (6,2), (6,3), (6,4), (6,5), (6,6) }

13 E = { (4,6), (5,5), (6,4) } So, P(E) = |E| / |S| = 3 / 36 = 1/ 12

14 Let E 1 E 2 be events, then P(E 1  E 2 ) = P(E 1 ) + P(E 2 ) - P(E 1  E 2 ) Ex: Two fair dice are rolled, what is the probability of getting doubles ( 2 dice showing the same number ) or a sum of 6?

15 Let E 1 = event of getting “doubles” Let E 2 = event of a sum of 6. P(E 1 ) = 6/36 = 1/ 6 There are 5 ways to get a sum of 6: [(1,5), (2,4), (3,3), (4,2), (5,1)] P(E 2 ) = 5/36

16 The event E 1  E 2 is “getting doubles AND getting a sum of 6. P(E 1  E 2 ) = 1/ 36 Hence, P(E 1  E 2 ) = P(E 1 ) + P(E 2 ) - P(E 1  E 2 ) = 6/36 + 5/36 – 1/36 = 10/36 = 5/18

17 Events E 1 and E 2 are mutually exclusive E 1  E 2 =  P(E 1  E 2 ) = P(E 1 ) + P(E 2 ) Conditional Probability: A probability given that some event has occurred. Def: Let E and F be events and P(F) > 0. The conditional probability of E given F is P( E | F ) = P(E  F) / P(F)

18 Ex: Suppose that among all of the freshmen of an engineering college took calculus and discrete math last semester. 70% of the students passed calculus, 55% passed discrete math, and 45% passed both. If a randomly selected freshmen is found to have passed calculus last semester, what is the probability that he or she also passed discrete math last semester?

19 P( E | F ) = P(E  F) / P(F) Let E = event that the student passed discrete math Let F = event that the student passed calculus P(E) = 0.55 P(E  F) = 0.45 P(F) = 0.70 P( E | F ) = 0.45 /0.70

20 Recurrence Relation: a recurrence relation for a sequence a 0, a 1,... is an equation that relates a n to certain of its predecessors a 0, a 1,..., a n-1

21 Ex. Consider the following instructions for generating a sequence: 1. Start with 5 2. Given any term, add 3 to get the next term, If we list the terms of the sequence, we obtain 5, 8, 11, 14, 17,...

22 The Fibonacci sequence is defined by the recurrence relation f n = f n-1 + f n-2, n  3 and the initial conditions f 1 = 1 f 2 = 2 1, 2, 3, 5, 8, 13,...

23 Source: Johnsonbaugh, R. (2001). Discrete Mathematics (5th ed.). Prentice- Hall, Inc.


Download ppt "Discrete Structures By: Tony Thi By: Tony Thi Aaron Morales Aaron Morales CS 490 CS 490."

Similar presentations


Ads by Google