0% found this document useful (0 votes)
223 views

CSC 203 - Lecture 1

Uploaded by

dollarmonei388
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
223 views

CSC 203 - Lecture 1

Uploaded by

dollarmonei388
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

CSC 203

DISCRETE STRUCTURES

LECTURER IN CHARGE: MISS FALOLA

i
Textbooks and References

• THEORY AND PROBLEMS OF DISCRETE MATHEMATICS- Seymour Lipschutz., 3rd


Edition, Marc Lars Lipson. Schaum’s Outline Series, McGraw-Hill. DOI:
10.1036/0071470387
• DISCRETE MATHEMATICS – An Open Introduction 3rd Edition, Oscar Levin, 2019. ISBN:
978-1792901690
• DISCRETE MATHEMATICS AND ITS APPLICATION, Kenneth H. Rosen, Tata McGraw-
Hill Editions, 2003
• INTRODUCTION TO GRAPH THEORY – Richard J. Trudean, Dover publisher, Inc New
York, 2013. ISBN: 13: 978-0-486-67870-2
• A TEXT BOOK OF GRAPH THEORY – Balakrishnan, R and Ranganathan, K, 2012.
Department of Mathematics, University of Tiruchirappalli India. ISBN: 2191-6675
(electronic)
• PURE MATHEMATICS FOR ADVANCED LEVEL - Bunday, BD and Mulholland, H.
(2014). Second edition. Published by Elsevier science. ISBN: 1483106136, 9781483106137
• DISCRETE STRUCTURES, LOGIC AND COMPUTABILITY. James, H. (2017). Published
by Jones and Bartlett. Fourth Edition. ISBN:978-284-07040-8.
• A COURSE IN DISCRETE STRUCTURES - Pass, R., & Tseng, W. L. D (2019). Wei-Lung
Dustin Tseng, Site Internet: www.freechbooks.com(2019)
• DISCRETE MATHEMATICS FOR COMPUTER SCIENCE - Haggard, G., Schlipf J.,
Whitesides, S., (2006). Thomson Brooks/Cole.

ii
CONTENT

Module 1: Introduction to Discrete Structures

Unit 1: Sets
Unit 2: Proofs and Induction
Unit 3: Logic

iii
MODULE 1 INTRODUCTION TO DISCRETE STRUCTURES
Unit 1: Set Theory
Unit 2: Proofs and Induction
Unit 3: Logic

UNIT 1: SET THEORY

CONTENTS

1.0 Introduction
2.0 Objectives
3.0 Main Content
3.1 Introduction to Mathematical Statements
3.1.1 Statement Definition
3.1.2 Logical Connectives
3.2 Sets
3.2.1 Definition of Set
3.2.2 Notations
3.2.3 Operations on Set
3.2.4 Rules of Set theory
3.2.5 Disjoint Set
3.2.6 Power Set
3.2.7 Venn Diagram
3.3 Relations
3.3.1 Definition of Relations
4.0 Conclusion
5.0 Summary
6.0 Tutor-Marked Assignment
7.0 References/Further Reading

4
1.0 Introduction
This unit describes Set Theory, a mathematical theory that underlies all of modern
mathematics. The best way to understand mathematics is to talk and write about
mathematics. Mathematics is not all about finding solutions to given tasks. Therefore, as
we tackle a more advanced and abstract mathematics in this unit, your basic understanding
of it will be helped by how well you can read, write and talk about mathematical statements.

2.0 Objectives
By the end of this Unit, you will be able to:

• explain basic properties of sets and operations of sets


• work with sets precisely define the number of elements of a finite set
• discuss the essentials of mathematics
• describe what a declarative statement is.

3.0 Main Content


3.1 Introduction to Mathematical Statements
We will take a few examples of mathematical statements to illustrate what a proper
communication in mathematics is all about.
3.1.1 Statement Definitions
A declarative sentence which is either true or false is called a statement. A statement is
said to be an Atomic Statement if it cannot be divided into smaller statements, otherwise
it is called a Molecular Statement.
Example 3.1.1.1
These statements are examples of atomic statements:
• Mobile numbers in Nigeria have 11 digits.
• 5 is larger than 7.
• 12 is a perfect square.
• Every even number greater than 2 can be expressed as the sum of two primes.
However, these are not statements:
• Would you like some ice cream?
• The product of two numbers. • 1 + 3 + 5 + 7 + · · · + 2n + 1.
• Go to the lecture room!
• 4 + x = 12

