Upcoming SlideShare
×

# 5.4 trees and factorials

826 views

Published on

Published in: Technology, Business
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

Views
Total views
826
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
0
0
Likes
0
Embeds 0
No embeds

No notes for slide

### 5.4 trees and factorials

1. 1. Trees and Factorials
2. 2. Trees and FactorialsA job (or an experiment) that requires the completion ofmany steps is called a multi-step job.
3. 3. Trees and FactorialsA job (or an experiment) that requires the completion ofmany steps is called a multi-step job. For example, to make acheese omelet,
4. 4. Trees and FactorialsA job (or an experiment) that requires the completion ofmany steps is called a multi-step job. For example, to make acheese omelet, we need to (a simplified version):3. get the eggs,
5. 5. Trees and FactorialsA job (or an experiment) that requires the completion ofmany steps is called a multi-step job. For example, to make acheese omelet, we need to (a simplified version):3. get the eggs,4. get the cheese,
6. 6. Trees and FactorialsA job (or an experiment) that requires the completion ofmany steps is called a multi-step job. For example, to make acheese omelet, we need to (a simplified version):3. get the eggs,4. get the cheese,3. cook the omelet.
7. 7. Trees and FactorialsA job (or an experiment) that requires the completion ofmany steps is called a multi-step job. For example, to make acheese omelet, we need to (a simplified version):3. get the eggs,4. get the cheese,3. cook the omelet.So for the job of making a cheese omelet may be viewed asa three-step job.
8. 8. Trees and FactorialsEach step may have different options for how it can be carriedout.
9. 9. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs,
10. 10. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs, the options might be:• get them from the refrig.
11. 11. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs, the options might be:• get them from the refrigerator• get them from the store
12. 12. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs, the options might be:• get them from the refrigerator• get them from the store• get them from Joe, the neighbor
13. 13. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs, the options might be:• get them from the refrigerator• get them from the store• get them from Joe, the neighborTo get the cheese (assuming we have none):
14. 14. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs, the options might be:• get them from the refrigerator• get them from the store• get them from Joe, the neighborTo get the cheese (assuming we have none):• get it from the store
15. 15. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs, the options might be:• get them from the refrigerator• get them from the store• get them from Joe, the neighborTo get the cheese (assuming we have none):• get it from the store• get it from Joe, the neighbor
16. 16. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs, the options might be:• get them from the refrigerator• get them from the store• get them from Joe, the neighborTo get the cheese (assuming we have none):• get it from the store• get it from Joe, the neighborTo cook it:
17. 17. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs, the options might be:• get them from the refrigerator• get them from the store• get them from Joe, the neighborTo get the cheese (assuming we have none):• get it from the store• get it from Joe, the neighborTo cook it:• do it over our stove
18. 18. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs, the options might be:• get them from the refrigerator• get them from the store• get them from Joe, the neighborTo get the cheese (assuming we have none):• get it from the store• get it from Joe, the neighborTo cook it:• do it over our stove• do it over Joe’s stove
19. 19. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs, the options might be:• get them from the refrigerator• get them from the store• get them from Joe, the neighborTo get the cheese (assuming we have none):• get it from the store• get it from Joe, the neighborTo cook it:• do it over our stove• do it over Joe’s stoveThe different ways the omelet job may be completed can berepresent by a “tree”.
20. 20. Trees and FactorialsEach step may have different options for how it can be carriedout. For example, to get the eggs, the options might be:• get them from the refrigerator• get them from the store• get them from Joe, the neighborTo get the cheese (assuming we have none):• get it from the store• get it from Joe, the neighborTo cook it:• do it over our stove• do it over Joe’s stoveThe different ways the omelet job may be completed can berepresent by a “tree”. The tree represent all possible ways ofcompleting the three tasks above.
21. 21. Trees and Factorials1st stepGet eggs
22. 22. Trees and Factorials refrig. Joe store1st stepGet eggs
23. 23. Trees and Factorials refrig. Joe store1st stepGet eggs 2nd step Get cheese
24. 24. Trees and Factorials Joe refrig. store Joe Joe store store Joe1st stepGet eggs store 2nd step Get cheese
25. 25. Trees and Factorials Joe refrig. store Joe Joe store store Joe1st stepGet eggs store 2nd step Get cheese 3rd step Cook it
26. 26. Trees and Factorials our Joe Joe our refrig. store Joe our Joe Joe Joe store our Joe store Joe our1st step JoeGet eggs store our Joe 2nd step Get cheese 3rd step Cook it
27. 27. Trees and Factorials our FJO Joe Joe FJJ FSO our refrig. store Joe FSJ our JJO Joe Joe Joe JJJ store our JSO Joe JSJ store Joe our SJO 1st step Joe SJJ Get eggs our SSO store Joe SSJ 2nd step Get cheese 3rd step Cook itThe different ways to make the omelet may be listed.
28. 28. Trees and Factorials our FJO Joe Joe FJJ FSO our refrig. store Joe FSJ our JJO Joe Joe Joe JJJ store our JSO Joe JSJ store Joe our SJO 1st step Joe SJJ Get eggs our SSO store Joe SSJ 2nd step Get cheese 3rd step Cook itThe different ways to make the omelet may be listed.There are 3x2x2 = 12 ways.
29. 29. Trees and FactorialsTheorem (Multiplication Principle of Multi-step Jobs)
30. 30. Trees and FactorialsTheorem (Multiplication Principle of Multi-step Jobs)A job requires the completion of k-steps.
31. 31. Trees and FactorialsTheorem (Multiplication Principle of Multi-step Jobs)A job requires the completion of k-steps. Suppose there areN1 options to complete the 1st step
32. 32. Trees and FactorialsTheorem (Multiplication Principle of Multi-step Jobs)A job requires the completion of k-steps. Suppose there areN1 options to complete the 1st stepN2 options to complete the 2nd step
33. 33. Trees and FactorialsTheorem (Multiplication Principle of Multi-step Jobs)A job requires the completion of k-steps. Suppose there areN1 options to complete the 1st stepN2 options to complete the 2nd step…Nk options to complete the k’th step
34. 34. Trees and FactorialsTheorem (Multiplication Principle of Multi-step Jobs)A job requires the completion of k-steps. Suppose there areN1 options to complete the 1st stepN2 options to complete the 2nd step…Nk options to complete the k’th stepThen there are N1xN2x..xNk different ways of doing the job.
35. 35. Trees and FactorialsTheorem (Multiplication Principle of Multi-step Jobs ):A job requires the completion of k-steps. Suppose there are:N1 options to complete the 1st stepN2 options to complete the 2nd step…Nk options to complete the k’th stepThen there are N1xN2x..xNk different ways of doing the job.Example A.A sandwich shop has 6 different types of bread, 4 differenttypes of meat, 5 different types of cheese and 8different types of dressings. A regular sandwich requires oneof each ingredient. How many different regular sandwichesare possible?
36. 36. Trees and FactorialsTheorem (Multiplication Principle of Multi-step Jobs ):A job requires the completion of k-steps. Suppose there are:N1 options to complete the 1st stepN2 options to complete the 2nd step…Nk options to complete the k’th stepThen there are N1xN2x..xNk different ways of doing the job.Example A.A sandwich shop has 6 different types of bread, 4 differenttypes of meat, 5 different types of cheese and 8different types of dressings. A regular sandwich requires oneof each ingredient. How many different regular sandwichesare possible?Ans: 6x4x5x8 = 960 different sandwiches are possible.
37. 37. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1
38. 38. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1
39. 39. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2
40. 40. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2 3! = 3x2x1=6
41. 41. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2 3! = 3x2x1=6
42. 42. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2 3! = 3x2x1=6 4! = 4x3x2x1=24 etc…
43. 43. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2 3! = 3x2x1=6 4! = 4x3x2x1=24 etc…We define 0! = 1
44. 44. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2 3! = 3x2x1=6 4! = 4x3x2x1=24 etc…We define 0! = 1Example B. We are to schedule to interview 4 people at 4different time slots 1 pm, 2 pm, 3 pm and 4 pm. How manydifferent lineups of the interviews are possible?
45. 45. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2 3! = 3x2x1=6 4! = 4x3x2x1=24 etc…We define 0! = 1Example B. We are to schedule to interview 4 people at 4different time slots 1 pm, 2 pm, 3 pm and 4 pm. How manydifferent lineups of the interviews are possible?Ans: There are 4 steps to set a schedule:
46. 46. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2 3! = 3x2x1=6 4! = 4x3x2x1=24 etc…We define 0! = 1Example B. We are to schedule to interview 4 people at 4different time slots 1 pm, 2 pm, 3 pm and 4 pm. How manydifferent lineups of the interviews are possible?Ans: There are 4 steps to set a schedule:chose the 1 pm interview  4 ways
47. 47. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2 3! = 3x2x1=6 4! = 4x3x2x1=24 etc…We define 0! = 1Example B. We are to schedule to interview 4 people at 4different time slots 1 pm, 2 pm, 3 pm and 4 pm. How manydifferent lineups of the interviews are possible?Ans: There are 4 steps to set a schedule:chose the 1 pm interview  4 wayschose the 2 pm interview  3 ways
48. 48. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2 3! = 3x2x1=6 4! = 4x3x2x1=24 etc…We define 0! = 1Example B. We are to schedule to interview 4 people at 4different time slots 1 pm, 2 pm, 3 pm and 4 pm. How manydifferent lineups of the interviews are possible?Ans: There are 4 steps to set a schedule:chose the 1 pm interview  4 wayschose the 2 pm interview  3 wayschose the 3 pm interview  2 ways
49. 49. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2 3! = 3x2x1=6 4! = 4x3x2x1=24 etc…We define 0! = 1Example B. We are to schedule to interview 4 people at 4different time slots 1 pm, 2 pm, 3 pm and 4 pm. How manydifferent lineups of the interviews are possible?Ans: There are 4 steps to set a schedule:chose the 1 pm interview  4 wayschose the 2 pm interview  3 wayschose the 3 pm interview  2 wayschose the 4 pm interview  1 way
50. 50. Trees and FactorialsFactorialGiven n a positive integer, we define n factorial asn! = nx(n -1)x(n – 2)x..x3x2x1Hence 1! = 1 2! = 2x1= 2 3! = 3x2x1=6 4! = 4x3x2x1=24 etc…We define 0! = 1Example B. We are to schedule to interview 4 people at 4different time slots 1 pm, 2 pm, 3 pm and 4 pm. How manydifferent lineups of the interviews are possible?Ans: There are 4 steps to set a schedule:chose the 1 pm interview  4 wayschose the 2 pm interview  3 wayschose the 3 pm interview  2 wayschose the 4 pm interview  1 waySo there are 4 x 3 x 2 x 1 = 4! = 24 possible line-ups.
51. 51. Trees and FactorialsThe multi-step jobs where the number of options decreases byone as the next step is carried out have answers related to n!.
52. 52. Trees and FactorialsThe multi-step jobs where the number of options decreases byone as the next step is carried out have answers related to n!.Example C. How many different arrangements of the letters inthe word “EAT” are there?
53. 53. Trees and FactorialsThe multi-step jobs where the number of options decreases byone as the next step is carried out have answers related to n!.Example C. How many different arrangements of the letters inthe word “EAT” are there?There are three letters, we select one letter one at a time,
54. 54. Trees and FactorialsThe multi-step jobs where the number of options decreases byone as the next step is carried out have answers related to n!.Example C. How many different arrangements of the letters inthe word “EAT” are there?There are three letters, we select one letter one at a time,1st letter  3 options (from three letters)
55. 55. Trees and FactorialsThe multi-step jobs where the number of options decreases byone as the next step is carried out have answers related to n!.Example C. How many different arrangements of the letters inthe word “EAT” are there?There are three letters, we select one letter one at a time,1st letter  3 options (from three letters)2nd letter  2 options (two letters are left)
56. 56. Trees and FactorialsThe multi-step jobs where the number of options decreases byone as the next step is carried out have answers related to n!.Example C. How many different arrangements of the letters inthe word “EAT” are there?There are three letters, we select one letter one at a time,1st letter  3 options (from three letters)2nd letter  2 options (two letters are left)3rd letter  1 option (one letter is left).
57. 57. Trees and FactorialsThe multi-step jobs where the number of options decreases byone as the next step is carried out have answers related to n!.Example C. How many different arrangements of the letters inthe word “EAT” are there?There are three letters, we select one letter one at a time,1st letter  3 options (from three letters)2nd letter  2 options (two letters are left)3rd letter  1 option (one letter is left).Hence, there are 3! = 3x2x1 = 6 arrangements.
58. 58. Trees and FactorialsThe multi-step jobs where the number of options decreases byone as the next step is carried out have answers related to n!.Example C. How many different arrangements of the letters inthe word “EAT” are there?There are three letters, we select one letter one at a time,1st letter  3 options (from three letters)2nd letter  2 options (two letters are left)3rd letter  1 option (one letter is left).Hence, there are 3! = 3x2x1 = 6 arrangements.Example D. How many different seating arrangements of 7people in a row of 7 seats are there?
59. 59. Trees and FactorialsThe multi-step jobs where the number of options decreases byone as the next step is carried out have answers related to n!.Example C. How many different arrangements of the letters inthe word “EAT” are there?There are three letters, we select one letter one at a time,1st letter  3 options (from three letters)2nd letter  2 options (two letters are left)3rd letter  1 option (one letter is left).Hence, there are 3! = 3x2x1 = 6 arrangements.Example D. How many different seating arrangements of 7people in a row of 7 seats are there?There are 7 seat, we are to select a person for each seat:
60. 60. Trees and Factorials The multi-step jobs where the number of options decreases by one as the next step is carried out have answers related to n!. Example C. How many different arrangements of the letters in the word “EAT” are there? There are three letters, we select one letter one at a time, 1st letter  3 options (from three letters) 2nd letter  2 options (two letters are left) 3rd letter  1 option (one letter is left). Hence, there are 3! = 3x2x1 = 6 arrangements. Example D. How many different seating arrangements of 7 people in a row of 7 seats are there? There are 7 seat, we are to select a person for each seat: 7 x7 options
61. 61. Trees and Factorials The multi-step jobs where the number of options decreases by one as the next step is carried out have answers related to n!. Example C. How many different arrangements of the letters in the word “EAT” are there? There are three letters, we select one letter one at a time, 1st letter  3 options (from three letters) 2nd letter  2 options (two letters are left) 3rd letter  1 option (one letter is left). Hence, there are 3! = 3x2x1 = 6 arrangements. Example D. How many different seating arrangements of 7 people in a row of 7 seats are there? There are 7 seat, we are to select a person for each seat: 7 x 6 x7 options 6 options
62. 62. Trees and Factorials The multi-step jobs where the number of options decreases by one as the next step is carried out have answers related to n!. Example C. How many different arrangements of the letters in the word “EAT” are there? There are three letters, we select one letter one at a time, 1st letter  3 options (from three letters) 2nd letter  2 options (two letters are left) 3rd letter  1 option (one letter is left). Hence, there are 3! = 3x2x1 = 6 arrangements. Example D. How many different seating arrangements of 7 people in a row of 7 seats are there? There are 7 seat, we are to select a person for each seat: 7 x 6 x 5 x7 options 6 options 5 options
63. 63. Trees and Factorials The multi-step jobs where the number of options decreases by one as the next step is carried out have answers related to n!. Example C. How many different arrangements of the letters in the word “EAT” are there? There are three letters, we select one letter one at a time, 1st letter  3 options (from three letters) 2nd letter  2 options (two letters are left) 3rd letter  1 option (one letter is left). Hence, there are 3! = 3x2x1 = 6 arrangements. Example D. How many different seating arrangements of 7 people in a row of 7 seats are there? There are 7 seat, we are to select a person for each seat: 7 x 6 x 5 x 4 x 3 x 2 x 17 options 6 options 5 options
64. 64. Trees and Factorials The multi-step jobs where the number of options decreases by one as the next step is carried out have answers related to n!. Example C. How many different arrangements of the letters in the word “EAT” are there? There are three letters, we select one letter one at a time, 1st letter  3 options (from three letters) 2nd letter  2 options (two letters are left) 3rd letter  1 option (one letter is left). Hence, there are 3! = 3x2x1 = 6 arrangements. Example D. How many different seating arrangements of 7 people in a row of 7 seats are there? There are 7 seat, we are to select a person for each seat: 7 x 6 x 5 x 4 x 3 x 2 x 17 options 6 options 5 options So there are 7! = 5040 possibilities.
65. 65. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.
66. 66. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 4!
67. 67. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1
68. 68. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1
69. 69. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1 = 9x8x7x6x5
70. 70. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1 = 9x8x7x6x5 = 15120
71. 71. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1 = 9x8x7x6x5 = 15120b. 12! 4!x8!
72. 72. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1 = 9x8x7x6x5 = 15120b. 12! = 12x11x…8x7x..x4x3x2x1 4!x8! 4x3x2x1x8x7x..x2x1
73. 73. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1 = 9x8x7x6x5 = 15120b. 12! = 12x11x…8x7x..x4x3x2x1 4!x8! 4x3x2x1x8x7x..x2x1
74. 74. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1 = 9x8x7x6x5 = 15120b. 12! = 12x11x…8x7x..x4x3x2x1 4!x8! 4x3x2x1x8x7x..x2x1 = 12x11x10x9 4x3x2x1
75. 75. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1 = 9x8x7x6x5 = 15120b. 12! = 12x11x…8x7x..x4x3x2x1 4!x8! 4x3x2x1x8x7x..x2x1 = 12x11x10x9 4x3x2x1
76. 76. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1 = 9x8x7x6x5 = 15120b. 12! = 12x11x…8x7x..x4x3x2x1 4!x8! 4x3x2x1x8x7x..x2x1 5 = 12x11x10x9 4x3x2x1
77. 77. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1 = 9x8x7x6x5 = 15120b. 12! = 12x11x…8x7x..x4x3x2x1 4!x8! 4x3x2x1x8x7x..x2x1 5 = 12x11x10x9 4x3x2x1 = 11x5x9 = 495
78. 78. Trees and FactorialsWhen dividing factorials, always cancel as much as possiblefirst.Example E. Simplifya. 9! = 9x8x7x..x4x3x2x1 4! 4x3x2x1 = 9x8x7x6x5 = 15120b. 12! = 12x11x…8x7x..x4x3x2x1 4!x8! 4x3x2x1x8x7x..x2x1 5 = 12x11x10x9 4x3x2x1 = 11x5x9 = 495
79. 79. Trees and FactorialsExercise A. Draw a tree to represent all possible outcomes foreach of the following multistep jobs. List all the possibleordered outcomes using the tree you drew. How manyoutcomes are there?A die–roll has six outcomes 1, 2,.., 6A coin–flip has two possible outcomes H (heads) or T (tails)1. Flip a coin twice.2. Flip a coin three times.3. Roll a die then flip a coin once.4. Flip a coin, then roll a die then flip a coin again.5. A die has the numbers {1, 2} colored Red, {3, 4} coloredGreen, and {5, 6} colored Blue. We are to roll the die twice andobserve the ordered–colors of the two rolls.6. As in problem 5 but we note the color of the 1st roll andthe number for the 2nd roll.
80. 80. Trees and Factorials7. We are to fly from A to B then travel from B to C. There arethree possible flights from A to B and from B to C, it is onlypossible by a helicopter, or by a 4–wheel drive, or a dog sled.List all the possible ways we get accomplish this. How manypossibilities are there?Exercise B. How many tcomes are there?3. Roll a die then flip a coin once.4. Flip a coin, then roll a die then flip a coin again.5. A die has the numbers {1, 2} colored Red, {3, 4} coloredGreen, and {5, 6} colored Blue. We are to roll the die twice andobserve the ordered–colors of the two rolls.6. As in problem 5 but we note the color of the 1st roll andthe number for the 2nd roll.