You are on page 1of 28

‫الَّسآلُم َع َلْيُك ْم َو َر ْح َم ُة هللا وَبَر كآُته‬

‫ِبسِم ِہللا الَّرحٰم ِن الَّر ِح يم‬


‫ُش روع ہللَا کے پاک نام سے جو بڑا مہر بان نہايت رحم واال ہے‬
Discrete Structures
COSC-1103

Aqeel –Ur- Rehman


aqeel.khokhar@kfueit.edu.pk
Week # 01
The Foundations: Logic and Proofs
Recommended books:
• Discrete Mathematics with Applications, 4th Edition by Susanna S. Epp, ISBN
978-0495391326
• Discrete Mathematics and Its Applications, 7th edition by Kenneth H. Rosen,
ISBN 978-0073383095
• Discrete Mathematics, 7th edition by Richard Johnson Baugh, ISBN 978-
0131593183
Aim of
Discrete Structure
To introduce you, to a mathematical way of thinking that
can serve you in a wide variety of situations.
We will introduce you to some of the special
language that are foundation for much
mathematical thought, the language of variables,
sets, relations, and functions etc.
Lecture Objectives
• Defining discrete mathematics/ structures
• Goals of discrete Mathematics
• What is a logic
• What is proofs
• Propositional logic
• Compound Propositions
• Negation, Not, ~, ¬, Tilde
• Conjunction, AND, ^, Hat
• Disjunction, OR, v, Vel
• Exclusive OR, ⊕, XOR
• Conditional Statement, Implication, →
What is Discrete Mathematics?
• Different from conventional mathematics.
• Study of isolated objects.
• Help to think logically and mathematically.
• Solve logical problem mathematically.
• Main aspects of this course,
• Mathematical reasoning Discrete Mathematics
• Combinatorial analysis concern’s, processes that
• Algorithmic thinking consist of a sequence of
• Application and molding individual steps.
Goal of Discrete Mathematics 1/4
Mathematical Reasoning
• It is simple logic or mathematical logic.
• It is used for both science and the art of constructing proofs.
• It is critical skill that enables to make use of all other mathematical
skills.
• With the development and understanding of mathematical
reasoning, one can recognize that mathematics makes sense and
can be understood.
Goal of Discrete Mathematics 2/4
Combinatorial Analysis
• How many different orders of an objects exist?
• Important branch of mathematics that help to understand problems and its
different solutions.
• Improve ability to count or (estimate) objects and its different outcomes.
• In order to solve problems combinatorial analysis help to think about
possibility of constructing & arrangements of objects which satisfy specific
conditions.
• Enumeration begins with basic techniques of counting. Stress is on
performing combinatorial analysis to solve counting problems and analyzing
algorithms.
Goal of Discrete Mathematics 3/4
Algorithmic Thinking
• Algorithmic thinking is ability to define clear steps to solve a problem, is crucial
in subjects like math and computer science.
• Different problems are solved by specification of an algorithm. After algorithm
formulation it can be transform into computer program.
• The mathematical portions of this activity, which include the specification of the
algorithm, verification that it works properly, and the analysis of the computer
memory and time required to perform it, are include in algorithmic thinking.
Note:- Algorithms are described using both English and an easily understood form of pseudo code.
Goal of Discrete Mathematics 4/4
Applications and Modeling
• Discrete mathematics has applications to almost every imaginable
area of study. Which include form computer science, networking,
chemistry, biology, geography, business, and the Internet.
• These applications are natural and important uses of discrete
mathematics and are not artificial. Modeling with discrete
mathematics is an extremely important problem-solving skill.
Why Discreet Structure?
• Discreet Structures is the part of mathematics devoted to the study to discrete
objects.
• How many ways are there to choose a valid password on a computer system?
• What is the probability of winning a lottery?
• Is there a link between two computers in a network?
• How can I identify spam e-mail messages?
• How can I encrypt a message so that no unintended recipient can read it?
• What is the shortest path between two cities using a transportation system?
• How can a list of integers be sorted so that the integers are in increasing order?
• How many steps are required to do such a sorting?
• How can it be proved that a sorting algorithm correctly sorts a list?
• How can a circuit that adds two integers be designed?
• How many valid Internet addresses are there?
Logic
Logic is the study of the principles and methods that distinguishes between a valid
and an invalid argument.
• Or
The rule of logic specify the meaning of mathematical statements.

