More Related Content
Similar to Introduction fundamentals sets and sequences (notes)
Similar to Introduction fundamentals sets and sequences (notes) (20)
Introduction fundamentals sets and sequences (notes)
- 1. 9/9/2014
1
Discrete Mathematics
CSC 1700-4
Contact Information
Sherzod Turaev
Assistant Professor, Dr.
Department of Computer Science
Kulliyyah of Information & Communication Technology
Office: C3‐21
Email: sherzod@iium.edu.my
Web: www.sherzod.info
2© S. Turaev, CSC 1700 Discrete Mathematics
Classes
Lectures
Time: 11.30 AM – 12.50 PM
Date: Tuesday & Thursday
Location: Level 4C, LR19
Tutorial Classes
Time: 17.00 – 18.50 PM
Date: Thursday
Location: Level 1C, LR1
3© S. Turaev, CSC 1700 Discrete Mathematics
- 2. 9/9/2014
2
Required Reference
Kolman, Busby, Ross
Discrete Mathematical
Structures
6/E.
NJ: Pearson Prentice
Hall
2013 (2009)
4© S. Turaev, CSC 1700 Discrete Mathematics
Recommended References
1. Rosen, K. (2013) Discrete Mathematics and Its
Applications. 7/E. NY: McGraw Hill.
2. Epp, S. (2011) Discrete Mathematics with
Applications. 4/E. Brooks/Cole Cengage
Learning.
3. Johnsonbaugh, R. (2009) Discrete
Mathematics. 6/E. NJ: Pearson Prentice Hall.
5© S. Turaev, CSC 1700 Discrete Mathematics
i‐Taleem System
http://italeem.iium.edu.my/
• Lecture Slides/Notes
• Home assignments
• Assessment Results
• Announcements, Discussions, Q&A, etc.
6© S. Turaev, CSC 1700 Discrete Mathematics
- 3. 9/9/2014
3
Course Assessments & Marking
7© S. Turaev, CSC 1700 Discrete Mathematics
METHOD MARKING (%)
Home assignments (5) 10
Quizzes (3) 30
Mid‐term examination 20
Final examination 40
Course Outline
Week Topics
1 Fundamentals
Sets and subsets. Operations on sets.
Sequence. Properties of Integers. Matrices.
2‐3 Logic
Propositions and Logical operations.
Conditional statements. Methods of proof.
Mathematical induction.
8© S. Turaev, CSC 1700 Discrete Mathematics
Course Outline
Week Topics
4 Counting
Permutations. Combinations. Pigeonhole
principle. Elements of probability.
Recurrence relations.
9© S. Turaev, CSC 1700 Discrete Mathematics
- 4. 9/9/2014
4
Course Outline
Week Topics
5‐6 Relations and Digraphs
Product sets and partitions. Relations and
digraphs. Paths in relations and digraphs.
Properties of relations. Equivalence
relations.
Data structures for relations and digraphs.
Operations on relations. Transitive closure
and Warshall’s algorithm.
10© S. Turaev, CSC 1700 Discrete Mathematics
Course Outline
11© S. Turaev, CSC 1700 Discrete Mathematics
Week Topics
7 Functions
Functions. Functions for computer science.
Growth of functions. Permutation functions.
8‐9 Order Relations and Structures
Partially ordered sets. Lattices. Finite
Boolean algebras. Functions of Boolean
algebras. Circuit design.
Course Outline
12© S. Turaev, CSC 1700 Discrete Mathematics
Week Topics
10 Trees
Trees. Labeled trees. Tree searching.
Undirected trees. Minimal spanning trees.
11‐12 Topics in Graph Theory
Graphs. Euler paths and circuits. Transport
networks. Matching problems. Coloring
graphs.
- 5. 9/9/2014
5
Course Outline
13© S. Turaev, CSC 1700 Discrete Mathematics
Week Topics
13 Semigroups and Groups
Binary operations. Semigroups. Products
and quotients of semigroups. Groups.
Products and quotients of groups. Other
mathematical structures.
14 Groups and Coding
Coding of binary information and error
detection. Decoding and error correction.
Public key cryptography.
Important Notes
! Attendance is compulsory (University Regulation)
! University dress code
! No mobiles/notes/tabs… (power off or mute mode)
! No late homework will be accepted. No exceptions
! No make‐up exams/quizzes will be given
! Do not be late
14© S. Turaev, CSC 1700 Discrete Mathematics
INTRODUCTION
- 6. 9/9/2014
6
What is Discrete Mathematics?
Discrete Mathematics is the part of Mathematics
devoted to the study of discrete (as opposed to
continuous) objects.
Examples of discrete objects: integers, steps taken by a
computer program, distinct paths to travel from point
A to point B on a map along a road network.
A course in discrete mathematics provides the
mathematical background needed for all subsequent
courses in computer science.
16© S. Turaev, CSC 1700 Discrete Mathematics
Discrete Mathematics is a Gateway
Topics in discrete mathematics will be important in many
courses that you will take in the future:
Computer Architecture,
Data Structures and Algorithms,
Programming Languages and Compilers,
Computer Security,
Databases,
Artificial Intelligence,
Networking,
Theory of Computation, …
17© S. Turaev, CSC 1700 Discrete Mathematics
Problems of Discrete Mathematics
How many ways can a password be chosen following
specific rules?
How many valid Internet addresses are there?
What is the probability of winning a tournament?
Is there a link between two computers in a network?
How can I identify spam email messages?
How can I encrypt a message so that no unintended
recipient can read it?
18© S. Turaev, CSC 1700 Discrete Mathematics
- 7. 9/9/2014
7
Problems of Discrete Mathematics
How can we build a circuit that adds two integers?
What is the shortest path between two cities using a
transportation system?
How can we represent English sentences so that a
computer can reason with them?
How can we prove that there are infinitely many prime
numbers?
How can a list of integers be sorted so that the integers
are in increasing order?
19© S. Turaev, CSC 1700 Discrete Mathematics
Goals of Discrete Mathematics Course
Discrete Structures:
Abstract mathematical structures that represent
objects and the relationships between them. Examples
are sets, strings, sequences, permutations, relations,
graphs, trees, and finite state machines.
Combinatorial Analysis:
Techniques for counting objects of different kinds.
Mathematical Reasoning:
Ability to read, understand, and construct
mathematical arguments and proofs.
20© S. Turaev, CSC 1700 Discrete Mathematics
Goals of Discrete Mathematics Course
Algorithmic Thinking:
One way to solve many problems is to specify an
algorithm.
An algorithm is a sequence of steps that can be
followed to solve any instance of a particular
problem.
Algorithmic thinking involves specifying algorithms,
analyzing the memory and time required by an
execution of the algorithm, and verifying that the
algorithm will produce the correct answer.
21© S. Turaev, CSC 1700 Discrete Mathematics
- 8. 9/9/2014
8
Goals of Discrete Mathematics Course
Applications and Modeling:
It is important to appreciate and understand the
wide range of applications of the topics in discrete
mathematics and develop the ability to develop
new models in various domains.
Concepts from discrete mathematics have not only
been used to address problems in computing, but
have been applied to solve problems in many areas
such as chemistry, biology, linguistics, geography,
business, etc.
22© S. Turaev, CSC 1700 Discrete Mathematics
FUNDAMENTALS
Sets and Subsets
Definition: A set is any well‐defined collection of objects,
called the elements or members of the set.
Examples:
the collection of computers in the Lab;
the collection of students in IIUM.
Well‐defined: it is possible to decide if a given object
belongs to the collection or not.
The description of a set: to list the elements of the set
between braces:
1,2,3
24© S. Turaev, CSC 1700 Discrete Mathematics
- 9. 9/9/2014
9
Sets
Notes:
the listing order of the elements is not important:
2,1,3 3,2,1 1,2,3
the repetition of the elements can be ignored:
1,1,2,2,3,3,2,1 1,2,3
Notations:
uppercase letters, , , , … , denote sets
lowercase letters, , , , … , denote the elements
of sets
25© S. Turaev, CSC 1700 Discrete Mathematics
Sets
Notations:
∈ : is an element of .
∉ : is not an element of .
Example: 1,3,5,7
1 ∈ , 3 ∈
2 ∉ , 4 ∉
26© S. Turaev, CSC 1700 Discrete Mathematics
Sets
Q: how to describe a set if it is impossible or inconvenient
to list its elements?
A: define a set by specifying a property that the elements
of the set have in common.
“the set of all such that ”
denotes a statement concerning to
Example: 1,2,3 ?
27© S. Turaev, CSC 1700 Discrete Mathematics
- 10. 9/9/2014
10
Sets
is a positive integer
is a positive integer or zero
is an integer
ℚ is a rational number
is a real number
The empty set, denoted by or ∅, has no elements
28© S. Turaev, CSC 1700 Discrete Mathematics
Empty Set
Exercise: Which of the following sets are the empty set?
1. | ∈ ∧ 1 0
2. | ∈ ∧ 1 0
3. | ∈ ∧ 9
4. | ∈ ∧ 2 1
29© S. Turaev, CSC 1700 Discrete Mathematics
Sets
Definition: Two sets and are equal if they have the
same elements, we write .
Example:
1,2,3
is a positive integer and 13
?
30© S. Turaev, CSC 1700 Discrete Mathematics
- 11. 9/9/2014
11
Subsets
Definition: If every element of is also an element of ,
then we say that is a subset of , and we write ⊆ .
• Venn diagrams show relationships between sets.
Example: ⊆ , ⊆ ℚ, ℚ ⊆
Example: 1,2,3,4,5,6 , 2,4,5 , 1,2,3,4,5
Example: , , Q: ⊆ ? ∈ ?
• A “universal set” contains all objects for which the
discussion is meaningful.
31© S. Turaev, CSC 1700 Discrete Mathematics
Subsets
Definition: A set is called finite if it has ∈ distinct
elements, and is called the cardinality of , and is
denoted by | |.
Definition: A set that is not finite is called infinite.
Definition: The set of all subsets of is called the power
set of , and is denoted by Ρ or 2 .
Example: Let 1,2,3
Ρ ∅, 1 , 2 , …
32© S. Turaev, CSC 1700 Discrete Mathematics
Subsets
Exercise: Let ∈ ∧ 16 . Identify each
of the following is true or false.
1. 0,1,2,3 ⊆
2. 3, 2, 1 ⊆
3. ⊆
4. ∈ ∧ | | 4 ⊆
33© S. Turaev, CSC 1700 Discrete Mathematics
- 12. 9/9/2014
12
Operations on Sets
Definition: If and are sets, we define their union as
the set consisting of all elements that belong to or
and denote it by ∪ .
∪ ∈ or ∈
Example: Let , , , , and , , , .
∪
• Venn diagram?
34© S. Turaev, CSC 1700 Discrete Mathematics
Operations on Sets
Definition: If and are sets, we define their
intersection as the set consisting of all elements that
belong to both and and denote it by ∩ .
∩ ∈ and ∈
Example: Let , , , , and , , , .
∩
Example: Let 1,2,3,4,5 and 10,100,1000 .
∩
• Venn diagram?
35© S. Turaev, CSC 1700 Discrete Mathematics
Operations on Sets
∪ ∪ ∈ or ∈ or ∈
∩ ∩ ∈ and ∈ and ∈
The union of , , … ,
∪ ∪ ⋯ ∪
The intersection of , , … ,
∩ ∩ ⋯ ∩
36© S. Turaev, CSC 1700 Discrete Mathematics
- 13. 9/9/2014
13
Operations on Sets
Definition: If and are sets, we define the
complement of w.r.t. (or the difference) as the set
consisting of all elements that belong to but not to
and denote it by (or B).
∈ and ∉
Example: Let , , , , and , , , .
• Venn diagram?
37© S. Turaev, CSC 1700 Discrete Mathematics
Operations on Sets
Definition: If is a universal set containing , is
called the complement of and is denoted by ̅.
̅ ∉
Example: Let ∈ and 4 and .
̅
• Venn diagram?
38© S. Turaev, CSC 1700 Discrete Mathematics
Operations on Sets
Definition: If and are sets, we define the symmetric
difference as the set consisting of all elements that
belong to or to , but not to both and , and denote
it by ⊕ .
⊕ ∈ or ∈
Example: Let , , , , and , , , .
⊕
• Venn diagram?
39© S. Turaev, CSC 1700 Discrete Mathematics
- 14. 9/9/2014
14
Algebraic Properties
Commutative properties:
∪ ∪
∩ ∩
Associative properties:
∪ ∪ ∪ ∪
∩ ∩ ∩ ∩
Distributive properties:
∩ ∪ ∩ ∪ ∩
∪ ∩ ∪ ∩ ∪
40© S. Turaev, CSC 1700 Discrete Mathematics
Algebraic Properties
Idempotent properties:
∪
∩
Properties of a universal set:
∪
∩
Properties of the empty set:
∪ ∅
∩ ∅ ∅
41© S. Turaev, CSC 1700 Discrete Mathematics
Algebraic Properties
Properties of the complement:
̿
∪ ̅
∅
∅
∪ ̅ ∩
∩ ̅ ∪
42© S. Turaev, CSC 1700 Discrete Mathematics
- 15. 9/9/2014
15
Exercise
Let 1,2,3,4,5,6,7,8,9 , 1,2,4,6,8 ,
2,4,5,9 , | ∈ ∧ 16 ,
and 7,8 . Compute:
1. 2. 3.
4. ̅ 5. ̅ 6. ⊕
7. ∩ ∪ 8. ∪ 9. ∩ ̅ ∪
43© S. Turaev, CSC 1700 Discrete Mathematics
The Addition Principle
Theorem (addition principle): If and are finite sets,
then
∪ ∩ B .
Example: Let , , , , and , , , , ,
∪
Theorem: If , and are finite sets, then
∪ ∪
∩ B ∩ ∩ |
∩ ∩ |.
44© S. Turaev, CSC 1700 Discrete Mathematics
Exercise
In a survey of 260 college students, the following date were
obtained:
• 64 had taken MATH,
• 94 had taken CS,
• 58 had taken IT,
• 28 had taken both MATH and IT,
• 26 had taken both MATH and CS
• 22 had taken both CS and IT
• 14 had taken all three courses
How many students surveyed had taken none of the three courses?
45© S. Turaev, CSC 1700 Discrete Mathematics
- 16. 9/9/2014
16
Sequences
Definition: A sequence is a list of objects arranged in a
definite order: a first element, a second element, and so
on.
If the list stops after ∈ steps, then it is finite; if
does not stop in any ∈ , then it is infinite.
Example:
1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1 (finite)
3, 8, 13, 18, 23, … (infinite)
46© S. Turaev, CSC 1700 Discrete Mathematics
Sequences
Sequences can be described by formulas:
recursive formula: refers to previous terms to
define the next term
3, 5
explicit formula: describes a term using only its
position number.
4 , 1
47© S. Turaev, CSC 1700 Discrete Mathematics
Sequences
Example: define recursive formulas for
3, 7, 11, 15, 19, 23, …
0, 2, 0, 2, 0, 2, …
Example: write explicit formulas for
2, 5, 8, 11, 14, 17, …
87, 82, 77, 72, 67, …
48© S. Turaev, CSC 1700 Discrete Mathematics