0% found this document useful (0 votes)
102 views9 pages

LOGIC & STATEMENTS (Readings)

Discrete mathematics deals with objects that can have distinct, separated values such as combinations, graphs, and logical statements. Logic is the study of correct reasoning and focuses on the relationship between statements rather than their content. Propositions are the building blocks of logic and can be combined using logical connectives like negation, conjunction, disjunction, implication, and biconditional to form compound statements. Truth tables are used to determine the truth values of compound statements based on the truth values of the individual propositions.

Uploaded by

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

LOGIC & STATEMENTS (Readings)

Discrete mathematics deals with objects that can have distinct, separated values such as combinations, graphs, and logical statements. Logic is the study of correct reasoning and focuses on the relationship between statements rather than their content. Propositions are the building blocks of logic and can be combined using logical connectives like negation, conjunction, disjunction, implication, and biconditional to form compound statements. Truth tables are used to determine the truth values of compound statements based on the truth values of the individual propositions.

Uploaded by

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

DISCRETE MATHEMATICS

Discrete mathematics is the branch of mathematics dealing with objects that can
consider only distinct, separated values.

It is the study of mathematical structures that are countable or otherwise distinct and
separable.

Examples of structures that are discrete are combinations, graphs, and logical


statements. Discrete structures can be finite or infinite.

LOGIC

The rules of logic give precise meaning to mathematical statements


distinguishing between valid and invalid arguments.

Logic is the study of correct reasoning.   Logic's focus is the relationship


between statements, and not the content of statements.

The rules of mathematical logic specify methods of reasoning mathematical


statements.
Greek philosopher, Aristotle, was the pioneer of logical reasoning.
Logical reasoning provides the theoretical base for many areas of
mathematics and consequently computer science. It has many practical applications in
computer science like design of computing machines, artificial intelligence, definition
of data structures for programming languages etc.

Propositions are the building blocks of logic. It is a statement that is


either true or false.

Propositions are represented by lower case letters p, q, r, t, s, . . . known


as propositional variables.

Truth values are represented by T for true and F for false.

Propositional Logic or Propositional Calculus is the area of logic that deals


with propositions.

Propositional Logic is concerned with statements to which the truth values,


“true” and “false”, can be assigned. The purpose is to analyze these statements either
individually or in a composite manner.

PROPOSITION
A Proposition or a statement or logical sentence is a declarative sentence which is
either true or false.

Example1: The following statements are all propositions:

o Jawaharlal Nehru is the first prime minister of India.


o It rained Yesterday.
o If x is an integer, then x2 is a +ve integer.

Example2: The following statements are not propositions:

o Please report at 11 a.m. sharp


o What is your name?
o x2=13

Propositional Variables

The lower case letters starting from P onwards are used to represent propositions. (p,
q, r, s, t, u, v, w, x, y, z)

Example: p: India is in Asia


                 q: 2 + 2 = 4

COMPOUND STATEMENTS

Statements or propositional variables can be combined by means of logical


connectives (operators) to form a single statement called compound statements.

The five logical connectives are:

BASIC LOGICAL OPERATIONS


1. Negation: It means the opposite of the original statement. If p is a statement, then
the negation of p is denoted by ~p and read as 'it is not the case that p.' So, if p is true
then ~ p is false and vice versa.

Example: If statement p is Paris is in France, then ~ p is 'Paris is not in France'.

p ~p

T F

F T

2. Conjunction: It means Anding of two statements. If p, q are two statements, then


"p and q" is a compound statement, denoted by p ∧ q and referred as the conjunction
of p and q. The conjunction of p and q is true only when both p and q are true.
Otherwise, it is false.

p q p∧q

T T T

T F F

F T F

F F F

3. Disjunction: It means Oring of two statements. If p, q are two statements, then "p
or q" is a compound statement, denoted by p ∨ q and referred to as the disjunction of
p and q. The disjunction of p and q is true whenever at least one of the two statements
is true, and it is false only when both p and q are false.

p q p∨q

T T T

T F T

F T T

F F F
4. Implication / if-then (⟶): An implication p⟶q is the proposition "if p, then q."
It is false if p is true and q is false. The rest cases are true.

p q p⟶q

T T T

T F F

F T T

F F F

5. If and Only If (↔): p ↔ q is bi-conditional logical connective which is true when


p and q are same, i.e., both are false or both are true.

p q p↔q

T T T

T F F

F T F

F F T

DERIVED CONNECTORS

1. NAND: It means negation after ANDing of two statements. Assume p and q be two
propositions. Nanding of p and q to be a proposition which is false when both p and q
are true, otherwise true. It is denoted by p ↑ q.

p q p∨q

T T F

T F T

F T T

F F T
2. NOR or Joint Denial: It means negation after ORing of two statements. Assume p
and q be two propositions. NORing of p and q to be a proposition which is true when
both p and q are false, otherwise false. It is denoted by p ↑ q.

p q p↓q

T T F

T F F

F T F

F F T

3. XOR: Assume p and q be two propositions. XORing of p and q is true if p is true


or q is true but not both and vice-versa. It is denoted by p ⨁ q.

p q p⨁q

T T F

T F T

F T T

F F F

