Review question 1
Download
1 / 16

Review Question #1 - PowerPoint PPT Presentation


  • 334 Views
  • Uploaded on

Review Question #1 How many ways can I fill a box of 50 chocolates from 10 types if I must have at least 2 of each type in the box? Answer:

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Review Question #1' - liam


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Review question 1 l.jpg
Review Question #1

How many ways can I fill a box of 50 chocolates from 10 types if I must have at least 2 of each type in the box?

Answer:

Since there must be 2 of each type, 20 of the 50 chocolates are already chosen. Therefore, the problem reduces to calculating the number of ways to choose 30 chocolates from 10 types.

This is a combination with repetition represented with bars and starsn = 10 types of candy, r = 30 to choose

#ways = C(n + r – 1 , r) = C(10 + 30 - 1, 30)

= C(39, 30) = 39!/30!9!


Review question 2 l.jpg
Review Question #2

What is the probability that a 4-bit integer is prime, given the first (most-significant) bit is 1?

Note that 4-bit primes = {2, 3, 5, 7, 11, 13}

Answer:This is a conditional probability.

Let E = {4-bit primes} and F = {4-bits w/ MSB=1}, then E ∩ F = {1011, 1101}. (11012 = 11, 10112 = 13)

Thus, P(E | F) = P(E ∩ F) / P(F)

= (2/16) / (1/2)

= 4/16 = 1/4.


Review question 3 l.jpg
Review Question #3

Determine whether or not a 4-bit integer is prime is independent of its first bit being 1?

Note that the 4-bit primes = {2, 3, 5, 7, 11, 13} = {0010, 0011, 0101, 0111, 1011, 1101} in binary

Answer

Let E = {4-bit primes} and F = {4-bit w/ MSB=1}, then E and F are independent if and only if P(E)P(F) = P(E ∩ F).

There are 24 = 16 4-bit integers.

So, P(E) = 6/16 = 3/8 and P(F) = 1/2 and P(E ∩ F) = 2/16 = 1/8.

Since 3/8 * 1/2 ≠ 1/8, E and F are NOT independent.


Review question 4 l.jpg
Review Question #4

How many ways can a teacher create a team of 8 students from a class of 13 Boys and 16 Girls, if she must choose at least 6 boys?

Answer:

each team is created by choosing some number of boys and some number of girls. The order in which they are chosen is not important, so we use COMBINATIONS.

The number of ways to choose “at least 6 boys” is the number of ways to choose 6 boys and 2 girls + number of ways to choose 7 boys and 1 girl + number of ways to choose 8 boys and no girls

# ways = C(13, 6)*C(16, 2) + C(13, 7)*C(16, 1) + C(13, 8)*C(16, 0)


Review question 5 l.jpg
Review Question #5

How many unique orderings are there of the letters of the word SURROUNDSOUND ?

Answer:

This is a “permutation with indistinguishable objects” problem.

The indistinguishable objects are the letter which appear more than once.

SURROUNDSOUND contains 13 letters of which

2 are S, 2 are R, 3 are U, 2 are O, 2 are N, 2 are D

Therefore, by the given formula

#ways = 13! / 2! * 2! * 2! * 2! * 2! * 3!


Review question 6 l.jpg
Review Question #6

What is the probability that a bit string of length 10 will have no more than two 1’s?

Answer:

The number of bit strings with “no more than two 1’s” is the number of bit strings with no 1’s plus number of bit strings with one 1, the number of bit strings with two 1’s.

Since the 1’s may appear anywhere in the bit string, to calculate the number of bit strings with N ones, we must choose which of the 10 bit positions will be a 1 = C(10, N).

# bit string with no 1’s = C(10, 0) = 1 (all 0’s) # bit strings with one 1 = C(10, 1) = 10 # bit strings with two 1’s = C(10, 2) = 45Note that there are 210 = 1024 bit strings of length 10.

So, prob( no more than two 1’s) = C(10, 0) + C(10, 1) + C(10, 2) ----------------------------------------

210


6 continued l.jpg
#6 Continued

We could also count number of bit strings with zero, one or two 1’s as follows using permutations if we consider each of these as string with indistinguishable objects.

# bit strings with no 1’s is the number permutations of 0000000000 = 1

# bit strings with one 1 is the number permutations of a 10-bit string which contains one 1 and nine 0’s. The 0’s are indistinguishable, so by formula,ways = 10! / 1! * 9! = 10, which is the same as C(10, 1)

Similarly, # bit strings with two 1’s is the number permutations of a 10-bit string which contains two 1’s and eight 0’s. The 1’s and 0’s are indistinguishable, so by formula, # ways = 10! / 2! * 8! which is the same as C( 10, 2 ).


Review question 7 l.jpg
Review Question #7

How many ways can I select either a RED card or a FACE card (King, Queen, or Jack) from a standard deck of 52 cards?

Answer:

Let R = set of red cards (13 hearts and 13 diamonds).

Let F = set of face cards (K, Q, J from each of the 4 suits)

By the inclusion-exclusion rule | R U F | = | R | + | F | - |R ∩ F|

What’s |R ∩ F|? That’s the number of RED FACE cards.

There are 6 of these – Kh, Qh, Jh, Kd, Qd, Jd

So | R U F| = 26 + 12 – 6 = 32


Review question 8 l.jpg
Review Question #8

In Maryland, some license plates consist of 3 letters followed by 3 digits. How many license plates can be created if no letter or digit can be duplicated?

Answer:

