Docsity

Solutions to Homework Problems in Combinatorics (CSE 21) - Prof. Ronald L. Graham, Assignments of Computer Science

Toggle sidebar
bg1
CSE 21: Homework Solutions 3
October 12, 2009
Let S(n, k) be the Stirling number of the second kind which counts the
number of ways to partition nlabeled elements into kdisjoint, nonempty,
unlabeled blocks.
Problem 1
In how many ways can 6 people be assigned to 4 nonempty teams?
Solution:
S(6,4).
Problem 2
An urn contains 5 red marbles and 6 white marbles.
(a) How many ways can 4 marbles be drawn?
(b) What if we must have 2 red marbles and 2 white marbles?
(c) What if all 4 must have the same color?
1
pf3
pf4
pf5

Partial preview of the text

Download Solutions to Homework Problems in Combinatorics (CSE 21) - Prof. Ronald L. Graham and more Assignments Computer Science in PDF only on Docsity!

CSE 21: Homework Solutions 3

October 12, 2009

Let S(n, k) be the Stirling number of the second kind which counts the

number of ways to partition n labeled elements into k disjoint, nonempty,

unlabeled blocks.

Problem 1

In how many ways can 6 people be assigned to 4 nonempty teams?

Solution:

S(6, 4).

Problem 2

An urn contains 5 red marbles and 6 white marbles.

(a) How many ways can 4 marbles be drawn?

(b) What if we must have 2 red marbles and 2 white marbles?

(c) What if all 4 must have the same color?

Solution:

(a)

11 4

(b)

2

2

(c)

5 4

6 4

Problem 3

12 students are eligible to attend the National Students Association meeting.

(a) How many ways can 4 students be selected to attend?

(b) Suppose that two of the students will refuse to go if they are both se-

lected?

(c) Suppose two of the students are married and will only go if they are both

selected?

Solution:

(a)

4

(b)

12 − 2 4

12 − 1 3

2 1

(c)

4

2

Problem 4

5 symbol passwords must be formed using the 26 letters {a, b,... , z} and

the 10 digits {0, 1,... , 9}. How many possible passwords can be formed

if each one must have at least one letter and at least one digit, and cannot

have both the letter “o” and the digit “0”?

Problem 6

10 points A, B, C, D, E, F, G, H, I, J are placed in the plane so that no three

are in a straight line.

(a) How many triangles are formed by the points?

(b) How many of these triangles have A as one of its vertices?

Solution:

(a) Since no three points are in a straight line, any three points can form a

triangle which implies that the number of triangles is

( 10

3

(b) ( 10 − 1

2

Problem 7

How many poker hand (of 5 cards from an ordinary deck) have exactly 3

Aces? How many have at least 3 Aces?

Solution:

There are in total (^) (

4

3

ways to have exactly 3 Aces, and there are in total

( 4

3

ways to have at least 3 Aces.

Problem 8

How many ways can 9 students be divided evenly into 3 teams? What if the

teams have sizes 2, 3 and 4?

Solution:

The number of ways to divide 9 students evenly into 3 teams (the ordering

does not matter for the teams) is

( 9

3 , 3 , 3

Recall the “Balls and Bins” section in notes 4. If the teams have sizes 2,

3, and 4, then there are

ways.

Problem 9

Let

Qn =

∑^2 n

k=

2 n^ − k

k

k .

What is the exact value of Q 1000000? (Hint: use the identity

n k

n− 1 k

(n− 1

k− 1

and proof by induction.)

Sketch of proof:

(This problem may be hard for most of students, and it is ok if you can’t

figure out the solution. This problem won’t appear in any mid-term or final.)

Let

Rm =

∑^ m

k=

m − k

k

k .

m 0 1 2 3 4 5 6 7 8 9 10

Rm 1 1 0 -1 -1 0 1 1 0 -1 -

Table 1: Some values of Rm

Notice that

0 mod 6 = 1

2

1 mod 6 = 2

2

2 mod 6 = 4

23 mod 6 = 2

2

4 mod 6 = 4

2

5 mod 6 = 2

2

6 mod 6 = 4 .. .

we can conclude that 2^1000000 mod 6 = 4 (this is also can proved by induc-

tion). Thus,

Q 1000000 = − 1.