0% found this document useful (0 votes)
13 views45 pages

Descrete Lec# 1

Uploaded by

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

Descrete Lec# 1

Uploaded by

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

Discrete Structure

Lec # 01

Sami Ullah Khan

05/12/2024 Sami Ullah khan 1


Course Administration
• Exams and Assessment
– Basically 2 exams method Mid & Final
• 10 Sessional1
• 15 Sessional2
• 50 Final
• 25 Assignment/Quizes
– Eliminating one Exam suggests that there is a clear room
for more practical work (so you must start getting
worried about it !!!)

05/12/2024 Sami Ullah khan 2


Course Requirements
• Assignments/Quizes
– Written assignments (Small Tasks) (details in coming
lectures)
– Idea is to initiate research oriented writing not “cut-
copy-paste”
– Attendance, Presentations, Quiz & Class Discussion &
Participation (as a regular activity)
– Sessional’s loot sale
– Formal Presentations in groups

05/12/2024 Sami Ullah khan 3


How to get good marks?

• Requirements
– Overall Class Attitude
– Things to Avoid (Referencing, Cut-Copy-Paste Culture,
Carelessness, leg-pulling)
– Things to do (Confidence, Work Attitude)
– Sense of Maturity and continuous learning

05/12/2024 Sami Ullah khan 4


Examination

• I personally believe in “thorough studies” so usually no choices given in


the exam
• Every thing discussed, during the class or given as reading material,
could be part of the exams
• Questions will be formulated in a way to examine both bookish as well
as conceptual thinking
• Other details will be given close to Sessional
• I will try to follow my simple rule that is
– “ I’ll be very friendly in the lectures and very strict in the exam hall
(believe me no chance of misconduct…)”

05/12/2024 Sami Ullah khan 5


Course Objective:
• Express statements with the precision of
formal logic
• Analyze arguments to test their validity
• Apply the basic properties and operations
related to sets
• Apply to sets the basic properties and
operations related to relations and functions
• Define terms recursively
• Prove a formula using mathematical induction
05/12/2024 Sami Ullah khan 6
Course Objective:
• Prove statements using direct and indirect
methods
• Compute probability of simple and conditional
events
• Identify and use the formulas of combinatory in
different problems
• Illustrate the basic definitions of graph theory and
properties of graphs
• Relate each major topic in Discrete Mathematics to
an application area in computing
05/12/2024 Sami Ullah khan 7
Recommended Books:

• Discrete Mathematics with Applications (second edition) by


Susanna S. Epp

• Discrete Mathematics and Its Applications (fourth edition)


by Kenneth H. Rosen

• Discrete Mathematics by Ross and Wright

05/12/2024 Sami Ullah khan 8


What is Discrete ?

05/12/2024 Sami Ullah khan 9


Difference Between Discrete and Continuous

05/12/2024 Sami Ullah khan 10


Difference Between Discrete and Continuous

• Example of Discrete Data


• Number of boys in the class.
• Number of candies in a packet.
• Number of Suitcases lost by an airline.

• Example of Continuous Data


• Height of a person.
• Time in a Race.
• Distance traveled by a car.

05/12/2024 Sami Ullah khan 11


WHY STUDY DISCRETE MATHEMATICS ?

 We study Discrete Mathematics because it is


necessary for understanding principle of CS
disciplines

 such as: data structures, algorithms, database


theory, formal languages, compiler theory,
artificial intelligence, operating systems,
computer security, and automata theory.

05/12/2024 Sami Ullah khan 12


WHAT IS DISCRETE MATHEMATICS?

 Discrete structure is the study of mathematical


structures that are fundamentally discrete rather than
continuous.

 In contrast to real numbers that have the property of


varying “smoothly”, the objects studied in discrete
mathematics – such as integers, graphs, and
statements in logic- do not vary smoothly in this way ,
but have distinct, separate values.

05/12/2024 Sami Ullah khan 13


WHAT IS DISCRETE MATHEMATICS?

 The mathematics of discrete (distinct and disconnected)


objects.
 In other words, it is the study of discrete objects and
relationships that bind them.
 The geometric representations of discrete objects have
gaps in them.
 For example, integers are discrete objects. On the other
hand, calculus deals with sets of connected (without gap)
objects. The set of real numbers and the set of points on a
plane are two such sets.
05/12/2024 Sami Ullah khan 14
LOGIC
• Logic is the study of the principles and methods
that distinguishes between a valid and an invalid
argument.
Examples:
• x +1 = 1
• x≠0
• x>2
• x<3

05/12/2024 Sami Ullah khan 15


SIMPLE STATEMENT
• A statement is a declarative sentence that is either
true or false but not both.
• A statement is also referred to as a proposition
Example: 2+2 = 4, It is Sunday today
• If a proposition is true, we say that it has a truth
value of "true”.
• If a proposition is false, its truth value is "false".
• The truth values “true” and “false” are, respectively,
denoted by the letters T and F.
05/12/2024 Sami Ullah khan 16
Examples

Proposition Not Proposition

• Grass is green. • Close the door.


• 4+2=6 • x is greater than 2.
• 4+2=7 • He is very rich
• There are four fingers in
a hand.

05/12/2024 Sami Ullah khan 17


Rule:
If the sentence is preceded by other sentences that make the pronoun or
variable reference clear, then the sentence is a statement

Example: Example:
• x=1 • Bill Gates is an American
• x>2 • He is very rich
• x > 2 is a statement with • He is very rich is a statement
truth-value FALSE. with truth-value TRUE.

05/12/2024 Sami Ullah khan 18


UNDERSTANDING STATEMENTS

