(CSCI 241) Activity 7 Instruction: The students are encouraged to type the answer using WORD. Save the file as PDF and submit the PDF file through blackboard. The PDF file format preserves the formatting of mathematical notations and avoids changing the characters for different Word processors. To learn how to type math notation in word, please watch video https://www.youtube.com/watch?v=SRGaW3maK38. You may search other videos to learn how to do this faster. However, if the student feels it takes too much time to type the answer, then the student can use handwriting to write down the answers on paper. The students then scan the paper into pdf or image file then upload the file to blackboard. In this case, any unclear handwriting may result 0 points to the problem. All problems are selected from or similar to Additional Exercise at the end of each section of Zybooks. It is recommended to the students to practice more questions from Additional Exercise in Zybooks by themselves. Problem 1 (12 points): In this problem you will count the number of passwords with certain characteristics. The characters in the passwords are all either letters or digits. You can assume all letters are lower case, so there are only 26 letters. State how many passwords there are with the given restrictions: 1. 2. 3. 4. Length is 6 or 7 Length is 6 and it must contain at least one digit. Length is 6 and it must have at least one digit and one letter. Length is 6 and it can not start with a digit. 1. πΏππ‘π‘πππ = 26, π·ππππ‘π = 10, ππ’ππππ ππ πππ π π€πππ ππ πππππ‘β 6 πππ 7 = 366 + 367 = 80540946432 2. ππ’πππ ππ πππ π π€πππ ππ πππππ‘β 6 − ππ’ππππ ππ πππ π π€πππ ππ πππππ‘β 6 ππππ‘ππππππ ππ πππππ‘π = 366 − 266 = 1867866560 3. ππ’ππππ ππ πππ π π€πππ ππ πππππ‘β 6 − ππ’ππππ ππ πππ π π€πππ ππ πππππ‘β 6 ππππ‘ππππππ ππ πππππ‘π − ππ’ππππ ππ πππ π π€πππ ππ πππππ‘β 6 ππππ‘ππππππ ππ πππ‘π‘ππ = 366 − 266 − 106 = 1866866560 4. πΉππ ππππ π‘ πππ‘π‘ππ π€π βππ£π 26 πβπππππ πππ πππ πππ π‘ 5 π€π βππ£π 36 πβπππππ = 26 × 365 = 1572120576 Problem 2 (12 points): Ten members of a wedding party are lining up in a row for a photograph. 1. How many ways are there to line up the ten people? 2. How many ways are there to line up the ten people if the groom must be to the immediate left of the bride in the photo? 3. How many ways are there to line up the ten people if the groom must be next to the bride (either on her left to right side)? 1. ππ’ππππ ππ π€ππ¦π π‘π ππππ π’π 10 ππππππ = 10! = 3628800 2. πΆπππ πππππππ πππππ πππ πππππ ππ πππ πππ‘ππ‘π¦, π€π ππππ€ βππ£π π‘π ππππ π’π 9 ππππππ ππ’ππππ ππ π€ππ¦π π‘π ππππ π’π = 9! = 362880 3. ππ’ππππ ππ π€ππ¦π ππ π€βππβ πππππ πππ πππππ πππ ππππ π’π πππ₯π‘ π‘π πππβ ππ‘βππ = 2! πππ‘ππ ππ’ππππ ππ π€ππ¦π = 9! × 2! = 725760 Problem 3 (12 points): A search committee is formed to find a new software engineer. 1. If 100 applicants apply for the job, how many ways are there to select a subset of 9 for a short list? 2. If 6 of the 9 are selected for an interview, how many ways are there to pick the set of people who are interviewed? (You can assume that the short list is already decided). 3. Based on the interview, the committee will rank the top three candidates and submit the list to their boss who will make the final decision. (You can assume that the interviewees are already decided). How many ways are there to select the list from the 6 interviewees? 100! 1. πππ¦π π‘π π πππππ‘ π π’ππ ππ‘ ππ 9 ππππ 100 = πΆ(100,9) = = 1902231808400 9! 91! 9! 2. πππ¦π π‘π π πππππ‘ 6 ππ π‘βπ 9 ππππππ = πΆ(9,6) = = 84 6! 3! 6! 3. πππππ ππ ππππππ‘πππ‘, π π ππ’ππππ ππ π€ππ¦π = π(6,3) = = 120 3! Problem 4 (16 points): Poker: 1. 2. 3. 4. How many different 5-card Poker hands are there? How many of these are 1 pair? How many of these are a flush (all one suit)? How many are a full house (3 of a kind and a pair)? 1. πβπ πππππ ππππ πππ‘ πππ‘π‘ππ, π π ππ’ππππ ππ 5 βππππ = πΆ(52,5) = 52! 5! 47! = 2598960 2. πΉππ 1 ππππ π€π 2 πππππ ππ πππ ππππ πππ 3 ππ‘βππ πππππ ππ πππππππππ‘ ππππ = πΆ(13,1) × πΆ(4,2) × πΆ(12,3) × πΆ(4,1) × πΆ(4,1) × πΆ(4,1) = 1098240 3. ππ’ππππ ππ πππ’π β βππππ = πΆ(4,1) × πΆ(13,5) = 514 4. πΉπ’ππ π»ππ’π π = πΆ(13,1) × πΆ(4,3) × πΆ(12,1) × πΆ(4,2) = 3744 Problem 5 (12 points): A large number of coins are divided into four piles according to whether they are pennies, nickels, dimes or quarters. 1. How many ways are there to select 25 coins from the piles? 2. How many ways are there to select 25 coins if at least 5 of the chosen coins must be quarters? 3. Suppose the pile only has 10 quarters. How many ways are there to select 25 coins? 1. πππ¦π π‘π π πππππ‘ 25 πππππ = πΆ(25 + 4 − 1,25) = πΆ(28,25) = 3276 2. πππ¦π π‘π π πππππ‘ 25 πππππ π€ππ‘β 5 ππ’πππ‘πππ = πΆ(20 + 4 − 1,20) = πΆ(23,20) = 1771 3. πππ¦π π‘π π πππππ‘ 25 πππππ π€ππ‘β ππππ¦ 10 ππ’πππ‘πππ = πππ¦π π‘π π πππππ‘ 25 πππππ − πππ¦π π‘π π πππππ‘ 25 πππππ π€ππ‘β ππ‘ππππ π‘ 11 ππ’πππ‘πππ = πΆ(28,25) − πΆ(17,14) = 2596 Problem 6 (20 points): An employee of a grocery store is placing an order for soda. There are 8 varieties of soda and they are sold in cases. Each case contains is all the same variety. The store will order 50 cases total. 1. How many ways are there to place the order? 2. How many ways are there to place the order if she orders at least 3 of each variety? 3. How many ways are there to place the order if she does not order more than 20 cases of Coke? 4. How many ways are there to place the order if she does not order more than 25 of any single variety? 5. How many ways are there to place the order if she does not order more than 20 of any single variety? 1. πΆ(50 + 8 − 1,50) = πΆ(57,50) = 264385836 2. πΆ(50 + 8 − 1 − 3 × 8,50 − 3 × 8) = πΆ(33,26) = 4272048 3. πΆ(50 + 8 − 1,50) − πΆ(50 + 8 − 1 − 21,50 − 21) = πΆ(57,50) − πΆ(36,29) = 256038156 4. πΆ(57,50) − 8πΆ(50 + 8 − 1 − 26,50 − 26) = πΆ(57,50) − 8πΆ(31,24) = 264385836 Problem 7 (4 points): Twelve employees of a company are being assigned to offices. There are four offices and each is large enough for three people. How many ways are there to assign employees to offices? ππ πππ ππ’ππ‘πππππππ πππππππππππ‘, π‘π πππ π‘ππππ’π‘π π π‘ππππ π‘π π ππππ ππ π ππ§π 3 πππβ π! 12! = π = 4 = 369600 3! 3! Problem 8 (4 points): There are 14 3-digit numbers in a list. Can you conclude that there are two distinct subsets of the 14 numbers that have the same sum? What about if there are 13 numbers? πππ‘ππ ππ’ππππ ππ π π’ππ ππ‘π = 214 = 16384 πππ π ππππ π π’π π€πππ πππππ ππππ 0 π‘π 14 × 999 (π€βππ πππ πππππ‘π πππ 9) = 13986 ππ πππ ππππππ βπππ πππππππππ ππ 16485 ππ > 13987 π€π πππ ππππππ’ππ π‘βππ‘ π‘βπππ πππ π‘π€π πππ π‘ππππ‘ π π’πππ‘π ππ π‘βπ 14 ππ’πππππ π‘βππ‘ βππ£π π‘βπ π πππ π π’π. πππππππππ¦, 213 = 8192, πππ π ππππ π π’π πππππ ππ ππππ 0 π‘π 13 × 999 ππ 12987. πβπ’π π€π πππ ππππππ’ππ π‘βπ π πππ. Problem 9 (4 points): A team wishes to purchase 10 shirts of the same color. A store sells shirts in 3 different colors. What must the inventory of the store be in order to conclude that there at least 10 shirts in one of the three colors? Assuming there are 9 shirts of each color then total inventory = 9 x 3 = 27 if we now increase this number by 1 i.e. 28 there will be at least 10 shirts in one of the three colors. Problem 10 (4 points): A movie theater offers 6 showings of a movie each day. A total of 1000 people come to see the move on a particular day. The theater is interested in the number of people who attended each of the six showings. How many possibilities are there for the tallies for each showing for that day? Formula to distribute n items into k bins is given by (π + π − 1)! = πΆ(π + π − 1, π − 1) = (π − 1)! π! π»πππ, π = 1000, π = 6 (1000 + 6 − 1)! 1005! ππ’ππππ ππ πππ π ππππππ‘πππ = = 5! 1000! 5! 1000!