230 likes | 433 Views
Combinatorics - the art of counting. A. B. C. There are 3 different routes to go from A to B. There are 2 different routes to go from B to C. How many different routes are there to go from A to C?. Answer is 6. A. B. C. m. n. There are m different routes to go from A to B.
E N D
A B C There are 3 different routes to go from A to B. There are 2 different routes to go from B to C. How many different routes are there to go from A to C? Answer is 6
A B C m n There are m different routes to go from A to B. There are n different routes to go from B to C. How many different routes are there to go from A to C? Answer is m*n
3 5 8 How many 3-digit numbers can be formed arranging the digits “3”, “5” and “8”? • 358 • 385 • 538 • 583 • 835 • 853 Answer is 6
3 5 4 7 9 How many 5-digit numbers can be formed arranging the above 5 digits? The answer is 120. It is hard to list down all the arrangements and count the number to be 120. We need a counting technique.
3 5 4 7 9 There are 5 digits as above. I II III IV V Consider 5 vacant positions as above. The number of ways these 5 vacant positions can be filled by these 5 digits will give me the answer.
3 5 4 7 9 Digits I II III IV V Positions Ways 5 4 3 2 1 Total number of arrangements = 5 * 4 * 3 * 2 * 1 = 120
A1 A2 An Objects P1 P2 Pn Positions Ways n n-1 1 Total number of arrangements = n * (n-1) * . * . * 1 = n!
3 5 4 7 How many 2-digit numbers can be formed arranging the above 4 digits? Answer is 12 • 35 • 34 • 37 • 53 • 54 • 57 • 43 • 45 • 47 • 73 • 75 • 74 Let us apply our newly learnt counting technique
3 5 4 7 Digits I II Positions Ways 4 3 Total number of arrangements = 4 * 3 = 12
A1 A2 An Objects In how many ways the above n objects can be arranged among themselves taking r (r < n) objects at a time? We call the number npr
A1 A2 An Objects P1 P2 Pr Positions Ways n n-1 n-r+1 Total number of arrangements = n * (n-1) * . * . * (n-r+1) = n! / (n-r)!
A1 A2 An Objects In how many ways the above n objects can be grouped among themselves taking r (r < n) objects at a time? We call the number ncr
Consider ncr groups of n objects taking r at a time Each group contains r objects that can be arranged among themselves in r! ways So, npr = r!ncr
ncr = npr / r! = n! / [r! (n-r!)] ncr = nc(n-r) ncr = (n-1)cr + (n-1)c(r-1)
A A A B C In how many ways the above 5 objects can be arranged among themselves taking all at a time? Let the answer be x
A A A B C Had the all 5 objects been different, the total number of arrangements would have been 5! = 120 Had the all 5 objects been different, each of the x arrangements would have produced 3! = 6 arrangements
A A A B C So, 3! * x = 5! Or, x = 5! / 3! = 120 / 6 = 20
B A Consider the 2 by 2 grid above One needs to travel from A to B along the lines One can move only rightwards and upwards How many such routes are there?
B A 1. RRUU The answer is 6 2. RURU 3. RUUR 6 = 4! / (2! 2!) 4. URUR 5. URRU 6. UURR
Consider an m by n grid Suppose one needs to travel from bottom left hand corner to top right hand corner following the lines How many different routes are there? Answer is (m+n)! / (m! * n!)