SlideShare a Scribd company logo
Set, Combinatorics, Probability &
                   Number Theory



                     Mathematical
                     Structures for
                   Computer Science
                               Chapter 3




    Copyright © 2006 W.H. Freeman & Co. w/modifications by D. Hyland-Wood, UMW   Set, Combinatorics, Probability & Number
    Theory
Thursday, March 11, 2010
Permutations
         ●     An ordered arrangement of objects is called a permutation.
                   ■
                       Hence, a permutation of n distinct elements is an ordering of these
                       n elements.
         ●     It is denoted by P(n,r) or nPr.
         ●     Ordering of last four digits of a telephone number if digits are
               allowed to repeat
                   ■
                       10*10*10*10 = 10000
                   ■
                       Ordering of four digits if repetition is not allowed = 10*9*8*7 =
                       5040 = 10!/6!
          	

 	

 where n! = n*(n-1)*(n-2)*….*3*2*1 and by definition 0! = 1
         ● Hence, mathematically, for r ≤ n, an r-permutation from n

              objects is defined by
         ● P(n,r) = n*(n-1)*(n-2)*…..*(n-r+1)


         ⇒ P(n,r) = 	

      for 0 ≤ r ≤ n
         ● Hence, P(10,4) = 10! / (10-4)! = 10!/6! = 5040


     Section 3.4                               Permutations and Combinations                 2
Thursday, March 11, 2010
Permutations: Some special cases
         ●     P(n,0) = n! / n! = 1
         ●     This means that there is only one ordered arrangement
               of 0 objects, called the empty set.

         ●     P(n,1) = n!/ (n-1)! = n
         ●     There are n ordered arrangements of one object (i.e. n
               ways of selecting one object from n objects).

         ●     P(n,n) = n!/(n-n)! = n!/0! = n!
         ●     This means that one can arrange n distinct objects in
               n! ways, that is nothing but the multiplication
               principle.
     Section 3.4                    Permutations and Combinations       3
Thursday, March 11, 2010
Permutation Examples

         1.    Ten athletes compete in an Olympic event. Gold, silver and
               bronze medals are awarded to the first three in the event,
               respectively. How many ways can the awards be presented?

         2. How many ways can six people be seated on six
            chairs?	

   	

         3. How many permutations of the letters ABCDEF contain the
            letters DEF together in any order?




         4.    The professor’s dilemma: how to arrange four books on OS,
               seven on programming, and three on data structures on a shelf
               such that books on the same subject must be
               together?	

 	

     	


     Section 3.4                       Permutations and Combinations           4
Thursday, March 11, 2010
Permutation Examples

         1.    Ten athletes compete in an Olympic event. Gold, silver and
               bronze medals are awarded to the first three in the event,
               respectively. How many ways can the awards be presented?
                           Hence, 3 objects from a pool of 10 = P(10,3) = 720

         2. How many ways can six people be seated on six
            chairs?	

   	

         3. How many permutations of the letters ABCDEF contain the
            letters DEF together in any order?




         4.    The professor’s dilemma: how to arrange four books on OS,
               seven on programming, and three on data structures on a shelf
               such that books on the same subject must be
               together?	

 	

     	


     Section 3.4                            Permutations and Combinations       4
Thursday, March 11, 2010
Permutation Examples

         1.    Ten athletes compete in an Olympic event. Gold, silver and
               bronze medals are awarded to the first three in the event,
               respectively. How many ways can the awards be presented?
                           Hence, 3 objects from a pool of 10 = P(10,3) = 720

         2. How many ways can six people be seated on six
            chairs?	

 P(6,6) = 6! = 720
                         	

         3. How many permutations of the letters ABCDEF contain the
            letters DEF together in any order?




         4.    The professor’s dilemma: how to arrange four books on OS,
               seven on programming, and three on data structures on a shelf
               such that books on the same subject must be
               together?	

 	

     	


     Section 3.4                            Permutations and Combinations       4
Thursday, March 11, 2010
Permutation Examples

         1.    Ten athletes compete in an Olympic event. Gold, silver and
               bronze medals are awarded to the first three in the event,
               respectively. How many ways can the awards be presented?
                           Hence, 3 objects from a pool of 10 = P(10,3) = 720

         2. How many ways can six people be seated on six
            chairs?	

 P(6,6) = 6! = 720
                         	

         3. How many permutations of the letters ABCDEF contain the
            letters DEF together in any order?
                    If DEF is considered as one letter, then we have 4 letters A B C DEF which
                    can be permuted in 4! ways, DEF can be ordered by its letters in 3! ways.
                    Hence, by the multiplication principle, total number of orderings
                    possible = 4!*3! = 24*6 = 144.
         4.    The professor’s dilemma: how to arrange four books on OS,
               seven on programming, and three on data structures on a shelf
               such that books on the same subject must be
               together?	

 	

     	


     Section 3.4                            Permutations and Combinations                        4
Thursday, March 11, 2010
Permutation Examples

         1.    Ten athletes compete in an Olympic event. Gold, silver and
               bronze medals are awarded to the first three in the event,
               respectively. How many ways can the awards be presented?
                           Hence, 3 objects from a pool of 10 = P(10,3) = 720

         2. How many ways can six people be seated on six
            chairs?	

 P(6,6) = 6! = 720
                         	

         3. How many permutations of the letters ABCDEF contain the
            letters DEF together in any order?
                    If DEF is considered as one letter, then we have 4 letters A B C DEF which
                    can be permuted in 4! ways, DEF can be ordered by its letters in 3! ways.
                    Hence, by the multiplication principle, total number of orderings
                    possible = 4!*3! = 24*6 = 144.
         4.    The professor’s dilemma: how to arrange four books on OS,
               seven on programming, and three on data structures on a shelf
               such that books on the same subject must be
               together?	

 (4!*7!*3*)*3! = 24*5040*6*6 = 4,354,560
                              	

      	


     Section 3.4                            Permutations and Combinations                        4
Thursday, March 11, 2010
Combinations
         ●     When order in permutations becomes immaterial, i.e. we are just
               interested in selecting r objects from n distinct objects, we talk
               of combinations denoted by
         	

   	

        	

      	

      C(n,r) or nCr
         ●     For each combination, there are r! ways of ordering those r
               chosen objects
         ●     Hence, from multiplication principle,
         ●     C(n,r)* r! = P(n,r) ⇒
                     ■
                         Note: C(n,r) is much smaller than P(n,r) as seen from the graphs
                         below:




     Section 3.4                                Permutations and Combinations               5
Thursday, March 11, 2010
Combinations: Special Cases
         ●     C(n,0) = 1
         ●     Only one way to choose 0 objects from n objects-
               chose the empty set

         ●     C(n,1) = n
         ●     Obvious, since n ways to choose one object from n
               objects

         ●     C(n,n) = 1
         ●     Only one way to choose n objects from n objects



     Section 3.4                     Permutations and Combinations   6
Thursday, March 11, 2010
Combinations: Examples
       ●    How many ways can we select a committee of three from 10?

       ●    How many ways can a committee of two women and three men be
            selected from a group of five different women and six different men?




       ●    How many five-card poker hands can be dealt from a standard 52-card
            deck?

       ●    How many poker hands contain cards all of the same suit?

       ●    How many poker hands contain three cards of one denomination and two
            cards of another denomination?




     Section 3.4                        Permutations and Combinations              7
Thursday, March 11, 2010
Combinations: Examples
       ●    How many ways can we select a committee of three from 10?
                             C(10,3) = 120
       ●    How many ways can a committee of two women and three men be
            selected from a group of five different women and six different men?




       ●    How many five-card poker hands can be dealt from a standard 52-card
            deck?

       ●    How many poker hands contain cards all of the same suit?

       ●    How many poker hands contain three cards of one denomination and two
            cards of another denomination?




     Section 3.4                        Permutations and Combinations              7
Thursday, March 11, 2010
Combinations: Examples
       ●    How many ways can we select a committee of three from 10?
                                  C(10,3) = 120
       ●    How many ways can a committee of two women and three men be
            selected from a group of five different women and six different men?
                           For selecting two out of five women, we have C(5,2) ways = 10.
                           For selecting three out of six men, we have C(6,3) ways = 20.
                           Total number of ways for selecting the committee = 10*20 = 200

       ●    How many five-card poker hands can be dealt from a standard 52-card
            deck?

       ●    How many poker hands contain cards all of the same suit?

       ●    How many poker hands contain three cards of one denomination and two
            cards of another denomination?




     Section 3.4                              Permutations and Combinations                 7