5
The sentence “4 + x = 12” is not a statement because it contains an unknown variable, x.
Depending on the value of x, the sentence is either true or false, however, right now it is
neither true nor false. We can also build a complicated (molecular) sentence by
combining more than one or more simple atomic or molecular sentences by using Logical
Connectives. An example of a molecular stamen is:
Mobile numbers in Nigeria have 11 digits and 5 is larger than 7.
This example of a molecular statement can also be broken down into smaller statements
which were only connected by an “and”. Obviously, molecular statements are still
statements, therefore, they must be either true or false. The five connectives we can
consider are “and”, “or”, “if… then”, “if and only if”, and “not.
“and” - I am a boy and my sister is a girl.
“or” - Delight is a boy or a girl.
“if… then” - If you register then you can write the exam.
“if and only if”- You can register if and only if you were admitted.
“not - You are not admitted.
The connectives, “and”, “or”, “if… then”, “if and only if”, connects two statements and
are called binary connectives while the connective “not” applies to only a single sentence
and is called a unary connective.
In order to determine the truth values of molecular statements, the key observation to make
is to completely determined the truth values of the parts and the type of connective(s). We
do not necessarily need to know what the individual parts actually say, we however, only
need to know whether those parts are true or false. Therefore, in order to analyse logical
connectives, we use propositional variables (also called sentential variables) which are
the letters found in the middle of the English alphabet represented in capital: P, Q, R, S, …
to represent each atomic statements in the molecular statement. These variables can only
have two values, true or false. The logical connectives: “and”, “or”, “if… then”, “if and
only if”, and “not” can be represented by these symbols ˄, ˅, →, ↔, and ¬ respectively.

3.1.2 Logical Connectives


• P ∧ Q is read as “P and Q,” and it is called a conjunction.
• P ∨ Q is read as “P or Q,” and it is called a disjunction.

6
• P → Q is read as “if P then Q,” and it is called an implication or conditional.
• P ↔ Q is read as “P if and only if Q,” and it is called a bi-conditional.
• ¬P is read as “not P,” and it is called a negation.
The truth value of a statement is determined by the truth value(s) of its part(s), depending
on the connectives:
Truth Conditions for Connectives.
• P Q is true when both P and Q are true
•P Q is true when P or Q or both are true.
• P → Q is true when P is false or Q is true or both.
• P ↔ Q is true when P and Q are both true, or both false.
• ¬P is true when P is false and vice versa.

3.2 Sets
Sets are the most fundamental objects in all of mathematics.
3.2.1 Definition of Set: An informal definition of set is that a set is an unordered
collections of objects. The objects that comprises of the set are called elements. The
number of objects in a set can be finite or infinite.
3.2.2 Notations
A single set, A can be expressed with the following notations:
A = {1, 2}; A = {2, 1}; A = {1, 2, 1, 2}; A = {x | x is an integer, 1 ≤ x ≤ 2}
The notation, A = {1, 2} is read as, “A is the set containing the elements 1 and 2.”
The curly braces “{ }” is used to enclose the elements of a set and the comma “,” is used
to separate the elements inside the braces.
The symbol “|” (or “:” or “”), implies “such that”. Therefore, the notation, {x | x is an
integer, 1 ≤ x ≤ 2} is read as “the set of all x such that x is an integer between 1 and 2 (1
and 2 inclusive)”.
Considering the notation:
5 {1, 2, 5}
The symbol “ ” implies “is in” or “is an element of.” Therefore, the notation is read as 5
is an element of a set containing 1,2, and 5. This is a true statement. We can also write

7
another true statement if we say that 3 “is not” an element of the set containing 1,2, and 5.
This can be written as:
3 {1, 2, 5}
Some other notations
⊆: A B asserts that A is a subset of B | every element of A is also an element of B.
If A is {2, 3, 4}, B is {2, 3, 4, 5}. Then A B.
If A is {2, 3, 4}, B is {2, 3, 4}. Then A B and B A.
If A is {2, 3, 4, 5}, B is {2, 3, 4, 6, 7}. Then B A.
A B asserts that A is a proper subset of B | every element of A is also an element of
B, but every element of B is not an element of A.
Let A = {2, 3, 4} and B = {1, 2, 3, 4, 5}. Then, A B.
If A is {2, 3, 4}, B is {2, 3, 4}. Then A B (read as A is a NOT a proper subset of B).
U: A fixed set which contains all other sets under investigation is called universal set. In
other words, all other sets under investigation are subsets of the universal set and it is
denoted by U.
Example: Considering human population, the universal set consist of all people in the
world.

3.2.3 Operations on Sets


∪: A B is the union of A and B: is the set containing all elements which are elements of
A or B or both.
If A is {1, 2, 4, 5}, B is {2, 3, 4}. Then A B = {1, 2, 3, 4, 5}

