Unit-1: Discrete Mathematics CST-253
Unit-1: Discrete Mathematics CST-253
UNIT- 1
DISCRETE MATHEMATICS
CST-253
Course Objectives
Course Outcome
SETS
Other examples:
The set of all polynomials with degree at most three: {1, x, x2, x3, 2x+3x2,…}.
A B
not a subset
• If A={4, 8, 12, 16} and B={2, 4, 6, 8, 10, 12, 14, 16}, then but
• If A is the set of prime numbers and B is the set of odd numbers, then
A B
Fact: If A = B, then |A| = |B|.
1. ?
2. {3} {5,7,3}?
3. every set?
5. {a} = {{a}}?
6. If A B and B C, then A C?
7. If A B and B C, then A C?
intersection:
e.g. Let A be the set of odd numbers, and B be the set of even numbers.
Then A and B are disjoint.
union:
University
Fact: Institute of Engineering
Department of Computer Science and Engineering (CSE)
Basic Operations on Sets
difference:
Fact:
complement:
Fact: If , then
University Institute of Engineering
Department of Computer Science and Engineering (CSE)
Examples
Exercise:
University compute
Institute |A|, |B|, |A B|, |A
of Engineering B|, |A – B|.
Department of Computer Science and Engineering (CSE)
Partitions of Sets
Using the above examples, AxAxA is the set of strings with three letters.
Our ID card number has one letter and then six digits,
so the set of ID card numbers is the set AxBxBxBxBxBxB.
Fact: |AInstitute
University 1xA2x…xA | = |A1|x|A2|x…x|Ak|.
of kEngineering
Department of Computer Science and Engineering (CSE)
Exercises
1. Let A be the set of prime numbers, and let B be the set of even numbers.
What is A B and |A B|?
3. Let A be the set of all n-bit binary strings, Ai be the set of all n-bit
binary strings with i ones. Is (A1, A2, …, Ai, …, An) a partition of A?
Some basic properties of sets, which are true for all sets.
(2)
A B A B
C C
University Institute of Engineering
(1) (2)
Department of Computer Science and Engineering (CSE)
Set Identities
Distributive Law:
L.H.S
S1 S2
S3
A B
S4
S5 S6
R.H.S.
S7
C
University Institute of Engineering
Department of Computer Science and Engineering (CSE)
Set Identities
De Morgan’s Law:
De Morgan’s Law:
1 2 3 1 2 3
A B A B
4 5 6 4 5 6
7 7
C C