# CMPSCI 250: Introduction to Computation

### David Mix Barrington

### Fall, 2004

# Question and Answers on HW#6

#### Due on paper in class, Friday 12 November 2004

Questions are in black, answers in blue

#### Question #2, 9 November 2004

On page 6-37 of the text, just before the Theorem, it says that
(7 choose 3) is 21. But isn't (7 choose 3) equal to 7*6*5/1*2*3 = 35?

It certainly is. My mistake is right before that, where I say that in
the example (of strings listed in Figure 6-16 on page 6-36), n = 5 and k = 3.
On page 36 it says that n = 3 and k = 5, which is correct: We are choosing
five elements from a set of size 3, not the other way round. So the "(7 choose
3)" should be either "(7 choose 5)" or "(7 choose 2)", both of which do equal
21. The first is "(k+n-1 choose k)", the second is "(k+n-1 choose n-1)".

#### Question #1, 9 November 2004

In 6.6.4 (c), we're asked to count seven-card hands with no pair, five
of which can form a flush. But I could have a seven-card hand that contains
a flush and also contains a pair, if the pair is made by one of the two other
cards. Do I have to count these flushes as well?

No, you don't, because I asked you to count only flushes
that were also solutions to part (b). These are actually easier to count than
the entire set of flushes. Also note for this problem that when you count the
no-valuable-combination hands, the intersection of five-card-flush hands and
five-card-straight hands is *not* just the five-card-straight-flush hands.
You could have a seven-card hand, five of which are hearts and five
*other* of which form a straight. Counting the sets of seven ranks that
give you a straight isn't easy, by the way -- the best way I can think of to
do it is inclusion/exclusion but counting them directly with a computer
program would not be unreasonable.

Last modified 9 November 2004