Comprehensive Notes on Sets, Functions, Sequences, and Matrices in Discrete Mathematics
Foundations of Discrete Structures: Sets, Functions, Sequences, Sums, and Matrices
Discrete mathematics is fundamentally concerned with discrete structures used to represent discrete objects. Many of these structures, including combinations, relations, graphs, and finite-state machines, are constructed using sets. Sets are collections of objects. Functions, which assign elements of one set to exactly one element of another set, are equally vital, playing roles in representing computational complexity, counting objects, and studying the size of sets. Sequences and strings represent special types of functions. Matrices are employed to represent discrete structures like relations and graphs and are manipulated through matrix arithmetic to solve complex problems.
Set Theory Fundamentals
A set is an unordered collection of objects, referred to as elements or members. A set is said to contain its elements. The notation denotes that is an element of set , while signifies that it is not.
Describing Sets
There are several methods for describing a set:
Roster Method: Listing all members between braces.
Example: The set of vowels in the English alphabet is .
Example: The set of odd positive integers less than is .
Sets can contain unrelated elements, such as .
Ellipses () are used when the pattern is obvious. The set of positive integers less than is .
Set Builder Notation: Characterizing elements by stating the properties they must possess.
Example: .
Example: The set of positive rational numbers .
Important Sets in Discrete Mathematics
, the set of natural numbers. (Note: Some authors exclude , but it is included here).
, the set of integers.
, the set of positive integers.
, the set of rational numbers.
, the set of real numbers.
, the set of positive real numbers.
, the set of complex numbers.
Intervals
For real numbers and with a < b:
Closed interval:
Left-closed, right-open: [a, b) = \{x \mid a \le x < b\}
Left-open, right-closed: (a, b] = \{x \mid a < x \le b\}
Open interval: (a, b) = \{x \mid a < x < b\}
Set Equality and Types
Definition of Equality: Two sets are equal if and only if they have the same elements. if and only if .
The order of elements does not matter: .
Repetition does not matter: .
Empty Set: Also called the null set, denoted by or , it contains no elements.
Singleton Set: A set with exactly one element. Note that ; the latter is a singleton set containing the empty set.
Relationships Between Sets
Subsets
Set is a subset of () if and only if every element of is also an element of . This is expressed by the quantification .
To show , show that if , then .
To show , find a single counterexample such that .
Theorem 1: For every set , (i) and (ii) .
Proper Subsets: if but . This requires .
Venn Diagrams
Named after John Venn (), these represent sets graphically.
The Universal Set is represented by a rectangle.
Sets are represented by circles within the rectangle.
Points may represent specific elements.
Size and Power Sets
Cardinality: If a set contains exactly distinct elements where is a nonnegative integer, is finite and its cardinality is .
An infinite set is one that is not finite (e.g., ).
Power Set: The set of all subsets of , denoted .
Example: if , .
If a set has elements, its power set has elements.
Cartesian Products
Ordered n-tuple: is an ordered collection. Two -tuples are equal if every corresponding pair of elements is equal.
Cartesian Product (): The set of all ordered pairs where and . .
unless , , or .
Relations: A subset of the Cartesian product is a relation from to .
Set Operations
Basic Operations
Union (): . Shaded as the area in either circle in a Venn diagram.
Intersection (): . Shaded as the overlapping area.
Two sets are disjoint if .
Principle of Inclusion-Exclusion: For finite sets, .
Difference (): Elements in but not in . Also called the complement of with respect to .
Complement (): Elements in the universal set not in . .
Set Identities
Identity Laws: ;
Domination Laws: ;
Idempotent Laws: ;
Complementation Law:
Commutative Laws: ;
Associative Laws: ;
Distributive Laws: ;
De Morgan's Laws: ;
Absorption Laws: ;
Complement Laws: ;
Generalized Unions and Intersections
Computer Representation of Sets
A subset of a finite universal set can be represented by a bit string of length . The th bit is if and otherwise.
Union: Bitwise OR.
Intersection: Bitwise AND.
Complement: Bitwise NOT (flips bits).
Functions
Definitions
Function : Assignments of exactly one element of to each element of . If , is the unique element assigned to .
Domain: The set .
Codomain: The set .
Image/Preimage: If , is the image of and is the preimage of .
Range: The set of all images of elements of .
Function Arithmetic
For real-valued functions :
Injections, Surjections, and Bijections
One-to-One (Injective): is injective if for all in the domain.
Onto (Surjective): is surjective if for every , there exists such that .
One-to-One Correspondence (Bijective): both injective and surjective.
Inverse and Composition
Inverse Function (): If is a bijection, when .
Composition (): . Range of must be a subset of the domain of .
Floor and Ceiling Functions
Floor Function (Greatest Integer Function) (): The largest integer less than or equal to .
Ceiling Function (): The smallest integer greater than or equal to .
Example Calculations:
Properties:
\lfloor x \rfloor = n \iff n \le x < n + 1
\lceil x \rceil = n \iff n - 1 < x \le n
x - 1 < \lfloor x \rfloor \le x \le \lceil x \rceil < x + 1
Sequences and Summations
Sequences
A sequence is an ordered list, formally a function from a subset of integers to a set .
Geometric Progression: where is the initial term and is the common ratio.
Arithmetic Progression: where is the initial term and is the common difference.
Recurrence Relations
An equation expressing in terms of previous terms (e.g., ).
Fibonacci Sequence: defined by and for .
Iteration: A method to solve recurrences by forward or backward substitution.
Summations
The sum of terms is denoted by .
Geometric Series Formula:
Important Finite Sums:
Infinite Series: For |x| < 1, .
Cardinality and Infinite Sets
Countability
Two sets have the same cardinality if there is a one-to-one correspondence between them.
Countable Set: Finite or has the same cardinality as the positive integers (, read as "aleph null").
Uncountable Set: Not countable.
Surprising Results:
The set of all integers is countable ().
The set of positive rational numbers is countable (shown via a grid traversal excluding repeats).
The set of real numbers is uncountable. This is proven via Cantor's Diagonalization Argument.
Schröder-Bernstein Theorem
If and , then . Equivalently, if there are injections from to and to , there is a bijection.
Uncomputable Functions
A function is uncomputable if no program can calculate all its values. Because the set of computer programs is countable but the set of functions from to is uncountable, such functions must exist.
Continuum Hypothesis
Asserts there is no cardinal number such that \aleph_0 < X < c, where . It has been shown that this hypothesis can neither be proven nor disproven under standard set theory axioms (Zermelo-Fraenkel).
Matrices
A matrix is a rectangular array of numbers. An matrix has rows and columns.
Matrix Operations
Addition: For two matrices and , the sum .
Multiplication (): Defined when the number of columns in equals the number of rows in . If is and is , is an matrix where .
Matrix multiplication is not commutative ( in general).
Identity Matrix (): Square matrix with s on the main diagonal and s elsewhere. .
Transpose (): Obtained by swapping rows and columns ().
Symmetric Matrix: Square matrix where .
Zero-One Matrices
Matrices with only and as entries.
Join (): Entrywise Boolean OR.
Meet (): Entrywise Boolean AND.
Boolean Product (): Similar to matrix multiplication but with OR () replacing addition and AND () replacing multiplication.
Boolean Powers (): The Boolean product of factors of .