Thursday, March 11, 2010
Combinations: Examples
       ●    How many ways can we select a committee of three from 10?
                                  C(10,3) = 120
       ●    How many ways can a committee of two women and three men be
            selected from a group of five different women and six different men?
                           For selecting two out of five women, we have C(5,2) ways = 10.
                           For selecting three out of six men, we have C(6,3) ways = 20.
                           Total number of ways for selecting the committee = 10*20 = 200

       ●    How many five-card poker hands can be dealt from a standard 52-card
            deck?
                                      C(52,5) = 2,598,960

       ●    How many poker hands contain cards all of the same suit?

       ●    How many poker hands contain three cards of one denomination and two
            cards of another denomination?




     Section 3.4                              Permutations and Combinations                 7
Thursday, March 11, 2010
Combinations: Examples
       ●    How many ways can we select a committee of three from 10?
                                  C(10,3) = 120
       ●    How many ways can a committee of two women and three men be
            selected from a group of five different women and six different men?
                           For selecting two out of five women, we have C(5,2) ways = 10.
                           For selecting three out of six men, we have C(6,3) ways = 20.
                           Total number of ways for selecting the committee = 10*20 = 200

       ●    How many five-card poker hands can be dealt from a standard 52-card
            deck?
                                      C(52,5) = 2,598,960

       ●    How many poker hands contain cards all of the same suit?
                                       4*C(13,5) = 5148
       ●    How many poker hands contain three cards of one denomination and two
            cards of another denomination?




     Section 3.4                              Permutations and Combinations                 7
Thursday, March 11, 2010
Combinations: Examples
       ●    How many ways can we select a committee of three from 10?
                                  C(10,3) = 120
       ●    How many ways can a committee of two women and three men be
            selected from a group of five different women and six different men?
                           For selecting two out of five women, we have C(5,2) ways = 10.
                           For selecting three out of six men, we have C(6,3) ways = 20.
                           Total number of ways for selecting the committee = 10*20 = 200

       ●    How many five-card poker hands can be dealt from a standard 52-card
            deck?
                                      C(52,5) = 2,598,960

       ●    How many poker hands contain cards all of the same suit?
                                       4*C(13,5) = 5148
       ●    How many poker hands contain three cards of one denomination and two
            cards of another denomination?
            Order of events: Select first denomination, select three cards from this denomination,
            select the second denomination, select two cards from this denomination
            13*C(4,3)*12*C(4,2) = 3744.
     Section 3.4                              Permutations and Combinations                    7
Thursday, March 11, 2010
Combinations: Examples
         ● How many routes are there from the lower-left corner of an n by n
           square grid to the upper-right corner if we are restricted to traveling
           only to the right (R) or upward (U)?
         Consider a 4×4 grid. Total steps required to
         get from A to B is 8. This can be a mixture of
         R’s and U’s as shown by the two paths in green
         and red above. So, 4 R’s and 4 U’s are required
         but the order is in which step is taken when
         is not important.




         ●     In how many ways can three athletes be declared winners from a group
               of 10 athletes who compete in an Olympic event?


     Section 3.4                         Permutations and Combinations                8
Thursday, March 11, 2010
Combinations: Examples
         ● How many routes are there from the lower-left corner of an n by n
           square grid to the upper-right corner if we are restricted to traveling
           only to the right (R) or upward (U)?
         Consider a 4×4 grid. Total steps required to
         get from A to B is 8. This can be a mixture of
         R’s and U’s as shown by the two paths in green
         and red above. So, 4 R’s and 4 U’s are required
         but the order is in which step is taken when
         is not important.
         So, basically, we are selecting four objects from eight that can be done in C(8,4) ways.
         For an n×n grid, one can form C(2n,n) such routes to go from lower-left to the
         upper-right corner.

         ●     In how many ways can three athletes be declared winners from a group
               of 10 athletes who compete in an Olympic event?


     Section 3.4                            Permutations and Combinations                      8
Thursday, March 11, 2010
Combinations: Examples
         ● How many routes are there from the lower-left corner of an n by n
           square grid to the upper-right corner if we are restricted to traveling
           only to the right (R) or upward (U)?
         Consider a 4×4 grid. Total steps required to
         get from A to B is 8. This can be a mixture of
         R’s and U’s as shown by the two paths in green
         and red above. So, 4 R’s and 4 U’s are required
         but the order is in which step is taken when
         is not important.
         So, basically, we are selecting four objects from eight that can be done in C(8,4) ways.
         For an n×n grid, one can form C(2n,n) such routes to go from lower-left to the
         upper-right corner.

         ●     In how many ways can three athletes be declared winners from a group
               of 10 athletes who compete in an Olympic event?
                       C(10,3) = 120 	
   (much less than to award three winners medals)

     Section 3.4                             Permutations and Combinations                     8
Thursday, March 11, 2010
Eliminating Duplicates
         ●    How many ways can a committee of two be chosen from four
              men and three women and it must include at least one man.




         ●    How many distinct permutations can be made from the
              characters in the word FLORIDA?
         ●    How many distinct permutations can be made from the
              characters in the word MISSISSIPPI?




     Section 3.4                     Permutations and Combinations        9
Thursday, March 11, 2010
Eliminating Duplicates
         ●    How many ways can a committee of two be chosen from four
              men and three women and it must include at least one man.




         ●    How many distinct permutations can be made from the
              characters in the word FLORIDA?
         ●    How many distinct permutations can be made from the
              characters in the word MISSISSIPPI?




     Section 3.4                     Permutations and Combinations        9
Thursday, March 11, 2010
Eliminating Duplicates
         ●    How many ways can a committee of two be chosen from four
              men and three women and it must include at least one man.
                   Incorrect and impulsive answer = C(4,1)*C(6,1)
                   Correct answer = C(7,2) – C(3,2) = C(4,1)*C(6,1) – C(4,2)
                   C(4,2) is the number of committees with two men on it. It has to be subtracted
                   since we are counting it twice in C(4,1)*C(6,1).
                   C(7,2) = all committees possible
                   C(3,2) = all committees with no men on it
         ●    How many distinct permutations can be made from the
              characters in the word FLORIDA?
         ●    How many distinct permutations can be made from the
              characters in the word MISSISSIPPI?




     Section 3.4                               Permutations and Combinations                    9
Thursday, March 11, 2010
Eliminating Duplicates
         ●    How many ways can a committee of two be chosen from four
              men and three women and it must include at least one man.
                   Incorrect and impulsive answer = C(4,1)*C(6,1)
                   Correct answer = C(7,2) – C(3,2) = C(4,1)*C(6,1) – C(4,2)
                   C(4,2) is the number of committees with two men on it. It has to be subtracted
                   since we are counting it twice in C(4,1)*C(6,1).
                   C(7,2) = all committees possible
                   C(3,2) = all committees with no men on it
         ●    How many distinct permutations can be made from the
              characters in the word FLORIDA? Simple: 7!
         ●    How many distinct permutations can be made from the
              characters in the word MISSISSIPPI?




     Section 3.4                               Permutations and Combinations                    9
Thursday, March 11, 2010
Eliminating Duplicates
         ●    How many ways can a committee of two be chosen from four
              men and three women and it must include at least one man.
                   Incorrect and impulsive answer = C(4,1)*C(6,1)
                   Correct answer = C(7,2) – C(3,2) = C(4,1)*C(6,1) – C(4,2)
                   C(4,2) is the number of committees with two men on it. It has to be subtracted
                   since we are counting it twice in C(4,1)*C(6,1).
                   C(7,2) = all committees possible
                   C(3,2) = all committees with no men on it
         ●    How many distinct permutations can be made from the
              characters in the word FLORIDA? Simple: 7!
         ●    How many distinct permutations can be made from the
              characters in the word MISSISSIPPI?
             Since we have more than one S, interchanging the S’s at the same position will not
             result in a distinguishable change. Hence for four S’s, 4! possible permutations
             that look alike.
             Hence total number of permutations =

     Section 3.4                               Permutations and Combinations                    9
Thursday, March 11, 2010
Summary of Counting Techniques
   You want to count the number of…                  Technique to try:

   Subsets of an n-element set                       Use formula 2n

   Outcomes of successive events                     Multiply the number of outcomes for each
                                                     event.
   Outcomes of disjoint events                       Add the number of outcomes for each event.

   Outcomes of specific choices at each step          Draw a decision tree and count the number
                                                     of paths.
   Elements in overlapping sections of related       Use principle of inclusion and exclusion
   sets                                              formula
   Ordered arrangements of r out of n distinct       Use P(n,r) formula
   objects
   Ways to select r out of n distinct objects        Use C(n,r) formula

   Ways to select r out of n distinct objects        Use C(r+n-1, r) formula
   with repetition allowed
     Section 3.4                            Permutations and Combinations                       10
