##Problem Set 1:
A bag contains 5 green and 7 red jellybeans. How many ways can 5 jellybeans be withdrawn from the bag so that the number of green ones withdrawn will be less than 2?
##Solution:
There are two ways this can be done: We pick no green jellybeans and pick all 5 red jellybeans or we pick 1 green jellybean and 4 red jellybeans. The number of ways 5 beans can be picked is 61.
(5C0 * 7C5) + (5c1 * 7c4)
outcome1 <- (choose(5,0) * choose(7, 5)) + (choose(5, 1) + (choose (7, 4))); outcome1
## [1] 61
##Problem Set 2:
A certain congressional committee consists of 14 senators and 13 representatives. How many ways can a subcommittee of 5 be formed if at least 4 of the members must be representatives?
##Solution:
There are 4 ways the subcommittee can be chosen: We pick 4 senators and 3 representatives or we pick 5 senators and 2 representatives or We pick 6 senators and 1 representatives or We pick all 7 subcommittee members to be senators with no representatives.Thus, the subcommittee can be chosen in 484,913 ways.
(14C4 * 13C3) + (14c5 * 13c2) + (14c6 * 13c1) + (14c7 * 13c0)
## [1] 484913
##Problem Set 3:
If a coin is tossed 5 times, and then a standard six-sided die is rolled 2 times, and finally a group of three cards are drawn from a standard deck of 52 cards without replacement, how many different outcomes are possible?
##Solution:
The number of outcomes possible are = 2^2 * 6^2 * 52C1 * 51C1 * 50C1 = 19,094,400.
outcome3 <- 2^2 * 6^2 * 52 * 51 * 50; outcome3
## [1] 19094400
##Problem Set 4:
3 cards are drawn from a standard deck without replacement. What is the probability that at least one of the cards drawn is a 3? Express your answer as a fraction or a decimal number rounded to four decimal places.
##Solution:
There are 4 suits in each standard deck of cards and each suit consists of 13 cards. Accordingly, there are 4 cards numbered 3 in the standard deck. The probability of picking out 3 cards none of which are numbered 3 is 48C3. The denominator is the entire set of possibilities i.e. picking out 3 cards out of 52. Hence the probability is 1 - ((48C3) / (52C3)) = 21.74%.
outcome4 <- round(1-(choose(48,3)/choose(52,3)),4); outcome4
## [1] 0.2174
##Problem Set 5:
Lorenzo is picking out some movies to rent, and he is primarily interested in documentaries and mysteries. He has narrowed down his selections to 17 documentaries and 14 mysteries.
Step 1. How many different combinations of 5 movies can he rent?
##Solution:
Here Lorenzo is just interested in picking out any 5 movies out of a total of 31 movies. The number of ways he can do this is 31C5 = 169,911 ways.
Step 2. How many different combinations of 5 movies can he rent if he wants at least one mystery?
He can either select 1, 2, 3, 4 or all 5 movies to be mystery movies. Accordingly, the number of ways he can select is given by: (14C1 * 17C4) + (14C2 * 17C3) + (14C3 * 17C2) + (14C4 * 17C1) + (14C5 * 17C0) or 163,723 ways.
outcome5 <- choose(31,5); outcome5
## [1] 169911
outcome6 <- (choose(14,1) * choose(17, 4)) + (choose(14,2) * choose(17, 3)) + (choose(14,3) * choose(17, 2)) + (choose(14,4) * choose(17, 1)) + (choose(14,5) * choose(17, 0)); outcome6
## [1] 163723
##Problem Set 6:
In choosing what music to play at a charity fund raising event, Cory needs to have an equal number of symphonies from Brahms, Haydn, and Mendelssohn. If he is setting up a schedule of the 9 symphonies to be played, and he has 4 Brahms, 104 Haydn, and 17 Mendelssohn symphonies from which to choose, how many different schedules are possible? Express your answer in scientific notation rounding to the hundredths place.
##Solution:
Cory can pick the schedule of symphonies in (4B3) * (104h3) * (17m3) or 45,074,382,080 ways.
outcome7 <- (choose(14,3) * choose(104, 3) * choose(17, 3)); outcome7
## [1] 45074382080
##Problem Set 7:
An English teacher needs to pick 13 books to put on his reading list for the next school year, and he needs to plan the order in which they should be read. He has narrowed down his choices to 6 novels, 6 plays, 7 poetry books, and 5 nonfiction books.
Step 1. If he wants to include no more than 4 nonfiction books, how many different reading schedules are possible? Express your answer in scientific notation rounding to the hundredths place.
Step 2. If he wants to include all 6 plays, how many different reading schedules are possible? Express your answer in scientific notation rounding to the hundredths place.
##Solution:
1). If the teacher wants to include no more than 4 nonfiction books, then he can begin by including either none, 1, 2, 3 or 4 nonfiction books in the reading schedule.
None <- (19c13 * 5c0) 1 book <- (19C12 * 5C1) 2 books <- (19C11 * 5C2) 3 books <- (19C10 * 5C3) 4 books <- (19C9 * 5C4)
2). If the teacher wants to include all 6 plays, then the number of reading schedules possible are = 65432118171615141312
outcome8 <- format((19*18*17*16*15*14) + (19*18*17*16*15*14*13*5) + (18*17*16*15*14*13*5*4) + (17*16*15*14*13*5*4*3), scientific = TRUE); outcome8
## [1] "1.601188e+09"
outcome9 <- format(6*5*4*3*2*1*18*17*16*15*14*13*12, scientific = TRUE); outcome9
## [1] "1.154829e+11"
##Problem Set 8:
Zane is planting trees along his driveway, and he has 5 sycamores and 5 cypress trees to plant in one row. What is the probability that he randomly plants the trees so that all 5 sycamores are next to each other and all 5 cypress trees are next to each other? Express your answer as a fraction or a decimal number rounded to four decimal places.
##Solution:
There are two ways in which Zane can plant the sycamore and cypress trees next to each other: SSSSSCCCCC or CCCCCSSSSS. Hence, the probability is 2/(10!/(5! * 5!)) or 0.79%.
outcome10 <- round(2/(factorial(10)/(factorial(5)*factorial(5))),4);outcome10
## [1] 0.0079