Example1: Prove that X ⨁ Y ≅ (X ∧∼Y)∨(∼X∧Y).

Solution: Construct the truth table for both the propositions.

X Y X⨁Y ∼Y ∼X X ∧∼Y ∼X∧Y (X ∧∼Y)∨(∼X∧Y)

T T F F F F F F

T F T T F T F T

F T T F T F T T

F F F T T F F F

As the truth table for both the proposition is the same.

1. X ⨁ Y ≅ (X ∧∼Y)∨(∼X∧Y). Hence Proved.  
Example2: Show that (p ⨁q) ∨(p↓q) is equivalent to p ↑ q.

Solution: Construct the truth table for both the propositions.

p q p⨁q (p↓q) (p⨁q)∨ (p↓q) p↑q

T T F F F F

T F T F T T

F T T F T T

F F F T T T

CONDITIONAL AND BICONDITIONAL STATEMENTS

Conditional Statement

Let p and q are two statements then "if p then q" is a compound statement, denoted by
p→ q and referred as a conditional statement, or implication. The implication p→ q is
false only when p is true, and q is false; otherwise, it is always true. In this
implication, p is called the hypothesis (or antecedent) and q is called the conclusion
(or consequent).

p q p→q

T T T

T F F

F T T

F F T

For Example: The followings are conditional statements.

1. If a = b and b = c, then a = c.
2. If I get money, then I will purchase a computer.

Variations in Conditional Statement

Contrapositive: The proposition ~q→~p is called contrapositive of p →q.


Converse: The proposition q→p is called the converse of p →q.

Inverse: The proposition ~p→~q is called the inverse of p →q.

Example1: Show that p →q and its contrapositive ~q→~p are logically equivalent.

Solution: Construct the truth table for both the propositions:

p q ~p ~q p →q ~q→~p

T T F F T T

T F F T F F

F T T F T T

F F T T T T

As, the values in both cases are same, hence both propositions are equivalent.

Example2: Show that proposition q→p, and ~p→~q is not equivalent to p →q.

Solution: Construct the truth table for all the above propositions:

p q ~p ~q p →q q→p ~p→~q

T T F F T T T

T F F T F T T

F T T F T F F

F F T T T T T

As, the values of p →q in a table is not equal to q→p and ~p→~q as in fig. So both of
them are not equal to p →q, but they are themselves logically equivalent.

BiConditional Statement

If p and q are two statements then "p if and only if q" is a compound statement,
denoted as p ↔ q and referred as a biconditional statement or an equivalence. The
equivalence p ↔ q is true only when both p and q are true or when both p and q are
false.
p q p↔q

T T T

T F F

F T F

F F T

For Example: (i) Two lines are parallel if and only if they have the same slope.
(ii) You will pass the exam if and only if you will work hard.

Example: Prove that p ↔ q is equivalent to (p →q) ∧(q→p).

Solution: Construct the truth table for both the propositions:

p q p↔q
p q p →q q→p (p →q)∧(q→p)
T T T
T T T T T
T F F
T F F T F
F T F
F T T F F
F F T
F F T T T

Since, the truth tables are the same, hence they are logically equivalent. Hence Proved

Principle of Duality

Two formulas A1 and A2 are said to be duals of each other if either one can be
obtained from the other by replacing ∧ (AND) by ∨ (OR) by ∧ (AND). Also if the
formula contains T (True) or F (False), then we replace T by F and F by T to obtain
the dual.

Note1: The two connectives ∧ and ∨ are called dual of each other.
2. Like AND and OR, ↑ (NAND) and ↓ (NOR) are dual of each other.
3. If any formula of the proposition is valid, then it's dual of each other.

Equivalence of Propositions
Two propositions are said to be logically equivalent if they have exactly the same
truth values under all circumstances.

The table1 contains the fundamental logical equivalent expressions:

Idempotent laws (i) p ∨ p≅p (ii) p ∧ p≅p

Associative laws (i) (p ∨ q) ∨ r ≅ p∨ (q ∨ r) (ii) (p ∧ q) ∧ r ≅ p ∧ (q ∧ r)

Commutative laws (i) p ∨ q ≅ q ∨ p (ii) p ∧ q ≅ q ∧ p

Distributive laws (i) p ∨ (q ∧ r) ≅ (p ∨ q) ∧ (p ∨ r) (ii) p ∧ (q ∨ r) ≅ (p ∧ q) ∨ (p ∧

Identity laws (i)p ∨ F ≅ p (ii) p ∧ T≅ p


(iv) p ∧ F≅F (iii) p ∨ T ≅ T

Involution laws (i) ¬¬p ≅ p

Complement laws (i) p ∨ ¬p ≅ T (ii) p ∧ ¬p ≅ T

DeMorgan's laws: (i) ¬(p ∨ q) ≅ ¬p ∧ ¬q (ii) ¬(p ∧ q) ≅¬p ∨ ¬q

Example: Consider the following propositions

1. ~p∨∼q and ∼(p∧q).  

Are they equivalent?

Solution: Construct the truth table for both

p q ~p ~q ~p∨∼q p∧q ~(p∧q)

T T F F F T F

T F F T T F T

F T T F T F T

F F T T T F T

You might also like