Thursday, March 11, 2010
 Table 3.2, page 241 in your
 text.
Class Exercises
         ●     How many permutations of the characters in the word COMPUTER
               are there? How many of these end in a vowel?



         ●     How many distinct permutations of the characters in ERROR are
               there?

         ●     In how many ways can you seat 11 men and eight women in a row if
               no two women are to sit together?

         ●     A set of four coins is selected from a box containing five dimes and
               seven quarters.

         ●     Find the number of sets which has two dimes and two quarters.

         ●     Find the number of sets composed of all dimes or all quarters.

     Section 3.4                           Permutations and Combinations             11
Thursday, March 11, 2010
Class Exercises
         ●     How many permutations of the characters in the word COMPUTER
               are there? How many of these end in a vowel?
                                            8!
                                            3.7!
         ●     How many distinct permutations of the characters in ERROR are
               there?

         ●     In how many ways can you seat 11 men and eight women in a row if
               no two women are to sit together?

         ●     A set of four coins is selected from a box containing five dimes and
               seven quarters.

         ●     Find the number of sets which has two dimes and two quarters.

         ●     Find the number of sets composed of all dimes or all quarters.

     Section 3.4                           Permutations and Combinations             11
Thursday, March 11, 2010
Class Exercises
         ●     How many permutations of the characters in the word COMPUTER
               are there? How many of these end in a vowel?
                                            8!
                                            3.7!
         ●     How many distinct permutations of the characters in ERROR are
               there?
                                            5!/3!

         ●     In how many ways can you seat 11 men and eight women in a row if
               no two women are to sit together?

         ●     A set of four coins is selected from a box containing five dimes and
               seven quarters.

         ●     Find the number of sets which has two dimes and two quarters.

         ●     Find the number of sets composed of all dimes or all quarters.

     Section 3.4                           Permutations and Combinations             11
Thursday, March 11, 2010
Class Exercises
         ●     How many permutations of the characters in the word COMPUTER
               are there? How many of these end in a vowel?
                                            8!
                                            3.7!
         ●     How many distinct permutations of the characters in ERROR are
               there?
                                            5!/3!

         ●     In how many ways can you seat 11 men and eight women in a row if
               no two women are to sit together?
                                          11!*C(12,8)*8!
         ●     A set of four coins is selected from a box containing five dimes and
               seven quarters.

         ●     Find the number of sets which has two dimes and two quarters.

         ●     Find the number of sets composed of all dimes or all quarters.

     Section 3.4                           Permutations and Combinations             11
Thursday, March 11, 2010
Class Exercises
         ●     How many permutations of the characters in the word COMPUTER
               are there? How many of these end in a vowel?
                                            8!
                                            3.7!
         ●     How many distinct permutations of the characters in ERROR are
               there?
                                            5!/3!

         ●     In how many ways can you seat 11 men and eight women in a row if
               no two women are to sit together?
                                          11!*C(12,8)*8!
         ●     A set of four coins is selected from a box containing five dimes and
               seven quarters.
                                     C(5,2)*C(7,2) = 10*21 = 210

         ●     Find the number of sets which has two dimes and two quarters.

         ●     Find the number of sets composed of all dimes or all quarters.

     Section 3.4                           Permutations and Combinations             11
Thursday, March 11, 2010
Class Exercises
         ●     How many permutations of the characters in the word COMPUTER
               are there? How many of these end in a vowel?
                                            8!
                                            3.7!
         ●     How many distinct permutations of the characters in ERROR are
               there?
                                            5!/3!

         ●     In how many ways can you seat 11 men and eight women in a row if
               no two women are to sit together?
                                          11!*C(12,8)*8!
         ●     A set of four coins is selected from a box containing five dimes and
               seven quarters.
                                     C(5,2)*C(7,2) = 10*21 = 210

         ●     Find the number of sets which has two dimes and two quarters.
                                     C(5,4) + C(7,4) = 5 + 35 = 40
         ●     Find the number of sets composed of all dimes or all quarters.

     Section 3.4                           Permutations and Combinations             11
Thursday, March 11, 2010
Class Exercises
         ●     How many permutations of the characters in the word COMPUTER
               are there? How many of these end in a vowel?
                                            8!
                                            3.7!
         ●     How many distinct permutations of the characters in ERROR are
               there?
                                            5!/3!

         ●     In how many ways can you seat 11 men and eight women in a row if
               no two women are to sit together?
                                          11!*C(12,8)*8!
         ●     A set of four coins is selected from a box containing five dimes and
               seven quarters.
                                     C(5,2)*C(7,2) = 10*21 = 210

         ●     Find the number of sets which has two dimes and two quarters.
                                     C(5,4) + C(7,4) = 5 + 35 = 40
         ●     Find the number of sets composed of all dimes or all quarters.
                                      C(7,3)*C(5,1) + C(7,4) = 210
     Section 3.4                           Permutations and Combinations             11
Thursday, March 11, 2010
Set, Combinatorics,
              Probability, and Number Theory



                     Mathematical
                     Structures for
                   Computer Science
                           Chapter 3




     Section 3.6                       Binomial Theorem
Thursday, March 11, 2010
Pascal’s Triangle
         ●     Consider the following expressions for the binomials:
                   (a + b)0 = 1
                   (a + b)1 = a + b
                   (a + b)2 = a2 + 2ab + b2
                   (a + b)3 = a3 + 3a2b + 3ab2 + b3
                   (a + b)4 = a4 + 4a3b + 6a2b2 + 4ab3 + b4
         ●  Row n of the triangle (n ≥ 0) consists of all the values C(n, r) for 0
            ≤ r ≤ n. Thus, the Pascal’s looks like this: 	
 	
         	
            	
 	
         	
       	
       	
       	
            	
      Row
         	
 	
 	
         	
         C(0,0)	
                                            	
       	
       	
       	
    0
         	
 	
 	
             C(1,0)       C(1,1) 	
 	
       	
       	
    1
         	
 	
         C(2,0) 	
     C(2,1) 	
       C(2,2) 	
	
       	
    2
                  C(3,0)      C(3,1)           C(3,2)        C(3,3) 	
 	
    3
               C(4,0)    C(4,1)       C(4,2)          C(4,3)     C(4,4) 	
   4
           C(5,0) C(5,1)         C(5,2)        C(5,3)      C(5,4) C(5,5) 	
 5
         C(n,0) C(n,1)          ….………… 	
            	
       C(n,n−1) C(n,n) n
     Section 3.6                                  Binomial Theorem             13
Thursday, March 11, 2010
Pascal’s Triangle
      ●   The Pascal’s triangle can be written as:
      	

 	

 	

      	

       C(0,0)
      	

 	

 	

           C(1,0)             C(1,1)
      	

 	

 	

      C(2,0)      C(2,1)	

             C(2,2)
      	

 	

      C(3,0) C(3,1)                C(3,2)       C(3,3)
      	

 	

 C(4,0) C(4,1)	

       C(4,2)           C(4,3)	

      C(4,4)
      	

 C(5,0)     C(5,1) C(5,2)               C(5,3)         C(5,4)      C(5,5)
      	

 	

 	

      	

          ......
      	

 	

 	

      	

     ……….
      C(n,0) C(n,1)	

 	

     ……….	

     	

        	

             C(n,n − 1) C(n,n)

      ●    We note that C(n,k) = C(n − 1,k − 1) + C(n − 1,k) for 1≤ k ≤ n − 1
      ●    Can be proved simply by expanding the right hand side and
           simplifying.
     Section 3.6                             Binomial Theorem                       14
Thursday, March 11, 2010
Pascal’s Triangle

         	

   	

   	

                 Coefficients	

                               	

   Power
         	

   	

   	

         	

          0	

       	

          	

             	

     0
         	

   	

   	

                 1	

      1	

 	

           	

             	

     1
         	

   	

   	

             1	

 2             1	

          	

             	

     2
         	

   	

   	

         1        3          3         1	

   	

             	

     3
         	

   	

             1      4            6         4              1	

      	

     4
         	

   	

         1     5        10           10       5                1	

 	

     5




     Section 3.6                                         Binomial Theorem                           15