Example:
 x + 2 is positive.  Not a statement
 May I come in?  Not a statement
 Logic is interesting.  A statement
 It is hot today.  A statement
 -1 > 0  A statement
 x + y = 12  Not a statement

05/12/2024 Sami Ullah khan 19


COMPOUND STATEMENT

Compound Statement: Simple statements could be


used to build a compound statement. It is made by
Logical Connectivity.

Logical Connectivity: AND, OR, NOT are called Logical


Connectives.

05/12/2024 Sami Ullah khan 20


COMPOUND STATEMENT

• EXAMPLES:

• “3 + 2 = 5” and “Lahore is a city in Pakistan”


• “The grass is green” or “ It is hot today”
• “Discrete Mathematics is not difficult to me”

05/12/2024 Sami Ullah khan 21


SYMBOLIC REPRESENTATION

Statements are symbolically represented by letters such as


p, q, r,...

EXAMPLES:
• p = “Islamabad is the capital of Pakistan”
• q = “17 is divisible by 3”

05/12/2024 Sami Ullah khan 22


SYMBOLIC REPRESENTATION

05/12/2024 Sami Ullah khan 23


SYMBOLIC REPRESENTATION
• EXAMPLES:
• p = “Islamabad is the capital of Pakistan”
• q = “17 is divisible by 3”
• p  q = “Islamabad is the capital of Pakistan and 17
is divisible by 3”
• p  q = “Islamabad is the capital of Pakistan or 17 is
divisible by 3”
• ~p = “It is not the case that Islamabad is the capital
of Pakistan” or simply
05/12/2024 Sami Ullah khan 24
TRANSLATING FROM ENGLISH TO
SYMBOLS
Let p = “It is hot”, and q = “ It is sunny”
SENTENCE SYMBOLIC FORM
 It is not hot.  ~p
 It is hot and sunny.  p q
 It is hot or sunny.  pq
 It is not hot but sunny.  ~ p q
 It is neither hot nor  ~p~q
sunny.
05/12/2024 Sami Ullah khan 25
EXAMPLE

Let h = “Zia is healthy”

w = “Zia is wealthy”
s = “Zia is wise”

Translate the compound statements to symbolic form:

1.Zia is healthy and wealthy but not wise.


(h  w)  (~s)

2.Zia is not wealthy but he is healthy and wise.


~w  (h  s)

3.Zia is neither healthy, wealthy nor wise.


~h  ~w  ~s
05/12/2024 Sami Ullah khan 26
TRANSLATING FROM SYMBOLS TO ENGLISH

Let
• m = “Ali is good in Mathematics”
• c = “Ali is a Computer Science student”

Translate the following statement forms into


plain English:

• ~c
• Ali is not a Computer Science student
05/12/2024 Sami Ullah khan 27
TRANSLATING FROM SYMBOLS TO ENGLISH
Let
• m = “Ali is good in Mathematics”
• c = “Ali is a Computer Science student”

• cm
• Ali is a Computer Science student or good in Maths.

• m  ~c
• Ali is good in Maths but not a Computer Science student

• A convenient method for analyzing a compound statement is to


make a truth table for it.
05/12/2024 Sami Ullah khan 28
TRUTH TABLE

A truth table specifies the truth value of a


compound proposition for all possible truth
values of its constituent propositions.

05/12/2024 Sami Ullah khan 29


NEGATION (~)

• If p is a statement variable, then negation of p,


“not p”, is denoted as “~p”

• It has opposite truth value from p i.e., if p is


true, ~p is false; if p is false, ~p is true.

05/12/2024 Sami Ullah khan 30


TRUTH TABLE FOR ~ p

05/12/2024 Sami Ullah khan 31


CONJUNCTION ()

• If p and q are statements, then the conjunction


of p and q is “p and q”, denoted as “p  q”.

• It is true when, and only when, both p and q


are true. If either p or q is false, or if both are
false, pq is false.

05/12/2024 Sami Ullah khan 32


CONJUNCTION ()

05/12/2024 Sami Ullah khan 33


TRUTH TABLE FOR p  q

05/12/2024 Sami Ullah khan 34


Logical and using 3 statements

05/12/2024 Sami Ullah khan 35


DISJUNCTION () or INCLUSIVE OR

• If p & q are statements, then the disjunction of p


and q is “p or q”, denoted as “p  q”.

• It is true when at least one of p or q is true and is


false only when both p and q are false.

05/12/2024 Sami Ullah khan 36


DISJUNCTION () or INCLUSIVE OR

05/12/2024 Sami Ullah khan 37


TRUTH TABLE FOR p  q

05/12/2024 Sami Ullah khan 38


Inclusive OR Using 3 Statement

05/12/2024 Sami Ullah khan 39


Truth Tables for:

Truth table for the statement form ~ p  q

05/12/2024 Sami Ullah khan 40


Truth Tables for:

Truth table for ~ p  (q  ~ r)

05/12/2024 Sami Ullah khan 41


Truth Tables for:

Truth table for (pq)  ~ (pq)

05/12/2024 Sami Ullah khan 42


Double Negative Property ~(~p)

Example

“It is not true that I am not happy”

Solution:
Let p = “I am happy”
then ~ p = “I am not happy”
and ~(~ p) = “It is not true that I am not happy”
Since ~(~p)  p
Hence the given statement is equivalent to:
05/12/2024 “I am happy” Sami Ullah khan 43
~(pq) and ~p  ~q are not logically equivalent

Different truth values in row 2 and row 3

05/12/2024 Sami Ullah khan 44


The End

05/12/2024 Sami Ullah khan 45

You might also like