∩: A ∩ B is the intersection of A and B: the set containing all elements which are
elements of both A and B.
If A is {1, 2, 4, 5}, B is {2, 3, 4}. Then A ∩ B = {2, 4}

\: A \ B is A minus B: the set containing all elements of A which are not elements of
B.

Let A = {1, 2, 4, 5, 6}, B = {2, 3, 4}. Then A \ B = {1, 5, 6}.

8
Ac or A:̅ The complement of A is the set of everything which is not an element of A. Let
the universal set, U be {1, 2, . . . , 9, 10}, A = {2, 3, 4}. Then Ac = {1, 5, 6, …, 9,
10}.

|A|: The cardinality (or size) of A is the number of elements in A.


|{1, 2, 3}| = |{a, b, c}| = |{1,{1, 2}, 5}| = |{1, 2, }| = 3.

×: A × B is the Cartesian product of two non-empty sets A and B: the set of all ordered pairs
(a, b) with a ∈ A and b ∈ B.
Let A be a set. A × A is the set of ordered pairs (x, y) where x, y ∈ A.
The expression A × A × · · · × A (n times) can also be denoted as An which is the set of all
ordered subsets (with repetitions) of A of size n.
Examples
i. {0, 1}n the set of all “strings” of 0 and 1 of length n.
ii. Let A = {1, 2}, B = {3, 4, 5}. Then A × B = {(1, 3), (1, 4), (1, 5), (2, 3), (2, 4), (2, 5)}.

Example 3.2.3.1
Prove that A × B = B × A, only if A = B.
Solution 3.2.3.1
Proof: Let A × B = B × A. then, A ⊆ B and B ⊆ A. Therefore, A = B.

3.2.4 Rules of Set Theory Let


P, Q and R be sets.
i. Commutative Law: (P ∪ Q) = (Q ∪ P) and (P ∩ Q) = (Q ∩ P).
ii. Associative Law: (P ∪ (Q ∪ R)) = ((P ∪ Q) ∪ R) and (P ∩ (Q ∩ R)) = ((P ∩ Q) ∩ R).
iii. Distributive Law: (P ∪ (Q ∩ R)) = (P ∪ Q) ∩ (P ∪ R) and (P ∩ (Q ∪ R)) = (P ∩
Q) ∪ (P ∩ R).
iv. De Morgan’s Law: (P ∪ Q)C = (Pc ∩ Qc ) and (P ∩ Q)C = (Pc ∪
Qc)

9
Some special sets we will consider in this unit:
•∅ The empty set that contains no element (also denoted as { }).
•U The universe set is the set of all elements
•ℕ {0, 1, 2, 3, . . . }, the non-negative integers
• ℕ+ {1, 2, 3, . . . }, the positive integers

•ℤ {. . . −2, −1, 0, 1, 2 . . . }, the integers


•ℚ {q | q = a/b, a, b ∈ ℤ, b 6= 0}, the rational numbers
• ℚ+ {q | q ∈ Q, q > 0}, the positive rational
•ℝ The real numbers
• ℝ+ The positive reals

• P(A) The power set of any set A is the set of all subsets of A.
3.2.5 Disjoint Set
Sets X and Y are said to be disjoint sets, if they have no element in common, that is, no
element of X is in Y and no element of Y is in X.
Example 3.2.5.1:
i. Given 𝑋 = {1,2,3} and 𝑌 = {4,5,6}, then 𝑋 and 𝑌 are disjoint sets.
ii. If 𝑃 = {𝑎, 𝑏, 𝑐, 𝑑} and 𝑄 = {𝑑, 𝑒, 𝑓, 𝑔}, then 𝑃 and 𝑄 are not disjoint sets, since 𝑑 is
in both sets.
3.2.6 Power Set

We call the set of all subsets of A, the power set of A, and write it as P(A) Example
3.2.6.1 Let A = {1, 2, 3}. Find P(A).
Solution 3.2.6.1 P(A) is a set of sets, all of which are subsets of A.
So, P(A) = {∅, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}.
Note: The power set of a set A is normally, 2n, where n is the cardinality of the set A.
Therefore, since |A| = 3, the cardinality of the power set of A, |P(A)| = 23 = 8.
Note: Although 2 ∈ A, it will be wrong to say that 2 ∈ P(A) because none of the elements
in P(A) are numbers. However, we can say that {2} ∈ P(A) because {2} ⊆ A.

We can relate the symbols of union and intersect to resemble the logic symbols of “or” and
“and”. Remember that the statement x ∈ A ∪ B is read as x is an element of A or x is an