Thursday, March 11, 2010
Binomial Theorem
         ●     The binomial theorem provides us with a formula for the
               expansion of (a + b)n.
         ●     It states that for every nonnegative integer n:




         ●     The terms C(n,k) in the above series is called the binomial
               coefficient.

         ●     Binomial theorem can be proved using mathematical induction.


     Section 3.6                            Binomial Theorem                  16
Thursday, March 11, 2010
Exercises


         ●     Expand (x + 1)5 using the binomial theorem
         	

 C(5,0)x5 + C(5,1)x4 + C(5,2)x3 + C(5,3)x4 + C(5,4)x1 + C(5,0)x0


         ●     Expand (x − 3)4 using the binomial theorem


         ●     What is the fifth term of (3a + 2b)7

         ●     What is the coefficient of x5y2z2 in the expansion of (x + y + 2z)9 ?

         ●     Use binomial theorem to prove that:
         	

   	

   C(n,0) – C(n,1) + C(n,2) - …….+ (-1)nC(n,n) = 0

     Section 3.6                             Binomial Theorem                   17
Thursday, March 11, 2010

More Related Content

What's hot

Pagsusuri ng Maikling Kuwento Impeng Negro Talabong Danica V.
Pagsusuri ng Maikling Kuwento Impeng Negro Talabong Danica V.Pagsusuri ng Maikling Kuwento Impeng Negro Talabong Danica V.
Pagsusuri ng Maikling Kuwento Impeng Negro Talabong Danica V.
Danica Talabong
 
Spanish Colonial Text
Spanish Colonial TextSpanish Colonial Text
Spanish Colonial Text
Paul Andrei Labitad
 
PRELIM --FIL 211. INTRODUKSIYON SA PAMAMAHAYAG.pdf
PRELIM --FIL 211. INTRODUKSIYON SA PAMAMAHAYAG.pdfPRELIM --FIL 211. INTRODUKSIYON SA PAMAMAHAYAG.pdf
PRELIM --FIL 211. INTRODUKSIYON SA PAMAMAHAYAG.pdf
JosephRRafananGPC
 
Katamaran ng Filipino
Katamaran ng FilipinoKatamaran ng Filipino
Katamaran ng Filipino
Paul Ramos
 
Register Bilang VARAYTI NG WIKA
Register Bilang VARAYTI NG WIKARegister Bilang VARAYTI NG WIKA
Register Bilang VARAYTI NG WIKA
Rochelle Nato
 
PAGSUSURI SA MGA AKDANG MAPANGHIMAGSIK SA PANITIKANG FILIPINO
PAGSUSURI SA MGA AKDANG MAPANGHIMAGSIK SA  PANITIKANG FILIPINOPAGSUSURI SA MGA AKDANG MAPANGHIMAGSIK SA  PANITIKANG FILIPINO
PAGSUSURI SA MGA AKDANG MAPANGHIMAGSIK SA PANITIKANG FILIPINO
Nimpha Gonzaga
 
Mga patakarang pang ekonomiya
Mga patakarang pang ekonomiyaMga patakarang pang ekonomiya
Mga patakarang pang ekonomiya
Neil Louie de Mesa
 
Rehiyon 2: Lambak ng Cagayan
Rehiyon 2: Lambak ng CagayanRehiyon 2: Lambak ng Cagayan
Rehiyon 2: Lambak ng Cagayan
Marlene Panaglima
 
BANYAGA akda ni liwayway arceo
BANYAGA  akda ni liwayway arceoBANYAGA  akda ni liwayway arceo
BANYAGA akda ni liwayway arceo
emeraimah dima-arig
 
Halimbawa ng pagsasaling wika
Halimbawa ng pagsasaling wikaHalimbawa ng pagsasaling wika
Halimbawa ng pagsasaling wika
Jennifer Baluyot
 
Gay Lingo-isang pananaliksik
Gay Lingo-isang pananaliksikGay Lingo-isang pananaliksik
Gay Lingo-isang pananaliksik
Grasya Hilario
 
Panitikang bayan
Panitikang bayanPanitikang bayan
Panitikang bayan
MaylynCantos
 
Sintaks
SintaksSintaks
Kasaysayan ng panitikan
Kasaysayan ng panitikanKasaysayan ng panitikan
Kasaysayan ng panitikanSCPS
 
AP 5 PPT Q3 W3 - Impluwensya ng Kulturang Espanyol sa Wika at Panitikan ng Ku...
AP 5 PPT Q3 W3 - Impluwensya ng Kulturang Espanyol sa Wika at Panitikan ng Ku...AP 5 PPT Q3 W3 - Impluwensya ng Kulturang Espanyol sa Wika at Panitikan ng Ku...
AP 5 PPT Q3 W3 - Impluwensya ng Kulturang Espanyol sa Wika at Panitikan ng Ku...
RanjellAllainBayonaT
 
Mga Simbolismo sa El Filibusterismo
Mga Simbolismo sa El FilibusterismoMga Simbolismo sa El Filibusterismo
Mga Simbolismo sa El Filibusterismo
SheilaMarieReyes1
 
Ortograpiyang pambansa
Ortograpiyang pambansaOrtograpiyang pambansa
Ortograpiyang pambansa
pink_angels08
 
Hulyo 4, 1954 A.D.
Hulyo 4, 1954 A.D.Hulyo 4, 1954 A.D.
Hulyo 4, 1954 A.D.Hanna Elise
 

What's hot (20)

Pagsusuri ng Maikling Kuwento Impeng Negro Talabong Danica V.
Pagsusuri ng Maikling Kuwento Impeng Negro Talabong Danica V.Pagsusuri ng Maikling Kuwento Impeng Negro Talabong Danica V.
Pagsusuri ng Maikling Kuwento Impeng Negro Talabong Danica V.
 
Spanish Colonial Text
Spanish Colonial TextSpanish Colonial Text
Spanish Colonial Text
 
PRELIM --FIL 211. INTRODUKSIYON SA PAMAMAHAYAG.pdf
PRELIM --FIL 211. INTRODUKSIYON SA PAMAMAHAYAG.pdfPRELIM --FIL 211. INTRODUKSIYON SA PAMAMAHAYAG.pdf
PRELIM --FIL 211. INTRODUKSIYON SA PAMAMAHAYAG.pdf
 
Katamaran ng Filipino
Katamaran ng FilipinoKatamaran ng Filipino
Katamaran ng Filipino
 
Register Bilang VARAYTI NG WIKA
Register Bilang VARAYTI NG WIKARegister Bilang VARAYTI NG WIKA
Register Bilang VARAYTI NG WIKA
 
PAGSUSURI SA MGA AKDANG MAPANGHIMAGSIK SA PANITIKANG FILIPINO
PAGSUSURI SA MGA AKDANG MAPANGHIMAGSIK SA  PANITIKANG FILIPINOPAGSUSURI SA MGA AKDANG MAPANGHIMAGSIK SA  PANITIKANG FILIPINO
PAGSUSURI SA MGA AKDANG MAPANGHIMAGSIK SA PANITIKANG FILIPINO
 
Mga patakarang pang ekonomiya
Mga patakarang pang ekonomiyaMga patakarang pang ekonomiya
Mga patakarang pang ekonomiya
 
Rehiyon 2: Lambak ng Cagayan
Rehiyon 2: Lambak ng CagayanRehiyon 2: Lambak ng Cagayan
Rehiyon 2: Lambak ng Cagayan
 
Pa nahon ng aktibismo
Pa nahon ng aktibismoPa nahon ng aktibismo
Pa nahon ng aktibismo
 
BANYAGA akda ni liwayway arceo
BANYAGA  akda ni liwayway arceoBANYAGA  akda ni liwayway arceo
BANYAGA akda ni liwayway arceo
 
Halimbawa ng pagsasaling wika
Halimbawa ng pagsasaling wikaHalimbawa ng pagsasaling wika
Halimbawa ng pagsasaling wika
 
Gay Lingo-isang pananaliksik
Gay Lingo-isang pananaliksikGay Lingo-isang pananaliksik
Gay Lingo-isang pananaliksik
 
Panitikang bayan
Panitikang bayanPanitikang bayan
Panitikang bayan
 
Sintaks
SintaksSintaks
Sintaks
 
Kasaysayan ng panitikan
Kasaysayan ng panitikanKasaysayan ng panitikan
Kasaysayan ng panitikan
 
