Presentation is loading. Please wait.

Presentation is loading. Please wait.

Menu Traditional Menu Other Menu Nasi LemakBeef Burger Roti Canai Potatoes Chip Capati French Bread Mee Goreng Drink : Coffee, Tea, Coke and Pepsi.

Similar presentations


Presentation on theme: "Menu Traditional Menu Other Menu Nasi LemakBeef Burger Roti Canai Potatoes Chip Capati French Bread Mee Goreng Drink : Coffee, Tea, Coke and Pepsi."— Presentation transcript:

1 Menu Traditional Menu Other Menu Nasi LemakBeef Burger Roti Canai Potatoes Chip Capati French Bread Mee Goreng Drink : Coffee, Tea, Coke and Pepsi

2 Questions?  How many different breakfast consists of traditional menu and drink.  How many different breakfast consists of other menu and drink.  How many different breakfast consists of traditional, other menu and drink.  How many different breakfast consists of traditional menu and an optional drink.

3 Basic principles Multiplication principle If an activity can be performed in k successive steps, Step 1 can be done in n 1 ways Step 2 can be done in n 2 ways … Step k can be done in n k ways Then: the number of different ways that the activity can be performed is the product n 1 n 2 …n k

4 More Questions a. How many strings of length 4 can be formed using the letter ABCDE if repetitions are not allowed b. How many strings of part (a) begin with the letter B? c. How many strings of part (a) do not begin with the letter B?

5 Virus Attack  After the virus sent the email to the first 50 addresses each of those recipients then sent email to 50 addresses. This means 50 *50 =2500 additional recipients. Each of the recipients then sent email to 50 addresses. This means 50*50*50=125000 additional recipients. Thus after three iterations 125000+2500+50+1=127551 copies of the message had been sent.

6 Examples  How many eight-bit strings begin either 101 and 111?  How many eight-bit strings begin 1100?  How many eight-bit strings begin and end with 1?

7 Addition principle Let X 1, X 2,…, X k be a collection of k pair- wise disjoint sets, each of which has n j elements, 1 < j < k, then the union of those sets k X =  X j j =1 has n 1 + n 2 + … + n k elements

8 Example  A six-person committee composed of A, B, C, D, E and F is to select a chairperson, secretary and treasurer. How many ways can this be done? How many ways can this be done if either A or B must be chairperson? How many ways can this be done if E must hold one of the offices? How many ways can this be done if both D and F must hold office?

9 Example 2  How many ways can we select two books from different subjects among five distinct computer science books, three distinct mathematics books and two distinct art books?

10 Permutations and combinations A permutation of n distinct elements x 1, x 2,…, x n is an ordering of the n elements. There are n! permutations of n elements. Example: there are 3! = 6 permutations of three elements a, b, c: abcbaccab acbbcacba

11 Examples  How many permutations of the letter ABCDEF contain the substring DEF?  How many permutations of the letter ABCDEF contain the letter DEF in any order?

12 r-permutations An r-permutation of n distinct elements is an ordering of an r-element subset of the n elements x 1, x 2,…, x n For r < n the number of r-permutations of a set with n distinct objects is P(n,r) = n(n-1)(n-2)…(n-r+1)

13 Examples  The number of 2-permutations of X={a, b, c} is P(3,2)=3!/(3-2)!=3!/1!=3*2*1/1=6 ab, ac, ba, bc, ca, cb  How many 3-permutations are there of a, b, c, d? P(5,3)=5!/(5-2)!=5!/3!=20  How many 5-permutations are there of 11 distinct object2? P(11,5)=11!/(11-5)!

14 More Examples  How many different ways are there to select 4 different players from 10 players on a team to play four tennis matches where the matches are ordered? P(10,4)=10!/(10-4)!=5040  Let S={1,2,3,4,5} List all the 3-permutations of S? P(5,3)=5!/(5-3)!=5.4.3=60

15 Combinations Let X = {x 1, x 2,…, x n } be a set containing n distinct elements  An r-combination of X is an unordered selection of r elements of X, for r < n  The number of r-combinations of X is the C(n,r) = n! / r!(n-r)!

16 Examples  Let S={1,2,3,4,5} List all the 3-combinations of S  C(5,3)=5!/(3!)(5-3)!  How many ways are there to select 5 players from a 10-members tennis team to make a trip to a match? C(10,5)  How many ways can we select a committee of two women and three men from a group of five women and six men? First task : C(5,2) Second Task : C(6,3)

17 Exercise  A club consisting of six men and seven women. How many ways can we select a committee of five persons? How many ways can we select a committee of three men and four women?

18 The pigeonhole principle  First form: If k < n and n pigeons fly into k pigeonholes, some pigeonhole contains at least two pigeons.

19 Example  Show that if any five numbers from 1 to 8 are chosen, then two of them will add to 9. Construct four different sets, A={1,8} B={2,7}, C={3,6}, D={4,5}. Each of the five numbers chosen must belong to one of these sets. Since there are only four sets the pigeonhole principle tells us that two of the chosen number belong to the same set and these numbers add up to 9

20 Examples  If eight people are chosen in any way from some group at least two of them will have been born on the same day of the week.  Shirt numbered consecutively from 1 to 20 are worn by the 20 members of a bowling league. When any three of these numbers are chosen to be a team the league proposes to use the sum of their numbers as a code number for the team. Show that if any eight of the 20 are selected then these eight one may form at least two different teams having the same code number.

21 Examples  Show that if 30 dictionaries in a library contains a total of 61327 pages, then one of the dictionaries must have at least 2045.  Show that if any 30 people are selected then one may choose a subset of five so that all five were born on the same day of the week

22 Second form of the pigeonhole principle  If X and Y are finite sets with |X| > |Y| and f : X  Y is a function, then f(x 1 ) = f(x 2 ) for some x 1, x 2  X, x 1  x 2.

23 Third form of the pigeonhole principle  If X and Y are finite sets with |X| = n, |Y| = m and k =  n/m , then there are at least k values a 1, a 2,…, a k  X such that f(a 1 ) = f(a 2 ) = … f(a k ). Example: n = 5, m = 3 k =  n/m  =  5/3  = 2.


Download ppt "Menu Traditional Menu Other Menu Nasi LemakBeef Burger Roti Canai Potatoes Chip Capati French Bread Mee Goreng Drink : Coffee, Tea, Coke and Pepsi."

Similar presentations


Ads by Google