10
element of B. Therefore, x ∈ A ∪ B ↔ x ∈ A ∨ x ∈ B. Similarly, x ∈ A ∩ B ↔ x ∈ A ∧ x
∈ B. Also, x ∉ A ↔ ¬(x ∈ A)

Example 3.2.6.2
Let A = {2, 4, 6}, B = {1, 2, 3, 4, 5, 6}, C = {1, 2, 3}, D = {1, 3, {4, 5}, x}, and
E = {7, 8, 9}.
Determine each statement to be either true, false, or meaningless.
1. A ⊂ B. 2. B ⊂ A. 3. A ∈ C. 4. ∅ ∈ B. 5. ∅ ⊂ A.
6. A < E. 7. 3 ∈ C. 8. x ⊂ D. 9. {9} ⊂ E.

Solution 3.2.6.2
1. True. Every element in A is an element in B.
2. False. For example, 1 ∈ B but 1 ∉ A.
3. False. The elements in C are 1, 2, and 3. The set A is not equal to 1, 2, or 3.
4. False. The set B has exactly 6 elements, and none of them is an empty set.
5. True. Everything in the empty set (nothing) is also an element of A. Notice that the
empty set is a subset of every set.
6. Meaningless. A set cannot be less than another set.
7. True. 3 is one of the elements of the set C.
8. Meaningless. x is not a set, so it cannot be a subset of another set.
9. True. 9 is the only element of the set {9}, and is an element of E, so every element in
{9} is an element of E.

3.2.7 Venn Diagrams


A Venn Diagram is a great tool used to visualize and represent operations on sets. It is used
to display sets as intersecting circles. We can highlight a region under consideration when
we carry out an operation. The cardinality of a set can be represented by putting numbers
in the corresponding area.

11
3.3 Relations
3.3.1 Definition 3.3.1: A relation on a single set S is a subset of S × S. A relation on sets
S and T is a subset of S × T. Now, let’s consider relationships among sets. For example,
we can say that X is married to Y and they both have a child, Z. In our daily lives, we deal
a lot with talks about relationships. For example, if we consider two human beings (A, B),
“taller-than”, “smarter-than” are relations between them. That is (A, B) “taller-than” if
person A is taller than person B. “≥” is a relation on R; “≥” = {(x, y) | x, y R, x ≥ y}.
3.3.2 Definition: A relation R on a set S is:
i. Reflexive if for all x S, (x, x) R.
ii. Symmetric if for all x, y S, whenever (x, y) R, (y, x) R.
iii. Transitive if for all x, y, z S, whenever (x, y) R and (y, z) R, then (x, z) R.

Example 3.3.1.1
i. “≤” is reflexive, but “<” is not.
ii. “sibling-of” is symmetric, but “≤” and “sister-of” is not.
iii. “sibling-of”, “≤”, and “<” are all transitive, but “parent-of” is not (however,
“ancestor of” is transitive).

12
A relation that is reflexive, symmetric and transitive is called an Equivalence relation and
is denoted by the symbol “≡”.
Let “≡” be an equivalence relation on the set S. An equivalence class is a maximal subset
E of the set S such that any two elements in the set E is related. There can be multiple
equivalence class corresponding to the relation ≡.

4.0 Conclusion
The bulk of work in this unit is on how set theory (a branch of mathematical logic gives
insight into how Discrete Structure are viable in Computer Science. Emphasis were made
on a set being a collection of objects or groups of objects. The unit further highlighted on
the rules of set theory and its power set.
5.0 Summary
In this unit we learnt that Sets are the most fundamental objects in all of mathematics. That,
a set is a collection of objects or groups of objects. A statement can be an Atomic Statement
if it cannot be divided into smaller statements, otherwise it is called a Molecular Statement.
There are rules governing the set and Venn diagram is a great tool used to visualize and
represent operations on sets.

13
7.0 References/Further Reading
Bunday, BD and Mulholland, H. (2014). Pure Mathematics for Advanced Level. Second edition.
Published by Elsevier science. ISBN: 1483106136, 9781483106137

James, H. (2017). Discrete Structures, Logic and Computability. Published by Jones and
Bartlett. Fourth Edition. ISBN:978-284-07040-8.

Seymour, L. S. (1964). Outline Series: Theory and Problems of Set Theory and Related Topics,
pp. 1-133.

Stroud, KA. (2013) Engineering Mathematics. 7th edition. www.pdffiller.com/448950026--


ENGINEERING-MATHEMATICS-7TH-EDITION-by-KA-Stroud.

14

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy