CSC 316 Lecture 1
CSC 316 Lecture 1
Discrete Systems
CSC 316
Lecture 1
FINITE SETS, COUNTING PRINCIPLE
• Sets can be finite or infinite. A set S is said to be finite if S is empty or
if S contains exactly m elements where m is a positive integer;
otherwise S is infinite.
• Examples
a.) The set A of the letters of the English alphabet and the set D of the
days of the week are finite sets. Specifically, A has 26 elements and D
has 7 elements.
b.) Let E be the set of even positive integers, and let I be the unit
interval, that is,
FINITE SETS, COUNTING PRINCIPLE
• Then both E and I are infinite.
• A set S is countable if S is finite or if the elements of S can be arranged
as a sequence, in which case S is said to be countably infinite;
otherwise S is said to be uncountable.
• The above set E of even integers is countably infinite, whereas one
can prove that the unit interval I = [0, 1] is uncountable.
Counting Elements in Finite Sets
• The notation n(S) or |S| will denote the number of elements
in a set S. (Some texts use #(S) or card(S) instead of n(S).)
• Thus n(A) = 26, where A is the letters in the English alphabet,
and n(D) = 7, where D is the days of the week.
• Also n() = 0 since the empty set has no elements.
Counting Elements in Finite Sets
• Lemma: Suppose A and B are finite disjoint sets. Then A ∪ B is finite
and
• For example,
• Suppose an art class A has 25 students and 10 of them are taking a
biology class B. Then the number of students in class A which are not
in class B is:
Counting Elements in Finite Sets
• Given any set A, recall that the universal set U is the disjoint union of
A and AC.
• Corollary: Let A be a subset of a finite universal set U. Then
• For example,
• Suppose a class U with 30 students has 18 full-time students. Then
there are 30 − 18 = 12 part-time students in the class U.
Inclusion–Exclusion Principle
• There is a formula for n(A ∪ B) even when they are not disjoint, called
the Inclusion–Exclusion Principle. Namely:
• Theorem (Inclusion–Exclusion Principle): Suppose A and B are finite
sets. Then A ∪ B and A ∩ B are finite and