AP 5 PPT Q3 W3 - Impluwensya ng Kulturang Espanyol sa Wika at Panitikan ng Ku...
AP 5 PPT Q3 W3 - Impluwensya ng Kulturang Espanyol sa Wika at Panitikan ng Ku...AP 5 PPT Q3 W3 - Impluwensya ng Kulturang Espanyol sa Wika at Panitikan ng Ku...
AP 5 PPT Q3 W3 - Impluwensya ng Kulturang Espanyol sa Wika at Panitikan ng Ku...
 
Mga Simbolismo sa El Filibusterismo
Mga Simbolismo sa El FilibusterismoMga Simbolismo sa El Filibusterismo
Mga Simbolismo sa El Filibusterismo
 
Ortograpiyang pambansa
Ortograpiyang pambansaOrtograpiyang pambansa
Ortograpiyang pambansa
 
Hulyo 4, 1954 A.D.
Hulyo 4, 1954 A.D.Hulyo 4, 1954 A.D.
Hulyo 4, 1954 A.D.
 
Panahon ng-hapon
Panahon ng-haponPanahon ng-hapon
Panahon ng-hapon
 

Similar to CPSC 125 Ch 3 Sec 4 6

PERMUTATION-COMBINATION.pdf
PERMUTATION-COMBINATION.pdfPERMUTATION-COMBINATION.pdf
PERMUTATION-COMBINATION.pdf
EarlRetalesFigueroa
 
Permutations and-combinations-maths
Permutations and-combinations-mathsPermutations and-combinations-maths
Permutations and-combinations-mathsMurugan Iron
 
Notes on permutations and combinations
Notes on permutations and combinationsNotes on permutations and combinations
Notes on permutations and combinations
adeelashiq
 
Permutation Combination
Permutation Combination Permutation Combination
Permutation Combination
RizwanManzoor15
 
permutations power point
permutations power pointpermutations power point
permutations power point
Aldrin Balenton
 
Lecture Week 17 which hleps in study for logic and
Lecture Week 17 which hleps in study for logic andLecture Week 17 which hleps in study for logic and
Lecture Week 17 which hleps in study for logic and
manishhmishra001
 
Permutation
PermutationPermutation
Permutation
Damone Odrale
 
Permutations
PermutationsPermutations
Permutations
DINAVILLANUEVA3
 
counting principle.ppt
counting principle.pptcounting principle.ppt
counting principle.ppt
RizaCatli2
 
Permutation and combination
Permutation and combinationPermutation and combination
Permutation and combination
Shwetha Pejathaya
 
Lecture #2: Algorithmic Combinatorics I "#FOSCS301"
Lecture #2: Algorithmic Combinatorics I "#FOSCS301"Lecture #2: Algorithmic Combinatorics I "#FOSCS301"
Lecture #2: Algorithmic Combinatorics I "#FOSCS301"
Ahmed M. H. Abdel-Fattah
 
Permutation & Combination
Permutation & CombinationPermutation & Combination
Permutation & Combination
Puru Agrawal
 
05 Probability Mar9
05 Probability Mar905 Probability Mar9
05 Probability Mar9ingroy
 
Chapter-3-Sample-Space-of-Experiment.pdf
Chapter-3-Sample-Space-of-Experiment.pdfChapter-3-Sample-Space-of-Experiment.pdf
Chapter-3-Sample-Space-of-Experiment.pdf
JuliusBoitizon
 
Permutation & combination
Permutation & combinationPermutation & combination
Permutation & combination
APEX INSTITUTE
 
PRINCIPLES OF COUNTING AND THEORIES OF PROBABILITY.pptx
PRINCIPLES OF COUNTING AND THEORIES OF PROBABILITY.pptxPRINCIPLES OF COUNTING AND THEORIES OF PROBABILITY.pptx
PRINCIPLES OF COUNTING AND THEORIES OF PROBABILITY.pptx
tmccfrancisquarre
 
lecture_4cxsadaseeegsuiiiiiiiiiiiiii.ppt
lecture_4cxsadaseeegsuiiiiiiiiiiiiii.pptlecture_4cxsadaseeegsuiiiiiiiiiiiiii.ppt
lecture_4cxsadaseeegsuiiiiiiiiiiiiii.ppt
ma6095985
 
Permutation combination
Permutation combinationPermutation combination
Permutation combination
lovemucheca
 
Day 2 - Permutations and Combinations.ppt
Day 2 - Permutations and Combinations.pptDay 2 - Permutations and Combinations.ppt
Day 2 - Permutations and Combinations.ppt
SherleenMamuri1
 

Similar to CPSC 125 Ch 3 Sec 4 6 (20)

PERMUTATION-COMBINATION.pdf
PERMUTATION-COMBINATION.pdfPERMUTATION-COMBINATION.pdf
PERMUTATION-COMBINATION.pdf
 
Permutations and-combinations-maths
Permutations and-combinations-mathsPermutations and-combinations-maths
Permutations and-combinations-maths
 
Notes on permutations and combinations
Notes on permutations and combinationsNotes on permutations and combinations
Notes on permutations and combinations
 
Permutation Combination
Permutation Combination Permutation Combination
Permutation Combination
 
permutations power point
permutations power pointpermutations power point
permutations power point
 
Lecture Week 17 which hleps in study for logic and
Lecture Week 17 which hleps in study for logic andLecture Week 17 which hleps in study for logic and
Lecture Week 17 which hleps in study for logic and
 
Permutation
PermutationPermutation
Permutation
 
Em08 ect
Em08 ectEm08 ect
Em08 ect
 
Permutations
PermutationsPermutations
Permutations
 
counting principle.ppt
counting principle.pptcounting principle.ppt
counting principle.ppt
 
Permutation and combination
Permutation and combinationPermutation and combination
Permutation and combination
 
Lecture #2: Algorithmic Combinatorics I "#FOSCS301"
Lecture #2: Algorithmic Combinatorics I "#FOSCS301"Lecture #2: Algorithmic Combinatorics I "#FOSCS301"
Lecture #2: Algorithmic Combinatorics I "#FOSCS301"
 
Permutation & Combination
Permutation & CombinationPermutation & Combination
Permutation & Combination
 
05 Probability Mar9
05 Probability Mar905 Probability Mar9
05 Probability Mar9
 
Chapter-3-Sample-Space-of-Experiment.pdf
Chapter-3-Sample-Space-of-Experiment.pdfChapter-3-Sample-Space-of-Experiment.pdf
Chapter-3-Sample-Space-of-Experiment.pdf
 
Permutation & combination
Permutation & combinationPermutation & combination
Permutation & combination
 
PRINCIPLES OF COUNTING AND THEORIES OF PROBABILITY.pptx
PRINCIPLES OF COUNTING AND THEORIES OF PROBABILITY.pptxPRINCIPLES OF COUNTING AND THEORIES OF PROBABILITY.pptx
PRINCIPLES OF COUNTING AND THEORIES OF PROBABILITY.pptx
 
lecture_4cxsadaseeegsuiiiiiiiiiiiiii.ppt
lecture_4cxsadaseeegsuiiiiiiiiiiiiii.pptlecture_4cxsadaseeegsuiiiiiiiiiiiiii.ppt
lecture_4cxsadaseeegsuiiiiiiiiiiiiii.ppt
 
Permutation combination
Permutation combinationPermutation combination
Permutation combination
 
Day 2 - Permutations and Combinations.ppt
Day 2 - Permutations and Combinations.pptDay 2 - Permutations and Combinations.ppt
Day 2 - Permutations and Combinations.ppt
 

More from David Wood

Internet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchainInternet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchain
David Wood
 
Returning to Online Privacy?
Returning to Online Privacy?Returning to Online Privacy?
Returning to Online Privacy?
David Wood
 
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
David Wood
 
BlockSW 2019 Keynote
BlockSW 2019 KeynoteBlockSW 2019 Keynote
BlockSW 2019 Keynote
David Wood
 
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
David Wood
 
Privacy in the Smart City
Privacy in the Smart CityPrivacy in the Smart City
Privacy in the Smart City
David Wood
 
Controlling Complexities in Software Development
Controlling Complexities in Software DevelopmentControlling Complexities in Software Development
Controlling Complexities in Software Development
David Wood
 
Privacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsPrivacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable Claims
David Wood
 
Implementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelImplementing the Verifiable Claims data model
Implementing the Verifiable Claims data model
David Wood
 
So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301
David Wood
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601
David Wood
 
When Metaphors Kill
When Metaphors KillWhen Metaphors Kill
When Metaphors Kill
David Wood
 
Secularism in Australia
Secularism in AustraliaSecularism in Australia
Secularism in Australia
David Wood
 
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsMeditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsDavid Wood
 
