MIT6_042JF10_lec11 - 11 mcs-ftl 2010/9/8 0:40 page 313 #319...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 11 mcs-ftl 2010/9/8 0:40 page 313 #319 Cardinality Rules 11.1 Counting One Thing by Counting Another How do you count the number of people in a crowded room? You could count heads, since for each person there is exactly one head. Alternatively, you could count ears and divide by two. Of course, you might have to adjust the calculation if someone lost an ear in a pirate raid or someone was born with three ears. The point here is that you can often count one thing by counting another , though some fudge factors may be required. This is a central theme of counting, from the easiest problems to the hardest. In more formal terms, every counting problem comes down to determining the size of some set. The size or cardinality of a finite set S is the number of elements in S and it is denoted by j S j . In these terms, were claiming that we can often find the size of one set by finding the size of a related set. Weve already seen a general statement of this idea in the Mapping Rule of Theorem 7.2.1 . Of particular interest here is part 3 of Theorem 7.2.1 , where we state that if there is a bijection between two sets, then the sets have the same size. This important fact is commonly known as the Bijection Rule . 11.1.1 The Bijection Rule Rule 11.1.1 (Bijection Rule) . If there is a bijection f W A ! B between A and B , then j A jDj B j . The Bijection Rule acts as a magnifier of counting ability; if you figure out the size of one set, then you can immediately determine the sizes of many other sets via bijections. For example, consider the two sets mentioned at the beginning of Part III : A D all ways to select a dozen doughnuts when five varieties are available B D all 16-bit sequences with exactly 4 ones Lets consider a particular element of set A : 0 0 0 0 0 0 0 0 0 0 0 0 chocolate lemon-filled sugar glazed plain Weve depicted each doughnut with a and left a gap between the different vari- eties. Thus, the selection above contains two chocolate doughnuts, no lemon-filled, 314 mcs-ftl 2010/9/8 0:40 page 314 #320 Chapter 11 Cardinality Rules six sugar, two glazed, and two plain. Now lets put a 1 into each of the four gaps: 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 chocolate lemon-filled sugar glazed plain Weve just formed a 16-bit number with exactly 4 onesan element of B ! This example suggests a bijection from set A to set B : map a dozen doughnuts consisting of: c chocolate, l lemon-filled, s sugar, g glazed, and p plain to the sequence: 0:::0 1 0:::0 1 0:::0 1 0:::0 1 0:::0 c l s g p The resulting sequence always has 16 bits and exactly 4 ones, and thus is an element of B . Moreover, the mapping is a bijection; every such bit sequence is mapped to by exactly one order of a dozen doughnuts. Therefore, j A jDj B j by the...
View Full Document

Page1 / 43

MIT6_042JF10_lec11 - 11 mcs-ftl 2010/9/8 0:40 page 313 #319...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online