The number of ways to arrange 3 letters from 26 without duplication is P(26, 3) = 26! / 23! = 26 * 25 * 24.(Note that a direct application of the product rule gives the same result)

Similarly, the number of ways to arrange 3 digits from 10 is P(10, 3) = 10! / 7! = 10 * 9 * 8

Therefore the total number of license plates is

26 * 25 * 24 * 10 * 9 * 8


Review question 9 l.jpg
Review Question #9

A book shelf contains 24 math books, 25 computer science books, 21 biology books and 14 economic books. How many books must you place in your backpack to assure there are at least 7 books on the same subject?

Answer:There are 4 different kinds of books – these are pigeon holes.

We need to find the required number of books (pigeons) such that at least one pigeon hole has 7 pigeons. By the generalized pigeon hole principle, we are looking for the solution to ceiling(x/4) = 7. The solution is x = 25 since 25 / 4 = 6.25 and ceiling(6.25) = 7.


Review question 10 l.jpg
Review Question #10

How many different pizzas can be ordered if a pizza can contain any combination of the following 5 toppings: onion, pepperoni, ham, mushrooms, and sausage?

Answer:One approach to this problem is to consider each possible combination as a bit string of length 5. If a topping is selected, it’s represented by a 1. If not selected, it’s represented by a 0. There are 25 = 32 bit strings of length 5, so 32 pizzas are possible.

Another approach is to count the number of ways to select 0, 1, 2, 3, 4 or 5 toppings from the 5 possible toppings. In this way,

# pizzas = C(5, 0) + C(5,1) + C(5,2) + C(5,3) + C(5, 4) + C(5, 5)

= 1 + 5 + 10 + 10 + 5 + 2 = 32


Review question 11 l.jpg
Review Question #11

Given a pair of fair dice, what is the probability of rolling a total of 7 three times in ten rolls?

Answer:If we define “roll total of 7” as success, this is a Bernoulli experiment with p = 1/6 and q = 1 – p = 5/6

By formula the probability of three 7’s in 10 rolls is

C(10, 3) * (1/6)3 * (5/6)7


Review question 12 l.jpg
Review Question #12

Suppose we randomly choose one of the permutations of the integers {1, 2, 3, … n } with n ≥ 4.

a. What is the probability that 1 comes before 2?

b. What is the probability that 1 comes immediately before 2?

c. What is the probability that n comes before 1 and before 2?

Answer:a. either 1 comes before 2 or it doesn’t and each of these is equally likely, so prob = ½

b. if 1 comes immediately before 2, we can treat 12 as a separate entity. We then count how to permute n-1 “integers” = (n-1)!. Since there are n! permutations of 1 – n, the prob = (n-1)! / n! = 1/n

c. we need only look at the relative positions of n, 1, 2. Clearly n will be the first of these three 1/3 of the time


Review question 13 l.jpg
Review Question #13

Suppose two cards are drawn from a regular deck of 52 cards. If two cards are drawn at random, what is the probability that the 2nd card is a spade if the first card is also a spade?

Answer 1:After the 1st spade is drawn, there are 51 cards of which 12 are spades, so prob(2nd card is spade) = 12 / 51

Answer 2:As a conditional probability problem, let S1 = 1st card is spade and S2 = 2nd card is spade. We are asked to compute P( S2 | S1).By formula P(S2 | S1 ) = P(S1 ∩ S2) / P(S1).

Clearly P(S1) = 13/52 since 13 of the 52 cards are spades.P(S1 ∩ S2) = 13 * 12 / 52 * 51

and therefore P(S2 | S1 ) = [(13*12)/(52*51)] / (13/52) = 12 / 51


Review question 14 l.jpg
Review Question #14

In some lottery games, the state will choose 6 balls from a set of balls numbered 1 – 40. You can win a prize if you correctly choose 4 of the 6 numbers selected by the state. What is the probability of winning the 4 out of 6 prize?

Answer:

We can correctly choose 4 of the 6 winning numbers in C(6,4) ways. We can choose 2 losing numbers in C(34, 2) ways. There are therefore C(6,4)*C(34,2) ways to correctly choose 4 out of 6. There are C(40, 6) possible sets of winning numbers, so the probability of winning is C(6,4) * C(34, 2) / C(40, 6)


Review question 15 l.jpg
Review Question #15

An octal die has eight faces numbered 1 – 8. If a pair of fair octal dice is rolled, what is the expected value of the sum of the two dice?

Answer1:

Since the die are fair, the probability of any value is 1/8. So for a single die, the expected value is

1/8 (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8) = 36 / 8 = 9 / 2Since two dice are rolled, the expected value is 9 / 2 + 9 /2 = 9

Answer 2: There are 64 outcomes with 5 possible sum ( 2 – 16). We calculate the probability of each sum, then apply the formula

P(sum = 2) = 1 / 64 P(9) = 8 / 64

P(sum = 3) = 2 / 64 P(10) = 7 / 64

P(sum = 4) = 3 / 64 P(11) = 6 / 64

P(5) = 4 / 64 P(12) = 5 / 64

P(6) = 5 / 64 P(13) = 4/ 64

P(7) = 6 / 64 P(14) = 3/ 64

P(8) = 7 / 64 P (15) = 2/64

P(16) = 1/64

E(X) = 2 * 1/64 + 3 * 2/64 + 4 * 3/64 + … 15 * 2/64 + 16 * 1/64 = 576 / 64 = 9

Also note that 9 has the most combinations and therefore the highest probability of any sum


ad