Building a writer's platform with social media
Building a writer's platform with social mediaBuilding a writer's platform with social media
Building a writer's platform with social media
David Wood
 
Summary of the Hero's Journey
Summary of the Hero's JourneySummary of the Hero's Journey
Summary of the Hero's Journey
David Wood
 
Open by Default
Open by DefaultOpen by Default
Open by Default
David Wood
 
Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926David Wood
 
Linked Data ROI 20110426
Linked Data ROI 20110426Linked Data ROI 20110426
Linked Data ROI 20110426
David Wood
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesDavid Wood
 

More from David Wood (20)

Internet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchainInternet of Things (IoT) two-factor authentication using blockchain
Internet of Things (IoT) two-factor authentication using blockchain
 
Returning to Online Privacy?
Returning to Online Privacy?Returning to Online Privacy?
Returning to Online Privacy?
 
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
Methods for Securing Spacecraft Tasking and Control via an Enterprise Ethereu...
 
BlockSW 2019 Keynote
BlockSW 2019 KeynoteBlockSW 2019 Keynote
BlockSW 2019 Keynote
 
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
Returning to Online Privacy - W3C/ANU Future of the Web Roadshow 20190221
 
Privacy in the Smart City
Privacy in the Smart CityPrivacy in the Smart City
Privacy in the Smart City
 
Controlling Complexities in Software Development
Controlling Complexities in Software DevelopmentControlling Complexities in Software Development
Controlling Complexities in Software Development
 
Privacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable ClaimsPrivacy Concerns related to Verifiable Claims
Privacy Concerns related to Verifiable Claims
 
Implementing the Verifiable Claims data model
Implementing the Verifiable Claims data modelImplementing the Verifiable Claims data model
Implementing the Verifiable Claims data model
 
So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301So You Wanna be a Startup CTO 20170301
So You Wanna be a Startup CTO 20170301
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601
 
When Metaphors Kill
When Metaphors KillWhen Metaphors Kill
When Metaphors Kill
 
Secularism in Australia
Secularism in AustraliaSecularism in Australia
Secularism in Australia
 
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and PleonasmsMeditations on Writing in Paradoxes, Oxymorons, and Pleonasms
Meditations on Writing in Paradoxes, Oxymorons, and Pleonasms
 
Building a writer's platform with social media
Building a writer's platform with social mediaBuilding a writer's platform with social media
Building a writer's platform with social media
 
Summary of the Hero's Journey
Summary of the Hero's JourneySummary of the Hero's Journey
Summary of the Hero's Journey
 
Open by Default
Open by DefaultOpen by Default
Open by Default
 
Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926Lod Then, Now and Next 20110926
Lod Then, Now and Next 20110926
 
Linked Data ROI 20110426
Linked Data ROI 20110426Linked Data ROI 20110426
Linked Data ROI 20110426
 
Introduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF VocabulariesIntroduction to Linked Data: RDF Vocabularies
Introduction to Linked Data: RDF Vocabularies
 

Recently uploaded

De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 

Recently uploaded (20)

De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 

