Docsity

Quiz 3 in CSE 21, Fall 2010: Probability and Combinatorics - Prof. Richard Ord, Quizzes of Computer Science

Toggle sidebar
bg1
Signature ______________________ Quiz 3 Name_________________________
CSE 21
Student ID _____________________ Fall 2010 Score:
How many ways are there to rearrange all the letters in BOOKKEEPER? ___________________________
There may be more than one correct answer. List all that are correct.
(+1 for correct; -1 for incorrect; no negative score)
A) 10!/(3!2!2!1!1!1!) B) P(10,(3,2,2,1,1,1)) C) C(10,3) * C(7,2) * C(5,2) * C(3,1) * C(2,1) * C(1,1)
D) 103*2*2*1*1*1 E) 10!/(2!2!3!) F) P(10,3) * P(7,2) * P(5,2) * P(3,1) * P(2,1) * P(1,1)
G) (3!2!2!1!1!1!)/10! H) P(10,10) I) 103 * 72 * 52 * 31 * 21 * 11
What kind of problem is this? _____
A) Inclusion-Exclusion Principle B) Complement & Subtract Prob. C) Expected Value
D) (Generalized) Pigeon Hole Principle E) Binominal Coefficient F) Multinomial Coefficient
G) Simple Selection Principle H) Simple Arrangement Principle I) Straight Probability
Suppose that 100 lottery tickets are given out in sequence to the first 100 guests at arrive at a party. Of these
100 tickets, only 12 are winning tickets. _____ guarantees that there must be a streak of at least l losing tickets
in a row. (Put the letter corresponding to the correct phrase in blank above.)
A) Inclusion-Exclusion Principle B) Complement & Subtract Prob. C) Expected Value
D) (Generalized) Pigeon Hole Principle E) Binominal Coefficient F) Multinomial Coefficient
G) Simple Selection Principle H) Simple Arrangement Principle I) Straight Probability
Find l. ______
A) 6 B) 7 C) 8 D) 9 E) 10 F) 11 G) 12
What is the probability of rolling an 11 (sum of two fair 6-sided dice will be 11 โ€“ commonly called a Yo)?
P(X=11) = ___________
If the payout for a single roll bet of rolling an 11 (Yo) is 15-to-1 (for example, $1 bet pays $15 + the original $1
bet for a total of $16), the Expected Value of the amount of money you will win in terms of P(X=x) is
E(X) = 16 * P(X=11) + 0 * P(X != 11)
Now replace the P(X=x) values with their numeric probabilities keeping your answer in terms of fractions vs.
decimals. Reduced fractions are preferred.
E(X) = 16 * _____________ + 0 * _____________ = _____________
If your bet is $1 (costs you $1 to play), what is your expected return each time you make this kind of bet?
Express your answer as a positive or negative reduced fraction.
E(X) - 1 = _____________
pf2

Partial preview of the text

Download Quiz 3 in CSE 21, Fall 2010: Probability and Combinatorics - Prof. Richard Ord and more Quizzes Computer Science in PDF only on Docsity!

Signature ______________________ Quiz 3 Name_________________________

CSE 21

Student ID _____________________ Fall 2010 Score:

How many ways are there to rearrange all the letters in BOOKKEEPER? ___________________________ There may be more than one correct answer. List all that are correct. (+1 for correct; -1 for incorrect; no negative score)

A) 10!/(3!2!2!1!1!1!) B) P(10,(3,2,2,1,1,1)) C) C(10,3) * C(7,2) * C(5,2) * C(3,1) * C(2,1) * C(1,1) D) 1032211*1^ E) 10!/(2!2!3!) F) P(10,3) * P(7,2) * P(5,2) * P(3,1) * P(2,1) * P(1,1) G) (3!2!2!1!1!1!)/10! H) P(10,10) I) 10 3 * 7^2 * 5 2 * 3^1 * 2^1 * 1 1

What kind of problem is this? _____

A) Inclusion-Exclusion Principle B) Complement & Subtract Prob. C) Expected Value D) (Generalized) Pigeon Hole Principle E) Binominal Coefficient F) Multinomial Coefficient G) Simple Selection Principle H) Simple Arrangement Principle I) Straight Probability

Suppose that 100 lottery tickets are given out in sequence to the first 100 guests at arrive at a party. Of these 100 tickets, only 12 are winning tickets. _____ guarantees that there must be a streak of at least l losing tickets in a row. (Put the letter corresponding to the correct phrase in blank above.)

A) Inclusion-Exclusion Principle B) Complement & Subtract Prob. C) Expected Value D) (Generalized) Pigeon Hole Principle E) Binominal Coefficient F) Multinomial Coefficient G) Simple Selection Principle H) Simple Arrangement Principle I) Straight Probability

Find l. ______

A) 6 B) 7 C) 8 D) 9 E) 10 F) 11 G) 12

What is the probability of rolling an 11 (sum of two fair 6-sided dice will be 11 โ€“ commonly called a Yo)?

P(X=11) = ___________

If the payout for a single roll bet of rolling an 11 (Yo) is 15-to-1 (for example, $1 bet pays $15 + the original $ bet for a total of $16), the Expected Value of the amount of money you will win in terms of P(X=x) is

E(X) = 16 * P(X=11) + 0 * P(X != 11)

Now replace the P(X=x) values with their numeric probabilities keeping your answer in terms of fractions vs. decimals. Reduced fractions are preferred.

E(X) = 16 * _____________ + 0 * _____________ = _____________

If your bet is $1 (costs you $1 to play), what is your expected return each time you make this kind of bet? Express your answer as a positive or negative reduced fraction.

E(X) - 1 = _____________

An urn contains five red balls and seven blue balls. Four balls are drawn at random, without replacement.

a) What is the probability that all four balls are red? _____

A) P(5,4)/P(12,4) B) P(5,4)/P(12,8) C) C(5,4)/C(12,4) D) (C(5,4)-C(7,4))/C(12,4) E) C(7,4)/C(12,4) F) C(5,4)/C(7,4) G) 5 4 /12! H) 5!/12!

b) What is the probability that two of the balls are red and two are blue? _____

A) P(5,4)/P(12,4) B) P(5,4)/P(12,8) C) (C(5,2)+C(7,2))/C(12,4) D) (C(5,2)C(7,2))/C(12,4) E) (C(5,3)+C(7,5))/C(12,4) F) C(5,2)/C(7,2) G) 5 2^52 /12! H) 2!2!/12!

What did Grace Hopper use a piece of wire just under one foot to demonstrate? _____

A) Distance light travels in one millisecond B) Distance light travels in one microsecond C) Distance light travels in one nanosecond D) Distance light travels in one picosecond E) Distance radio waves travels in one millisecond F) Distance radio waves travels in one microsecond G) Distance radio waves travels in one nanosecond H) Distance radio waves travels in one picosecond

Consider the following algorithm: char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for ( int i = 0; i < m; ++i ) { for ( int j = 0; j < n; ++j ) { cout << alphabet[i] << alphabet[j]; } } How many characters are output in terms of m and n? ________ (in terms of m and n )

Consider the following algorithm: for ( int i = 0; i < n - 1; ++i ) { for ( int j = i + 1; j < n; ++j ) { if ( array[i] == array[j] ) { ++numOfDuplicates; } } } How many "==" comparisons are made in terms of n?

____________ (give answer in terms of n )

How many "==" comparisons are made if n is 10?

________ (give an exact number answer)