Handout 5

Handout 5 - Mehran Sahami CS103B Handout #5 January 9, 2009...

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

View Full Document Right Arrow Icon
Mehran Sahami Handout #5 CS103B January 9, 2009 Infinite Sets and Countability Thanks to Maggie Johnson for some portions of this handout. Infinite Sets In a finite set, we can always designate one element as the first member, another as the second member, etc. If there are k elements in the set, then these can be listed in the order we have selected: s 1 , s 2 , ..., s k Therefore, a finite set is one that can be enumerated by the positive integers from 1 up to some integer k. More precisely, set A is finite if there is a positive integer k such that there is a one-to- one correspondence (bijection) between A and the set of all natural numbers less than k. As we defined it when discussing functions, a one-to-one correspondence between the elements of a set P and the elements of a set Q means that it is possible to pair off the elements of P and Q such that every element of P is paired off with a distinct element of Q. If a set is infinite, we may still be able to select a first element s 1 , and a second element s 2 , but we have no limit k. So the list of chosen elements may look like this: s 1 , s 2 , s 3 , . .. Such an infinite set is called denumerable . Both finite and denumerable sets are countable sets because we can count, or enumerate the elements in the set. Being countable, however, does not always mean that we can give a value for the total number of elements in the set; it just means we can say "Here is a first one, here is a second one, etc.". More formally, a denumerable set is one where we can define a one-to-one correspondence between the elements in the set and the set of positive integers, denoted Z + . Thus, the set Z + is, in a sense, the most basic of all infinite sets. The reason for this is that the one-to-one correspondence can be used to "count" the elements of an infinite set. If f is a one-to- one and onto function from Z + to some infinite set A, then f(1) can be designated as the first element of A, f(2), the second, and so forth. Because f is one-to-one, no element is ever counted twice; and because f is onto, every element of A is counted eventually. To prove denumerability, we need only exhibit a counting scheme (i.e., if starting from a particular element, we can sequentially list all the elements in the list), because such a listing will yield a one-to-one correspondence between the elements in the set and Z + . The counting scheme is the function that maps Z + to some other infinite set.
Background image of page 1

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

View Full DocumentRight Arrow Icon
- 2 - Example 1 The set of positive even integers {2, 4, 6, 8, . ..} is denumerable because there is an obvious one- to-one correspondence between these integers and the positive integers (f(k) = 2k). The set of all integers is denumerable because we can list them as follows: {0, 1, -1, 2, -2, 3, -3 . ..} and define the following one-to-one correspondence: f(n) = n/2 if n is even, -((n-1)/2) if n is odd. But at first blush, these examples seem to go against common sense. We might think to ourselves that the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/26/2009 for the course CS 103B taught by Professor Sahami,m during the Winter '08 term at Stanford.

Page1 / 8

Handout 5 - Mehran Sahami CS103B Handout #5 January 9, 2009...

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