1a How many 7-digit phone numbers are possible, assuming that the first digit can’t be a 0 or a 1?

8 choices for the first number and 10^6 ways for the remaining number.

\[ 8*10*10*10*10*10*10 \]

8*10*10*10*10*10*10
## [1] 8e+06

1b Re-solve the previous problem, except now assume also that the phone number is not allowed to start with 911.

This is the quantity of seven digit phone numbers that start with 911, there is only one way to start with 911, hence the 1, followed by 10^4 different possible combinations. We use the complement.

\[ 1*10^4 \]

\[ 8*10^6 - 1*10^4 \]

(8*10^6)-10^4
## [1] 7990000

2

Two chess players, A and B, are going to play 7 games. Each game has three possible outcomes: a win for A (which is a loss for B), a draw (tie), and a loss for A (which is a win for B). A win is worth 1 point, a draw is worth 0.5 points, and a loss is worth 0 points.

2a How many possible outcomes for the individual games are there, such that overall player A ends up with 3 wins, 2 draws, and 2 losses?

This sequence represents three wins for A, two draws D and two losses B

AAADDBB

So now the problem becomes: how many different ways can you rearrange these letters?

First you have to chose the two slots where the draws will go.

\[ {7 \choose 2} \]

For all of those places, you have to chose where the reamining 3 wins will go

\[ {7 \choose 2}*{5 \choose 3} \]

choose(7,2)*choose(5,3)
## [1] 210

Another way to solve this problem is with the multinomial coeficient (when you need to break a group of n people into three or more groups) which is equivelant to: 7 (7!) total people broken into groups of 3 (3!) and two groups of two (2!) (2!)

\[ 7! \over 3!2!2! \]

factorial(7)/(factorial(3)*factorial(2)*factorial(2))
## [1] 210
  1. How many possible outcomes for the individual games are there, such that A ends up with 4 points and B ends up with 3 points?

We have to take draws into account because you can win 0.5 points for a draw. So these are all the different ways that A can end up with 4 points and B with 3:

AAAABBB

\[ {7 \choose 3} \]

choose(7,3)
## [1] 35

AAADDBB

\[ 7! \over 3!2!2! \]

factorial(7)/(factorial(3)*factorial(2)*factorial(2))
## [1] 210

AADDDDB

\[ 7! \over 2!4!1! \]

factorial(7)/(factorial(2)*factorial(4)*factorial(1))
## [1] 105

ADDDDDD

\[ {7 \choose 1} \]

choose(7,1)
## [1] 7

Finally, we should add up all of the cases calculated above, and the final answer ends up being 357.

35+210+105+7
## [1] 357

2c Now assume that they are playing a best-of-7 match, where the match will end when either player has 4 points or when 7 games have been played, whichever is first. For example, if after 6 games the score is 4 to 2 in favor of A, then A wins the match and they don’t play a 7th game. How many possible outcomes for the individual games are there, such that the match lasts for 7 games and A wins by a score of 4 to 3?

At six games, A has to be at three wins and win the final game

At 6 games the total score as to be 3 to 3, for the total score to be 4 to three upon playing the seventh game. Here are the ways that can happen:

AAA BBB A (7th game)

AA BB DD A (7th game)

choose(6,3)
## [1] 20
factorial(6)/(factorial(2)*factorial(2)*factorial(2))
## [1] 90

So the total is 110.

I am not getting this problem right, need to think harder about it?

Problem 3

Three people get into an empty elevator at the first floor of a building that has 10 floors. Each presses the button for their desired floor (unless one of the others has already pressed that button). Assume that they are equally likely to want to go to floors 2 through 10 (independently of each other). What is the probability that the buttons for 3 consecutive floors are pressed?

The only possible outcomes are: 234,345, 456, 567,678,789,8910

7/(9*8*7)
## [1] 0.01388889

I am not getting this problem right, either. Need to think about it harder?

Problem 4a

The number of ways to choose 5 people out of 10 is >/</- the number of ways to choose 6 people out of 10

This one should make sense intuitively, but I did the calculations anyway

choose(10,5)
## [1] 252
choose(10,6)
## [1] 210

4b

The number of ways to break 10 people into 2 teams of 5 is >/</= the number of ways to break 10 people into a team of 6 and a team of 4.

choose(10,5)
## [1] 252
choose(10,6)
## [1] 210

This problem is not just 10 choose 2 vs. 10 choose 6. You need to divide 10 choose 5 by two, to do the comparison. This is kind of a tricky point, need to get some more intuition around this idea.

4c

The probability that all 3 people in a group of 3 people were born on January 1 is </>/= the probability that in a group of 3 people, one was born on January 1, another one was born on January 2, and the remaining one was born on Janurary

Intuitively, I thought these were equal, it might be good to actually hand crank out the probabilities.

5

problem

In general need to talk this one through