n21 - CS 70 Discrete Mathematics and Probability Theory...

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: CS 70 Discrete Mathematics and Probability Theory Fall 2010 Tse/Wagner Note 21 Infinity and Countability Bijections Consider a function (or mapping) f that maps elements of a set A (called the domain of f ) to elements of set B (called the range of f ). For each element x A (input), f must specify one element f ( x ) B (output). Recall that we write this as f : A B . We say that f is a bijection if every element a A has a unique image b = f ( a ) B , and every element b B has a unique pre-image a A such that f ( a ) = b . f is a one-to-one function (or an injection ) if f maps distinct inputs to distinct outputs. More rigorously, f is one-to-one if the following holds: x , y . x 6 = y f ( x ) 6 = f ( y ) . The next property we are interested in is functions that are onto (or surjective ). A function that is onto essentially hits every element in the range (i.e., each element in the range has at least one pre-image). More precisely, a function f is onto if the following holds: y x . f ( x ) = y . Here are some examples to help visualize one-to-one and onto functions: One-to-one Onto Note that according to our definition a function is a bijection iff it is both one-to-one and onto. Cardinality How can we determine whether two sets have the same cardinality (or size)? The answer to this question, reassuringly, lies in early grade school memories: by demonstrating a pairing between elements of the two sets. More formally, we need to demonstrate a bijection f between the two sets. The bijection sets up a one-to-one correspondence, or pairing, between elements of the two sets. We know how this works for finite sets. In this lecture, we will see what it tells us about infinite sets. Are there more natural numbers N than there are positive integers Z + ? It is tempting to answer yes, since every positive integer is also a natural number, but the natural numbers have one extra element 0, which is not an element of Z + . Upon more careful observation, though, we see that we can generate a mapping between the natural numbers and the positive integers as follows: CS 70, Fall 2010, Note 21 1 N 1 2 3 4 5 ... & & & & & & Z + 1 2 3 4 5 6 ... Why is this mapping a bijection? Clearly, the function f : N Z + is onto because every positive integer is hit. And it is also one-to-one because no two natural numbers have the same image. (The image of n is f ( n ) = n + 1, so if f ( n ) = f ( m ) then we must have n = m .) Since we have shown a bijection between N and Z + , this tells us that there are as many natural numbers as there are positive integers! Informally, we have proved that + 1 = . What about the set of even natural numbers 2 N = { , 2 , 4 , 6 ,... } ? In the previous example the difference was just one element. But in this example, there seem to be twice as many natural numbers as there are even natural numbers. Surely, the cardinality of N must be larger than that of 2...
View Full Document

This note was uploaded on 12/08/2010 for the course CS 70 taught by Professor Papadimitrou during the Fall '08 term at University of California, Berkeley.

Page1 / 7

n21 - CS 70 Discrete Mathematics and Probability Theory...

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