Uploaded by rohit.justanswer

Activity 7

advertisement
(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!
Download