Logic is the basis of all mathematical reasoning, and of all automated reasoning. As practical
application to design computing machines to …
For example:
There exists an integer that is not the sum of two squares.
For every positive integer n, sum of the positive integers not exceeding n is
n(n + 1)/2.
Proofs
• The study of making up a correct mathematical argument is
known as proof.
• Proof are also used to understand mathematics or mathematical
reasoning.
In fact:
proofs are used to verify that computer programs produce correct
output for all possible input values.
Propositional logic 1/3
• A proposition is a declarative sentence.
Or
• A sentence that declares a fact is also known as statement.

A proposition is either true or false, but on the same time can not be both
true and false.
The area of logic that deals with propositions is called the propositional
calculus or propositional logic.
Propositional logic 2/3
All the following declarative sentences are propositions.

1. Islamabad, is the capital of the Pakistan.


2. Multan is the capital of Punjab.
3. 1 + 1 = 2.
4. 2 + 2 = 3.

Note:
Propositions 1 and 3 are true, whereas 2 and 4 are false.
Propositional logic 3/3
Consider the following sentences.
1. What time is it?
2. Read this carefully.
3. x + 1 = 2.
4. x + y = z.
Note: Sentences 1 and 2 are not propositions because they are not declarative
sentences.
Sentences 3 and 4 are not propositions because they are neither true nor false.
Note: That each of sentences 3 and 4 can be turned into a proposition if we
assign values to the variables.
Study of proposition with logic is known as propositional logic or propositional
calculus.
Compound Propositions
• Combination of two or more propositions into a single proposition is known
as compound proposition.
• Proposition are combined with the help of different real life notation or
logics.
• George Boole name them logic connectives.

• A convenient method for analyzing a compound


statement is to make a truth-table for it.
• A truth table specifies the truth value
of a compound proposition for all possible truth
values of its constituent propositions.
Negation, Not, ~, ¬, Tilde
Let p be a proposition. The negation of p, denoted by ¬p (also denoted by p), is
a negative statement.
The proposition ¬p is read “not p.” The truth value of the negation of p, ¬p, is
the opposite of the truth value of p.

Example:
I came to know that Ali use Windows 8 in his laptop.
Now its negation will be.
I came to know that Ali is not using Windows 8 in his laptop.
Conjunction, AND, ^, Hat
Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, is
the proposition “p and q.”

The conjunction p ∧ q is true when both p and q are true and is false
otherwise
Disjunction, OR, v, Vel
Let p and q be propositions. The disjunction of p and q, denoted by p ∨
q, is the proposition “p or q.”

The disjunction p ∨ q is false when both p and q are false and is true
otherwise.

It is also known as inclusive OR


Exclusive OR, ⊕, XOR
Let p and q be propositions. The exclusive or of p and q, denoted by p ⊕ q, is
the proposition that is true when exactly one of p and q is true and is false
otherwise.
• It is also known as (p  q)  ~ (p  q)
p q p⊕q p Q pq pq ~ (pq) (pq)  ~ (pq)
T T F
T T T T F F
T F T
T F T F T T
F T T
F T T F T T
F F F F F F F T F
Conditional Statement, Implication, →
Let p and q be propositions. The conditional statement p → q is the proposition
“if p, then q.”
The conditional statement p → q is false when p is true and q is false, and true
otherwise.
In the conditional statement p → q, p is called the hypothesis (or antecedent or
premise) and q is called the conclusion (or consequence).
Example of implication
Let p= “Maria learns discrete mathematics” and q=“Maria will find a good
job.”
Express: p → q as a statement in English.

For p → q we can have:


• If Maria learns discrete mathematics, then she will find a good job.
• Maria will find a good job when she learns discrete mathematics.
• For Maria to get a good job, it is sufficient for her to learn discrete
mathematics.
• Maria will find a good job unless she does not learn discrete mathematics.
Book reference
• Discrete Mathematics and Its Applications, 7
edition – Rosen
• Chapter 01: Page number 1-8
• Discrete_Mathematics_with_Applications, 4
edition – Sounana
• Chapter 02: page number 23 to 31
Lecture Recap
1. Defining discrete mathematics/ structures
2. Goals of discrete Mathematics
3. What is a logic
4. What is proofs
5. Propositional logic
6. Compound Propositions
6.1. Negation, Not, ~, ¬, Tilde
6.2 Conjunction, AND, ^, Hat
6.3. Disjunction, OR, v, Vel
6.4. Exclusive OR, ⊕, XOR
6.5. Conditional Statement, Implication, →
1. What do you know about ARISTOTLE a Greek philosopher and
GEORGE BOOLE a England mathematician
2. Write your daily file in the form of logic.
End of Week
# 01

You might also like