Download Homework 2 (due Tuesday, October 6)

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Ars Conjectandi wikipedia , lookup

Birthday problem wikipedia , lookup

Probability wikipedia , lookup

Transcript
Homework 2 (due Tuesday, October 6)
Problem 1. In this problem you have to give a combinatorial proof of the identity
2n =
n X
n
r=0
r
,
(1)
whose proof using the binomial theorem is simple:
n n
X
n r n−r X n 2 = (1 + 1) =
11
=
.
r
r
n
n
r=0
r=0
(a) Find the number of all subsets of a set consisting of n distinct elements.
If I consider a group of n elements and I want to decide if each element is or is not in
a subset I have 2 choices for each element. Thus 2n possible subsets.
(b) Find the number of subsets containing exactly r elements of a set containing n elements.
n
This is a direct application of the definition of combinations and is thus
.
r
(c) Using your answers to (a) and (b), give a combinatorial argument that proves the
identity (??).
The left hand side of (??) is counts the total number of subsets from an n-element
set.
If I count the same thing by considering subsets of size r (of which there are
n
) and sum from r = 0 to r = n (the range in of the size of subset), then I count
r
all the subsets and get the right hand side of the equation. Since both sides count
the same thing then they must be equal.
Problem 2. In this problem we will give two different proofs of the identity
n
n
X
r
= n · 2n−1 .
r
r=1
One way to prove it is the following:
n
n
n
n
X
X
X
n!
n!
r
=
r
=
r
r! (n − r)!
(r − 1)! (n − r)!
r=1
r=1
r=1
n−1
X
n−1 X
n · (n − 1)!
n − 1
=
=n
= n · 2n−1 ,
m
m!
(n
−
1
−
m)!
m=0
m=0
1
where we changed the summation index from r to m = r − 1, and used the result from
Problem 1.
(a) Prove the desired identity by expanding (x + 1)n according to the binomial theorem,
differentiating both sides with respect to x, and finally setting x = 1.
The Binomial Theorem gives us:
n
(x + 1) =
n X
n
i=0
i
xi .
If I differentiate both sides (noting that there is a finite sum, so the differentiation
through the summation is not a problem) I obtain:
n(x + 1)
n−1
=
n X
n
i=0
i
ix
i−1
=
n X
n
i=1
i
ixi−1 .
Here I note that the last equality was because the term for i = 0 is equal to 0 thus
in can be eliminated from the sum. Now I evaluate the above equation at 2 and I
obtain the desired equation.
(b) Give a combinatorial proof of the identity by considering a set of n people and determining, in two ways, the number of possible selections of a committee of any size and
a chairperson for the committee.
Hint for (b): How many possible selections are there of a committee of size r and its
chairperson? On the other hand, how many possible selections are there of a chairperson and the other committee members (without any restriction on the size of the
committee)?
2
First count the number of such committees in the following way. First choose the
chair from the n people (n choices). For each choice of chair there are n-1 people
from which to choose the remaining members of the committee. Since there is no
restriction on the size of committee that I can choose then I can choose any of the
2n−1 subsets of these n-1 people (see above argument as to why there are 2n−1 ). Thus
a total of n2n−1 choices of a committee with a chair. This is the left hand side of the
equation.
Now we count the same thing in a different way by breaking it down into cases where
the committee has exactly r people and summing the cases where r = 1....n since the
committee can have any
of 1 to n people. First we choose the committee of
number
n
r people from the n in
ways. Then from those chosen r people we choose one of
r
n
them (r choices) for the chair person. Giving r
ways to form a committee with
r
r people with one specified as the chair. Now since we want to count all committees
where the size ranges from r = 1 to r = n then we sum over r in this range. This
gives the right hand side of the equation. Since both sides count the same thing, they
must be equal.
Problem 3. How many different 3 element subsets are there of the set of numbers {1, 2, 3, ..., 20}
if no 2 consecutive numbers are to be chosen.
To solve this we count the ways in which we CAN get at least 2 consecutive dig20
its and subtract that from the total of
possible 3 element subsets. We
3
break down the subsets with at least 2 consecutive digits into 2 cases. First consider the case where there are 3 consecutive integers. There are 18 such subsets
(1, 2, 3), (2, 3, 4), (3, 4, 5)...(18, 19, 20). Secondly we consider the case where there are
2 consecutive integers, but NOT three. There are 19 such pairs, but two of them are
distinctly different. We first consider the cases where we have a set that has either
(19, 20, ) or(1, 2, ) . For each of these 2 cases there are 17 choices for the remaining
element (for example if im considering (1, 2, ) ; I can choose 4,5,...20 for the remaining
entry). Thus a total of 2 · 17 of this type. Now for the remaining 17 sets (ones that
look like (2, 3, ), (3, 4 ) ....(18, 19, ) ) there are 16 choices for the third element since
I can neither pick the two that are already there or the 2 that are to either side of
those two. Thus a total of 17 · 16. Consequently the total ways to get at least two
2
consecutive digits is 18
+2 · 17 + 16 · 17 = 18 . Consequently the ways to not get 2
20
consecutive digits in
− 182 = 816.
3
Problem 4. An IT administrator has received 8 new equal size memory cards that he must
distribute among 5 computers. How many ways can he distribute the memory in each of the
following situations?
3
(a) There are no restrictions on how much memory can go in each machine.
If I let xi be the number of cards that go into computer ”i” then I must have:
x1 + x2 + x3 + x4 + x5 = 8.
and since each xi ≥ 0 then the number of solutions is:
8+5−1
12
=
= 495.
5−1
4
(b) There are two types of memory and the admin has 4 of type A and four of type B, and
there is no restriction on how much memory can go in each machine.
In a similar fashion to (a) we must have for the cards of type A, a solution to:
x1 + x2 + x3 + x4 + x5 = 4.
4+5−1
Which is given by
. For each of these solutions the way in which we can
5−1
distribute the B type cards corresponds to a solution of the
same
2 equation. Thus the
8
= 4900.
total number of ways in which we can distribute them is
4
(c) Each of the memory cards is tagged with a serial number and the IT admin must
record the numbers (ie. each card is different) and there are no restrictions on how
much memory can go in each machine.
Since each card is distinguishable then there are 5 choices of which computer each
card can be placed in. Thus the total number of ways to place all of the cards in
58 = 390625.
Problem 5. A red, a blue and a green die are all rolled. Calculate the probability that the
sum appearing is greater then or equal to 10 but less then or equal to 12.
4
Well this problem is rather tricky in that its tempting to use the formula that counts
integer solutions to the problem. So I think the best way to do it is to count them
directly. First note that the sample space has 63 choices in it (6 possible values for
each die). Next count the solutions when the sum is 10. There are 6 combinations of
the values summing to 10. They are:
{1, 3, 6}, {1, 4, 5}, {2, 2, 6}, {2, 3, 5}, {2, 4, 4} and {3, 3, 4}.
Now any combination with 3 distinct values can appear 3! ways on the three colored
dice, and any with 2 distince values can appear in exactly 3 ways. So the total that
give us the sum of 10 is: 3! + 3! + 3 + 3! + 3 + 3 = 27. Now we know that the sum
of the opposite sides of any die is equal to 7. Thus in 10 is showing on the up-side
of three dice, then 11 in on the face down sides of the dice. Thus there are the same
number of solutions to the problem when it is equal to 11 as when it is equal to 10.
Now for 12 we have the combinations:
{1, 5, 6}, {2, 4, 6}, {2, 5, 5}, {3, 3, 6} and {3, 4, 5}, {4, 4, 4}.
By the same logic above this gives 3! + 3! + 3 + 3 + 3! + 1 = 25 total outcomes equal
= 79/216
to 12. Thus the probability of getting such an outcome is (25+27+27)
63
Problem 6. Two dice are thrown n times in succession. Determine the probability that
double 6 appears at least once.
To do this consider the sample space of n sequential rolls of the dice. For each roll
there are 36 possible outcomes so for n roll’s in succession there are 36n possible
outcomes in our samples space. If we want to count all the outcomes with at least
one double 6 lets subtract off from the total 36n possible outcomes the outcomes in
which NO double six is rolled. If no double six appears on any roll then there are 25
possible choices for each roll thus 35n outcomes in which no double six appears. Thus
there are 36n − 35n outcomes where at least one does appear. Consequently there
are:
n
35
36n − 35n
=1−
.
n
36
36
Problem 7. An urn contains n > 0 red and m > 0 black balls.
(a) If two balls are randomly withdrawn, what is the probability that they are the same
color?
5
If I think
the balls as different, then the number of ways to draw a set of two
of all n+m
balls is
. This is the size of our sample space. Now the total number of
2
n
ways one can draw 2 red balls is
and the number of ways one can draw 2 black
2
m
balls is
. Thus the probability of getting 2 of the same color is:
2
n
m
+
2
2
n(n − 1) + m(m − 1)
=
(m + n)(m + n − 1)
n+m
2
(b) If a ball is randomly withdrawn and then returned to the urn before the second one is
drawn, what is the probability that the withdrawn balls are the same color?
In the same sort of idea as in the previous part, we have a sample space that consists
of (n+m) choices for the first draw, and the same number for the second draw. Thus
our sample space consists of (n + m)2 outcomes in our sample space. If I want to
count the outcomes where I get two red balls then there are n possibilities for the first
draw and n possibilities for the second draw. Or n2 ways in which I can draw 2 reds.
Similarly there are m2 ways in which I can draw 2 black balls. Thus the probability
of getting either two red or two black is:
n2 + m2
.
(n + m)2
(c) Show that the probability in part (b) is always larger than the one in part (a).
To show this we subtract the answer in (a) from the answer in (b):
n
m
+
2
2
2
2
n +m
n(n − 1) + m(m − 1)
2mn
−
=
=
.
2
2
(n + m)
(m + n)(m + n − 1)
(m + n) (m + n − 1)
n+m
2
Since m and n are both positive, (m + n − 1) is positive, thus the number on the right
of the above equation is positive. Since the numbers that we are subtracting are both
positive is well then the one on the left is larger. This shows what is asked.
Problem 8. A small village consists of 20 families, of which 4 have one child, 8 have two
children, 5 have three children, 2 have four children, and 1 has five children.
6
(a) If one of these families is chosen at random, what is the probability that it has i children, for i = 1, 2, 3, 4, 5?
There are a total number of 20 families, thus as a straight forward application the
probabilities are:
i=1
i=2
i=3
i=4
i=2
4
20
8
20
5
20
2
20
1
20
=
=
=
=
1
5
2
5
1
4
1
10
(b) If one of the children is randomly chosen, what is the probability that this child comes
from a family having i children, for i = 1, 2, 3, 4, 5?
Similarly to above the sample space consists of all possible children in which there
are 48 possible to choose from, all of who are equally likely. Consequently we get the
following probabilities in the following cases:
i=1
i=2
i=3
i=4
i=2
4
=
48
16
=
48
15
=
48
8
=
48
5
.
48
1
12
1
3
5
16
1
6
Problem 9. An urn contains 3 red and 7 black balls. Players A and B withdraw balls from
the urn consecutively (A draws first, then B, then A, then B, etc.) without replacement
until a red ball is selected. The player who selects the red ball wins the game. Find the
probability that player A wins.
7
If we consider all the balls distinct and then consider each game as if we continued to
play it until all the balls were drawn then we would get a sample space that contains
all 10! possible orderings of the 10 balls. Now we consider the games in which the
player who draws first wins. These fall into the following situations:
• (i) The sequence begins (r.......).
• (ii) The sequence begins (bbr.......).
• (iii) The sequence begins (bbbbr.......).
• (iv) The sequence begins (bbbbbbr.......).
I cant have any other cases where person 1 wins because there is not enough black
balls. Now the case where the first one is drawn occurs when one of the 3 possible red
balls in drawn and the remaining 9 balls are any permutation of the remaining ones,
so it happens in 3 · 9! ways. Similarly case (ii) occurs in 7 · 6 · 3 · 7! ways to do this,
for case (iii) there are 7 · 6 · 5 · 4 · 3 · 5! and for case (iv) there are 7 · 6 · 5 · 4 · 3 · 2 · 3 · 3!
possible outcomes that look like this.
I add all of these together and divide by the number of elements in the samples space
to get that the probability is:
7
2116800
= .
10!
12
8