06.03.2017 Views

Mathematics for Computer Science

e9ck2Ar

e9ck2Ar

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

“mcs” — 2017/3/3 — 11:21 — page 606 — #614<br />

606<br />

Chapter 15<br />

Cardinality Rules<br />

8<br />

0Z0Z0Z0s<br />

7<br />

Z0Z0Z0Z0<br />

6<br />

0Z0Z0Z0Z<br />

5<br />

Z0Z0Z0Z0<br />

4<br />

0Z0Z0Z0Z<br />

3<br />

Z0Z0Z0Z0<br />

2<br />

0Z0Z0Z0Z<br />

1<br />

s0Z0Z0Z0<br />

a b c d e f g h<br />

(a) valid<br />

8<br />

0Z0Z0Z0Z<br />

7<br />

Z0Z0Z0Z0<br />

6<br />

0Z0s0Z0Z<br />

5<br />

Z0Z0Z0Z0<br />

4<br />

0Z0Z0Z0Z<br />

3<br />

Z0Z0Z0Z0<br />

2<br />

0Z0Z0Z0Z<br />

1<br />

Z0ZrZ0Z0<br />

a b c d e f g h<br />

(b) invalid<br />

Figure 15.2 Two ways to place 2 rooks (R) on a chessboard. The configuration<br />

in (b) is invalid because the rooks are in the same column.<br />

But now there’s a snag. Consider the sequences:<br />

.1; a; 8; h/ and .8; h; 1; a/<br />

The first sequence maps to a configuration with a rook in the lower-left corner and<br />

a rook in the upper-right corner. The second sequence maps to a configuration with<br />

a rook in the upper-right corner and a rook in the lower-left corner. The problem is<br />

that those are two different ways of describing the same configuration! In fact, this<br />

arrangement is shown in Figure 15.2(a).<br />

More generally, the function f maps exactly two sequences to every board configuration;<br />

f is a 2-to-1 function. Thus, by the quotient rule, jAj D 2 jBj. Rearranging<br />

terms gives:<br />

jBj D jAj<br />

2<br />

.8 7/2<br />

D :<br />

2<br />

On the second line, we’ve computed the size of A using the General Product Rule<br />

just as in the earlier chess problem.<br />

15.4.2 Knights of the Round Table<br />

In how many ways can King Arthur arrange to seat his n different knights at his<br />

round table? A seating defines who sits where. Two seatings are considered to be<br />

the same arrangement if each knight sits between the same two knights in both

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!