Diagonalization
Set Theory and Diagonalization
Introduction to Sets
A set is a collection of distinct elements where the number of elements may or may not be finite. These elements can be numbers, letters, symbols, or even other sets.
Example:
is a set with five elements.
Types of Sets
Countable Sets
A countable set is one that has either:
- A finite number of elements, or
- All its elements can be mapped bijectively to the elements of the set of natural numbers (for infinite sets)
Uncountable Sets
There exist some sets that are infinite and have no bijection with the set of natural numbers. Such sets are called uncountable sets and are Turing undecidable.
Example: The set of all real numbers is uncountable.
Functions and Their Properties
Surjective Functions
A function is surjective (or onto) if:
- Every element in set has a corresponding element in set
- The range of the function covers all elements in set
Example:
Consider where with:
- Here, is a surjective function.
Injective Functions
A function is injective (or one-to-one) if:
- Each element in set maps to a unique element in set
- No two distinct elements in set are mapped to the same element in set
Example:
Consider where with:
- Here, is an injective function.
Bijective Functions
A function that is both injective and surjective is called a bijective function. A permutation is an example of a bijective function.
Bijection with Natural Numbers
Example: Linear Function
Consider the function where:
- belongs to the natural numbers
- is a constant
This function provides a unique number for every unique . Even though may appear to be a proper subset of when is positive, there exists a unique for any , proving that the size of the sets must be the same.
Example: When , we get the set of all even numbers, demonstrating a bijection between natural numbers and even numbers.
Examples of Countable Sets
- Set of all natural numbers
- Set of all even numbers
- Set of all odd numbers
- Set of all integers
Cantor's Diagonalization Method
To determine if a given set is countable or not, we use the diagonalization method proposed by Georg Cantor.
Example: Binary Numbers
- Consider the set of all binary numbers
- Any binary number can be preceded by an infinite number of s
- The set can be written as a set of infinite number of infinitely long binary strings
- Arrange them in a numbered list starting from
- Take a binary string
- Set the th bit of to be the complement of th bit of the th binary string in the list
- This creates a binary string which differs from every possible binary string by at least one bit
Conclusion: This contradiction proves that our list (attempted bijection with natural numbers) did not contain all the binary numbers, thus proving that binary numbers are uncountable.