CPSC 125 Ch 3 Sec 4 6

  • 1. Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co. w/modifications by D. Hyland-Wood, UMW Set, Combinatorics, Probability & Number Theory Thursday, March 11, 2010
  • 2. Permutations ● An ordered arrangement of objects is called a permutation. ■ Hence, a permutation of n distinct elements is an ordering of these n elements. ● It is denoted by P(n,r) or nPr. ● Ordering of last four digits of a telephone number if digits are allowed to repeat ■ 10*10*10*10 = 10000 ■ Ordering of four digits if repetition is not allowed = 10*9*8*7 = 5040 = 10!/6! where n! = n*(n-1)*(n-2)*….*3*2*1 and by definition 0! = 1 ● Hence, mathematically, for r ≤ n, an r-permutation from n objects is defined by ● P(n,r) = n*(n-1)*(n-2)*…..*(n-r+1) ⇒ P(n,r) = for 0 ≤ r ≤ n ● Hence, P(10,4) = 10! / (10-4)! = 10!/6! = 5040 Section 3.4 Permutations and Combinations 2 Thursday, March 11, 2010
  • 3. Permutations: Some special cases ● P(n,0) = n! / n! = 1 ● This means that there is only one ordered arrangement of 0 objects, called the empty set. ● P(n,1) = n!/ (n-1)! = n ● There are n ordered arrangements of one object (i.e. n ways of selecting one object from n objects). ● P(n,n) = n!/(n-n)! = n!/0! = n! ● This means that one can arrange n distinct objects in n! ways, that is nothing but the multiplication principle. Section 3.4 Permutations and Combinations 3 Thursday, March 11, 2010
  • 4. Permutation Examples 1. Ten athletes compete in an Olympic event. Gold, silver and bronze medals are awarded to the first three in the event, respectively. How many ways can the awards be presented? 2. How many ways can six people be seated on six chairs? 3. How many permutations of the letters ABCDEF contain the letters DEF together in any order? 4. The professor’s dilemma: how to arrange four books on OS, seven on programming, and three on data structures on a shelf such that books on the same subject must be together? Section 3.4 Permutations and Combinations 4 Thursday, March 11, 2010
  • 5. Permutation Examples 1. Ten athletes compete in an Olympic event. Gold, silver and bronze medals are awarded to the first three in the event, respectively. How many ways can the awards be presented? Hence, 3 objects from a pool of 10 = P(10,3) = 720 2. How many ways can six people be seated on six chairs? 3. How many permutations of the letters ABCDEF contain the letters DEF together in any order? 4. The professor’s dilemma: how to arrange four books on OS, seven on programming, and three on data structures on a shelf such that books on the same subject must be together? Section 3.4 Permutations and Combinations 4 Thursday, March 11, 2010
  • 6. Permutation Examples 1. Ten athletes compete in an Olympic event. Gold, silver and bronze medals are awarded to the first three in the event, respectively. How many ways can the awards be presented? Hence, 3 objects from a pool of 10 = P(10,3) = 720 2. How many ways can six people be seated on six chairs? P(6,6) = 6! = 720 3. How many permutations of the letters ABCDEF contain the letters DEF together in any order? 4. The professor’s dilemma: how to arrange four books on OS, seven on programming, and three on data structures on a shelf such that books on the same subject must be together? Section 3.4 Permutations and Combinations 4 Thursday, March 11, 2010
  • 7. Permutation Examples 1. Ten athletes compete in an Olympic event. Gold, silver and bronze medals are awarded to the first three in the event, respectively. How many ways can the awards be presented? Hence, 3 objects from a pool of 10 = P(10,3) = 720 2. How many ways can six people be seated on six chairs? P(6,6) = 6! = 720 3. How many permutations of the letters ABCDEF contain the letters DEF together in any order? If DEF is considered as one letter, then we have 4 letters A B C DEF which can be permuted in 4! ways, DEF can be ordered by its letters in 3! ways. Hence, by the multiplication principle, total number of orderings possible = 4!*3! = 24*6 = 144. 4. The professor’s dilemma: how to arrange four books on OS, seven on programming, and three on data structures on a shelf such that books on the same subject must be together? Section 3.4 Permutations and Combinations 4 Thursday, March 11, 2010
  • 8. Permutation Examples 1. Ten athletes compete in an Olympic event. Gold, silver and bronze medals are awarded to the first three in the event, respectively. How many ways can the awards be presented? Hence, 3 objects from a pool of 10 = P(10,3) = 720 2. How many ways can six people be seated on six chairs? P(6,6) = 6! = 720 3. How many permutations of the letters ABCDEF contain the letters DEF together in any order? If DEF is considered as one letter, then we have 4 letters A B C DEF which can be permuted in 4! ways, DEF can be ordered by its letters in 3! ways. Hence, by the multiplication principle, total number of orderings possible = 4!*3! = 24*6 = 144. 4. The professor’s dilemma: how to arrange four books on OS, seven on programming, and three on data structures on a shelf such that books on the same subject must be together? (4!*7!*3*)*3! = 24*5040*6*6 = 4,354,560 Section 3.4 Permutations and Combinations 4 Thursday, March 11, 2010
  • 9. Combinations ● When order in permutations becomes immaterial, i.e. we are just interested in selecting r objects from n distinct objects, we talk of combinations denoted by C(n,r) or nCr ● For each combination, there are r! ways of ordering those r chosen objects ● Hence, from multiplication principle, ● C(n,r)* r! = P(n,r) ⇒ ■ Note: C(n,r) is much smaller than P(n,r) as seen from the graphs below: Section 3.4 Permutations and Combinations 5 Thursday, March 11, 2010
  • 10. Combinations: Special Cases ● C(n,0) = 1 ● Only one way to choose 0 objects from n objects- chose the empty set ● C(n,1) = n ● Obvious, since n ways to choose one object from n objects ● C(n,n) = 1 ● Only one way to choose n objects from n objects Section 3.4 Permutations and Combinations 6 Thursday, March 11, 2010
  • 11. Combinations: Examples ● How many ways can we select a committee of three from 10? ● How many ways can a committee of two women and three men be selected from a group of five different women and six different men? ● How many five-card poker hands can be dealt from a standard 52-card deck? ● How many poker hands contain cards all of the same suit? ● How many poker hands contain three cards of one denomination and two cards of another denomination? Section 3.4 Permutations and Combinations 7 Thursday, March 11, 2010
  • 12. Combinations: Examples ● How many ways can we select a committee of three from 10? C(10,3) = 120 ● How many ways can a committee of two women and three men be selected from a group of five different women and six different men? ● How many five-card poker hands can be dealt from a standard 52-card deck? ● How many poker hands contain cards all of the same suit? ● How many poker hands contain three cards of one denomination and two cards of another denomination? Section 3.4 Permutations and Combinations 7 Thursday, March 11, 2010
  • 13. Combinations: Examples ● How many ways can we select a committee of three from 10? C(10,3) = 120 ● How many ways can a committee of two women and three men be selected from a group of five different women and six different men? For selecting two out of five women, we have C(5,2) ways = 10. For selecting three out of six men, we have C(6,3) ways = 20. Total number of ways for selecting the committee = 10*20 = 200 ● How many five-card poker hands can be dealt from a standard 52-card deck? ● How many poker hands contain cards all of the same suit? ● How many poker hands contain three cards of one denomination and two cards of another denomination? Section 3.4 Permutations and Combinations 7 Thursday, March 11, 2010
  • 14. Combinations: Examples ● How many ways can we select a committee of three from 10? C(10,3) = 120 ● How many ways can a committee of two women and three men be selected from a group of five different women and six different men? For selecting two out of five women, we have C(5,2) ways = 10. For selecting three out of six men, we have C(6,3) ways = 20. Total number of ways for selecting the committee = 10*20 = 200 ● How many five-card poker hands can be dealt from a standard 52-card deck? C(52,5) = 2,598,960 ● How many poker hands contain cards all of the same suit? ● How many poker hands contain three cards of one denomination and two cards of another denomination? Section 3.4 Permutations and Combinations 7 Thursday, March 11, 2010
  • 15. Combinations: Examples ● How many ways can we select a committee of three from 10? C(10,3) = 120 ● How many ways can a committee of two women and three men be selected from a group of five different women and six different men? For selecting two out of five women, we have C(5,2) ways = 10. For selecting three out of six men, we have C(6,3) ways = 20. Total number of ways for selecting the committee = 10*20 = 200 ● How many five-card poker hands can be dealt from a standard 52-card deck? C(52,5) = 2,598,960 ● How many poker hands contain cards all of the same suit? 4*C(13,5) = 5148 ● How many poker hands contain three cards of one denomination and two cards of another denomination? Section 3.4 Permutations and Combinations 7 Thursday, March 11, 2010
  • 16. Combinations: Examples ● How many ways can we select a committee of three from 10? C(10,3) = 120 ● How many ways can a committee of two women and three men be selected from a group of five different women and six different men? For selecting two out of five women, we have C(5,2) ways = 10. For selecting three out of six men, we have C(6,3) ways = 20. Total number of ways for selecting the committee = 10*20 = 200 ● How many five-card poker hands can be dealt from a standard 52-card deck? C(52,5) = 2,598,960 ● How many poker hands contain cards all of the same suit? 4*C(13,5) = 5148 ● How many poker hands contain three cards of one denomination and two cards of another denomination? Order of events: Select first denomination, select three cards from this denomination, select the second denomination, select two cards from this denomination 13*C(4,3)*12*C(4,2) = 3744. Section 3.4 Permutations and Combinations 7 Thursday, March 11, 2010
  • 17. Combinations: Examples ● How many routes are there from the lower-left corner of an n by n square grid to the upper-right corner if we are restricted to traveling only to the right (R) or upward (U)? Consider a 4×4 grid. Total steps required to get from A to B is 8. This can be a mixture of R’s and U’s as shown by the two paths in green and red above. So, 4 R’s and 4 U’s are required but the order is in which step is taken when is not important. ● In how many ways can three athletes be declared winners from a group of 10 athletes who compete in an Olympic event? Section 3.4 Permutations and Combinations 8 Thursday, March 11, 2010
  • 18. Combinations: Examples ● How many routes are there from the lower-left corner of an n by n square grid to the upper-right corner if we are restricted to traveling only to the right (R) or upward (U)? Consider a 4×4 grid. Total steps required to get from A to B is 8. This can be a mixture of R’s and U’s as shown by the two paths in green and red above. So, 4 R’s and 4 U’s are required but the order is in which step is taken when is not important. So, basically, we are selecting four objects from eight that can be done in C(8,4) ways. For an n×n grid, one can form C(2n,n) such routes to go from lower-left to the upper-right corner. ● In how many ways can three athletes be declared winners from a group of 10 athletes who compete in an Olympic event? Section 3.4 Permutations and Combinations 8 Thursday, March 11, 2010
  • 19. Combinations: Examples ● How many routes are there from the lower-left corner of an n by n square grid to the upper-right corner if we are restricted to traveling only to the right (R) or upward (U)? Consider a 4×4 grid. Total steps required to get from A to B is 8. This can be a mixture of R’s and U’s as shown by the two paths in green and red above. So, 4 R’s and 4 U’s are required but the order is in which step is taken when is not important. So, basically, we are selecting four objects from eight that can be done in C(8,4) ways. For an n×n grid, one can form C(2n,n) such routes to go from lower-left to the upper-right corner. ● In how many ways can three athletes be declared winners from a group of 10 athletes who compete in an Olympic event? C(10,3) = 120 (much less than to award three winners medals) Section 3.4 Permutations and Combinations 8 Thursday, March 11, 2010
  • 20. Eliminating Duplicates ● How many ways can a committee of two be chosen from four men and three women and it must include at least one man. ● How many distinct permutations can be made from the characters in the word FLORIDA? ● How many distinct permutations can be made from the characters in the word MISSISSIPPI? Section 3.4 Permutations and Combinations 9 Thursday, March 11, 2010
  • 21. Eliminating Duplicates ● How many ways can a committee of two be chosen from four men and three women and it must include at least one man. ● How many distinct permutations can be made from the characters in the word FLORIDA? ● How many distinct permutations can be made from the characters in the word MISSISSIPPI? Section 3.4 Permutations and Combinations 9 Thursday, March 11, 2010
  • 22. Eliminating Duplicates ● How many ways can a committee of two be chosen from four men and three women and it must include at least one man. Incorrect and impulsive answer = C(4,1)*C(6,1) Correct answer = C(7,2) – C(3,2) = C(4,1)*C(6,1) – C(4,2) C(4,2) is the number of committees with two men on it. It has to be subtracted since we are counting it twice in C(4,1)*C(6,1). C(7,2) = all committees possible C(3,2) = all committees with no men on it ● How many distinct permutations can be made from the characters in the word FLORIDA? ● How many distinct permutations can be made from the characters in the word MISSISSIPPI? Section 3.4 Permutations and Combinations 9 Thursday, March 11, 2010
  • 23. Eliminating Duplicates ● How many ways can a committee of two be chosen from four men and three women and it must include at least one man. Incorrect and impulsive answer = C(4,1)*C(6,1) Correct answer = C(7,2) – C(3,2) = C(4,1)*C(6,1) – C(4,2) C(4,2) is the number of committees with two men on it. It has to be subtracted since we are counting it twice in C(4,1)*C(6,1). C(7,2) = all committees possible C(3,2) = all committees with no men on it ● How many distinct permutations can be made from the characters in the word FLORIDA? Simple: 7! ● How many distinct permutations can be made from the characters in the word MISSISSIPPI? Section 3.4 Permutations and Combinations 9 Thursday, March 11, 2010
  • 24. Eliminating Duplicates ● How many ways can a committee of two be chosen from four men and three women and it must include at least one man. Incorrect and impulsive answer = C(4,1)*C(6,1) Correct answer = C(7,2) – C(3,2) = C(4,1)*C(6,1) – C(4,2) C(4,2) is the number of committees with two men on it. It has to be subtracted since we are counting it twice in C(4,1)*C(6,1). C(7,2) = all committees possible C(3,2) = all committees with no men on it ● How many distinct permutations can be made from the characters in the word FLORIDA? Simple: 7! ● How many distinct permutations can be made from the characters in the word MISSISSIPPI? Since we have more than one S, interchanging the S’s at the same position will not result in a distinguishable change. Hence for four S’s, 4! possible permutations that look alike. Hence total number of permutations = Section 3.4 Permutations and Combinations 9 Thursday, March 11, 2010
  • 25. Summary of Counting Techniques You want to count the number of… Technique to try: Subsets of an n-element set Use formula 2n Outcomes of successive events Multiply the number of outcomes for each event. Outcomes of disjoint events Add the number of outcomes for each event. Outcomes of specific choices at each step Draw a decision tree and count the number of paths. Elements in overlapping sections of related Use principle of inclusion and exclusion sets formula Ordered arrangements of r out of n distinct Use P(n,r) formula objects Ways to select r out of n distinct objects Use C(n,r) formula Ways to select r out of n distinct objects Use C(r+n-1, r) formula with repetition allowed Section 3.4 Permutations and Combinations 10 Thursday, March 11, 2010 Table 3.2, page 241 in your text.
  • 26. Class Exercises ● How many permutations of the characters in the word COMPUTER are there? How many of these end in a vowel? ● How many distinct permutations of the characters in ERROR are there? ● In how many ways can you seat 11 men and eight women in a row if no two women are to sit together? ● A set of four coins is selected from a box containing five dimes and seven quarters. ● Find the number of sets which has two dimes and two quarters. ● Find the number of sets composed of all dimes or all quarters. Section 3.4 Permutations and Combinations 11 Thursday, March 11, 2010
  • 27. Class Exercises ● How many permutations of the characters in the word COMPUTER are there? How many of these end in a vowel? 8! 3.7! ● How many distinct permutations of the characters in ERROR are there? ● In how many ways can you seat 11 men and eight women in a row if no two women are to sit together? ● A set of four coins is selected from a box containing five dimes and seven quarters. ● Find the number of sets which has two dimes and two quarters. ● Find the number of sets composed of all dimes or all quarters. Section 3.4 Permutations and Combinations 11 Thursday, March 11, 2010
  • 28. Class Exercises ● How many permutations of the characters in the word COMPUTER are there? How many of these end in a vowel? 8! 3.7! ● How many distinct permutations of the characters in ERROR are there? 5!/3! ● In how many ways can you seat 11 men and eight women in a row if no two women are to sit together? ● A set of four coins is selected from a box containing five dimes and seven quarters. ● Find the number of sets which has two dimes and two quarters. ● Find the number of sets composed of all dimes or all quarters. Section 3.4 Permutations and Combinations 11 Thursday, March 11, 2010
  • 29. Class Exercises ● How many permutations of the characters in the word COMPUTER are there? How many of these end in a vowel? 8! 3.7! ● How many distinct permutations of the characters in ERROR are there? 5!/3! ● In how many ways can you seat 11 men and eight women in a row if no two women are to sit together? 11!*C(12,8)*8! ● A set of four coins is selected from a box containing five dimes and seven quarters. ● Find the number of sets which has two dimes and two quarters. ● Find the number of sets composed of all dimes or all quarters. Section 3.4 Permutations and Combinations 11 Thursday, March 11, 2010
  • 30. Class Exercises ● How many permutations of the characters in the word COMPUTER are there? How many of these end in a vowel? 8! 3.7! ● How many distinct permutations of the characters in ERROR are there? 5!/3! ● In how many ways can you seat 11 men and eight women in a row if no two women are to sit together? 11!*C(12,8)*8! ● A set of four coins is selected from a box containing five dimes and seven quarters. C(5,2)*C(7,2) = 10*21 = 210 ● Find the number of sets which has two dimes and two quarters. ● Find the number of sets composed of all dimes or all quarters. Section 3.4 Permutations and Combinations 11 Thursday, March 11, 2010
  • 31. Class Exercises ● How many permutations of the characters in the word COMPUTER are there? How many of these end in a vowel? 8! 3.7! ● How many distinct permutations of the characters in ERROR are there? 5!/3! ● In how many ways can you seat 11 men and eight women in a row if no two women are to sit together? 11!*C(12,8)*8! ● A set of four coins is selected from a box containing five dimes and seven quarters. C(5,2)*C(7,2) = 10*21 = 210 ● Find the number of sets which has two dimes and two quarters. C(5,4) + C(7,4) = 5 + 35 = 40 ● Find the number of sets composed of all dimes or all quarters. Section 3.4 Permutations and Combinations 11 Thursday, March 11, 2010
  • 32. Class Exercises ● How many permutations of the characters in the word COMPUTER are there? How many of these end in a vowel? 8! 3.7! ● How many distinct permutations of the characters in ERROR are there? 5!/3! ● In how many ways can you seat 11 men and eight women in a row if no two women are to sit together? 11!*C(12,8)*8! ● A set of four coins is selected from a box containing five dimes and seven quarters. C(5,2)*C(7,2) = 10*21 = 210 ● Find the number of sets which has two dimes and two quarters. C(5,4) + C(7,4) = 5 + 35 = 40 ● Find the number of sets composed of all dimes or all quarters. C(7,3)*C(5,1) + C(7,4) = 210 Section 3.4 Permutations and Combinations 11 Thursday, March 11, 2010
  • 33. Set, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Section 3.6 Binomial Theorem Thursday, March 11, 2010
  • 34. Pascal’s Triangle ● Consider the following expressions for the binomials: (a + b)0 = 1 (a + b)1 = a + b (a + b)2 = a2 + 2ab + b2 (a + b)3 = a3 + 3a2b + 3ab2 + b3 (a + b)4 = a4 + 4a3b + 6a2b2 + 4ab3 + b4 ● Row n of the triangle (n ≥ 0) consists of all the values C(n, r) for 0 ≤ r ≤ n. Thus, the Pascal’s looks like this: Row C(0,0) 0 C(1,0) C(1,1) 1 C(2,0) C(2,1) C(2,2) 2 C(3,0) C(3,1) C(3,2) C(3,3) 3 C(4,0) C(4,1) C(4,2) C(4,3) C(4,4) 4 C(5,0) C(5,1) C(5,2) C(5,3) C(5,4) C(5,5) 5 C(n,0) C(n,1) ….………… C(n,n−1) C(n,n) n Section 3.6 Binomial Theorem 13 Thursday, March 11, 2010
  • 35. Pascal’s Triangle ● The Pascal’s triangle can be written as: C(0,0) C(1,0) C(1,1) C(2,0) C(2,1) C(2,2) C(3,0) C(3,1) C(3,2) C(3,3) C(4,0) C(4,1) C(4,2) C(4,3) C(4,4) C(5,0) C(5,1) C(5,2) C(5,3) C(5,4) C(5,5) ...... ………. C(n,0) C(n,1) ………. C(n,n − 1) C(n,n) ● We note that C(n,k) = C(n − 1,k − 1) + C(n − 1,k) for 1≤ k ≤ n − 1 ● Can be proved simply by expanding the right hand side and simplifying. Section 3.6 Binomial Theorem 14 Thursday, March 11, 2010
  • 36. Pascal’s Triangle Coefficients Power 0 0 1 1 1 1 2 1 2 1 3 3 1 3 1 4 6 4 1 4 1 5 10 10 5 1 5 Section 3.6 Binomial Theorem 15 Thursday, March 11, 2010
  • 37. Binomial Theorem ● The binomial theorem provides us with a formula for the expansion of (a + b)n. ● It states that for every nonnegative integer n: ● The terms C(n,k) in the above series is called the binomial coefficient. ● Binomial theorem can be proved using mathematical induction. Section 3.6 Binomial Theorem 16 Thursday, March 11, 2010
  • 38. Exercises ● Expand (x + 1)5 using the binomial theorem C(5,0)x5 + C(5,1)x4 + C(5,2)x3 + C(5,3)x4 + C(5,4)x1 + C(5,0)x0 ● Expand (x − 3)4 using the binomial theorem ● What is the fifth term of (3a + 2b)7 ● What is the coefficient of x5y2z2 in the expansion of (x + y + 2z)9 ? ● Use binomial theorem to prove that: C(n,0) – C(n,1) + C(n,2) - …….+ (-1)nC(n,n) = 0 Section 3.6 Binomial Theorem 17 Thursday, March 11, 2010