Discrete Structure
Discrete Structure
Logic:
Logic is the study of the principles and methods that distinguishes between a valid and an invalid
argument.
Logic deals with general reasoning laws, which you can trust.
Application:
Applied in proving program correctness and verification
Databases (Relational Algebra and calculus).
Artificial Intelligence
Logical operators:
A logical operator is a symbol or word used to connect two or more expressions such that the
value of the compound expression produced depends only on that.
True: false
False: true
Proposition
A proposition is a declarative statement that is either TRUE or FALSE, but not both.
Example 1
• 2 + 2 = 4.
• Lahore is the capital of Pakistan.
• It is Sunday today.
• Ali is student of this class.
Example 2
• What time is it?
• X + 1 = 2.
• Close the door.
• Read this carefully.
Preposition statement:
Example:
It is raining today.
Today is Friday.
Compound statement:
Example:
It is raining today and today is Friday.
And is also called logical operators.
Logical operators are also called connector.
Types:
Conjunction and
Disjunction or
Discrete values:
Those values which are differentiate
And are countable.
It can be written in interval.
Symbol Meaning
¬, ~, -- Negation
∧ And, Conjunction
∨ Or, Disjunction
→ Implication
↔ Bi-Conditional
Negation:
This just turns a false proposition to true and the opposite for a true proposition.
Symbol: ¬
Let p is a proposition. The statement
“It is not the case that p.”
Is another proposition, called the negation of p?
The negation of p is written ¬p and read as “not p”.
Example:
Let p = “Today is Friday.”
The negation of p is
Conjunction:
• Conjunction is a binary operator in that it operates on two propositions when creating compound
proposition. On the other hand, negation is a unary operator.
• Conjunction corresponds to English “and.”
• Symbol: ∧
• 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. If one of these is false, than the
compound statement is false as well.
p q p∧q
T T T
T F F
F T F
F F F
• Examples:
Let p = “Today is Friday.”
And q = “It is raining today.”