0% found this document useful (0 votes)
7 views25 pages

Mathematical Logics

The document outlines the curriculum for the Bachelor of Computer Applications (BCA) Mathematics-2 course at Shree Swaminarayan College of Technology & Management, covering topics such as Mathematical Logic, Relations & Ordering, and Graph Theory. It includes detailed explanations of logical statements, connectives, truth tables, and equivalence formulas. Additionally, it provides examples and normal forms for logical expressions, emphasizing the importance of logical reasoning in mathematics.

Uploaded by

Kavisha Oza
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)
7 views25 pages

Mathematical Logics

The document outlines the curriculum for the Bachelor of Computer Applications (BCA) Mathematics-2 course at Shree Swaminarayan College of Technology & Management, covering topics such as Mathematical Logic, Relations & Ordering, and Graph Theory. It includes detailed explanations of logical statements, connectives, truth tables, and equivalence formulas. Additionally, it provides examples and normal forms for logical expressions, emphasizing the importance of logical reasoning in mathematics.

Uploaded by

Kavisha Oza
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/ 25

SHREE SWAMINARAYAN COLLEGE OF

TECHNOLOGY & MANAGEMENT

Program Name: Bachelor of Computer Applications (BCA)


Level: Undergraduate (Semester 2)
Course Name: Mathematics-2

Kavisha Oza (Msc Mathematics)


› Unit 1: Mathematical Logic (25%) - 11 Hours
• Statements and Notation
• Connectives (Negation, Conjunction, Disjunction)
• Truth Tables, Tautology, Contradiction
• Equivalence Formulas, Normal Forms
› Unit 2: Relation & Ordering (25%) - 11 Hours
• Binary Relations, Equivalence Relations
• Relation Matrix and Graph Representation
• Partial Ordering, Partially Ordered Sets
› Unit 4: Graph Theory (25%) - 12 Hours
• Graph Components: Nodes, Edges, and Paths
• Graph Types: Directed, Undirected, Weighted, etc.
• Cycles, Connectivity, Reachability
• Applications in network and route planning
Unit 1: Mathematical Logic
› Statements and Notation
› Connectives (Negation, Conjunction, Disjunction)
› Statement Formulas and Truth Table
› Conditional and Biconditional statement; Tautology and
contradiction
› Equivalence Formulas
› Duality
› Normal Forms
Statements and Notation
› Statement (proposition) : A declarative sentence is said to be a statement.
› It is possible to say that it is true or false but not both.
› Truth Value: Truth value of a statement is denoted by 'T' if the statement is true.
› Truth value of a statement is denoted by 'F' if the statement is false.
› Usually, statements are denoted by letters like p, q, r, … or P1, P2, P3, …
Example: 1. "The sun is a star." > True > T
2. "2 + 2 = 5" > False > F
› Simple Statement: A statement involving only one statement is called a simple statement.
"The sky is blue."
› Composite Statement: A statement involving more than one statement is called a composite
or compound statement. "It is raining, and it is cold.“
› Component statements : The simple statements which form a compound statement are called
component or elemental statements. P="It is raining” Q="It is cold"
Logical connectives
Two or more simple statements can be joined by any one of the five terms:

"and", "or", "not", "if then", "if and only if ”


Conjunction (and):
› The compound statement obtained by connecting two simple statements with the
connective "and" is called the conjunction of these simple statements.

› Conjunction of p & q is denoted by p ∧ q.

› The compound statement p ∧ q is true only when P & Q are both true
& for all other cases its false.
› TRUTH TABLE : p q p∧q
T T T
T F F
F T F
F F F
Disjunction (or) :
› The compound statement obtained by connecting two simple statements with the
connective “or" is called the disjunction of these simple statements.

› Disjunction of p & q is denoted by p ∨ q.

› The compound statement p ∨ q is false only when P & Q are both


false & for all other cases its true.
› TRUTH TABLE : p q p∧q
T T T
T F T
F T T
F F F
Negation (not) :
› A statement whose truth value is opposite to that of a given statement & is also the opposite in its
contents is called its negation.
› Denoted by ~p and ¬p
› TRUTH TABLE :
p ~p
T F
F T

Logically equivalent statements: If two statements S1 (p, q, r, ...) & S2 (p, q, r, ...) have the
same truth value for all possible truth values of the component statements, then they are said to be
logically equivalent statements.
S1 (p, q, r, ...) = S2 (p, q, r, ...)
Tautology & Contradiction

Tautology ( t ) Contradiction ( c ) :
› A statement which is always true is › A statement which is always false is
called tautology. called contradiction.
› It is denoted by "t" › It is denoted by "c"
› Truth value for tautology = “ T ” › Truth value for contradiction =“ F ”
› Laws › Laws
1. p ∨ t = t 1. p∨c=p
2. p∧t=p 2. p ∧ c = c
3. p ∨ (~p) = t 3. p ∧ (~p) = c
Conditional Statement (if… then ) :
A conditional statement is represented in the form of “if… then”.
• Let P and Q are the two statements, then statements P and Q can be written as
P → Q (P implies Q).
• A conditional statement is also called implication.
• Converse : The converse of a conditional statement is formed by swapping the antecedent
and the consequent. The converse of p → q is q → p
• Inverse : The inverse of a conditional statement is formed by negating both the antecedent and
the consequent . The inverse of p → q is: ~ p→ ~ q
• Contrapositive : The contrapositive of a conditional statement is formed by swapping and
negating both the antecedent and the consequent.
• The contrapositive of p → q is : ~ q→ ~ p
• The statement p → q is false if p is true, and q is false. Otherwise, p → q is true.
• TRUTH TABLE : p q p→q
T T T
T F F
F T T
F F T
Biconditional Statement ( if and only if) :
› A biconditional statement is represented in the form of “if and only if”.
› A biconditional statement is also called biimplication
› Let p and q are the two statements, then statements p & q can be written as
p ⇔ q (equivalence).
› p ⇔ q = (p→ q) ∨ (q → p)
› The state p ⇔ q is true if both p & q is either true or false together.
Otherwise, false. p q p⇔q
T T T
› TRUTH TABLE :
T F F
F T F
F F T
Truth Table Summary:

1.Conjunction : AND (∧):


True only if both statements are true.
1.Disjunction : OR (∨):
True if at least one statement is true.
1.Conditional Statement : IF...THEN (→):
False only if the first statement is true and the second is
false.
1.Biconditional Statement : IF AND ONLY IF (↔):
True if both statements are either true or false.
Equivalence Formulas
1. Double Negation Law (involution law) :
~(~ � ) ⟺p
2. Commutative Laws:
� ∧ � ⟺� ∧ �
� ∨ � ⟺� ∨ �
3. Associative Laws:
(� ∧ � ) ∧ � ⟺� ∧ (� ∧ � )
(� ∨ � ) ∨ � ⟺� ∨ (� ∨ � )
4. Distributive Laws:
� ∧ (� ∨ � ) ⟺(� ∧ � ) ∨ ( � ∧ � )
p ∨ (q ∧ r)⟺(p ∨ q) ∧ (p ∨ r)
Equivalence Formulas
5. De Morgan’s Laws:
~(� ∧ � ) ⟺~� ∨ ~�
~(� ∨ � ) ⟺~� ∧ ~�
6. Identity Laws:
� ∧ T ⟺�
� ∨ F ⟺�
7. Domination Laws:
� ∧ F ⟺F
� ∨ T ⟺T
8. Idempotent Laws:
� ∧ � ⟺� � ∨ � ⟺�
Equivalence Formulas
9. Absorption Laws:
� ∨ (� ∧ � ) ⟺�
� ∧ (� ∨ � ) ⟺�
10. Negation Laws:
� ∨ ~� ⟺T
� ∧ ~� ⟺F
11. Implication Law:
� →� ⟺ ~ � ∨ �
12. Biconditional Law:
� ↔ � ⟺(� ∧ � ) ∨ (~ � ∧ ~ � )
EXAMPLES :
1. p ∨ t = t
2. p ∧ c = c
3. p ∧ ~p = c
4. p → q ⟺~p ∨ q
5. p → (q → r) ⟺(p ∧ q) → r
6. (~ p ∧ (~ q ∧ r )) ∨ ( q ∧ r ) ∨ (p ∧ r ) ⟺r
7. ~ ( p ∨ (~p ∧ q ) ⟺~ p ∧ ~ q
8. Show that (p ∧ q ) → (p ∨ q ) is tautology.
9. Show that p → ( p ∧ (q → p)) is tautology.
10. ( p ∨ q ∨ r ) ⟺[ ((( p → q ) → q ) → r ) → r )
11.p → (q → r ) ⟺( p ∧ q ) → r
Duality :
› Two formulas, A and A*, are said to be duals of each other if either
one can be obtained from the other by replacing ∧ by ∨ and ∨
by ∧. The connectives ∧ and ∨ are also called duals of each
other. If the formula A contains the special variables T or F, then
A* , its dual, is obtained by replacing T by F and F by T in addition
to the above-mentioned interchanges. Examples of duality :
T→F
F→T
∧→∨
∨→∧
~→~
Write the dual of following expressions
›p ∨(q∧r)
› ~(� ∧ � ) ⟺~� ∨ ~�
› � ∨ (� ∧ � ) ⟺�
› � ∨ ~� ⟺T
› � ∨ F ⟺�
› � ∧ � ⟺�
› (� ∧ � ) ∧ � ⟺� ∧ (� ∧ � )
Normal Forms :
› Let A ( P1, P2, P3, …, Pn) be a statement formula
then the construction of the truth table may not be
practical as always
› So, we consider alternative procedure known as
reduction to normal forms
i. Disjunctive Normal Form
ii. Conjunctive Normal Form
Disjunctive Normal Form
› A statement form which consist of disjunction(∨)
between conjunction(∧) is called Disjunctive
Normal Form (DNF)

› Examples : 1. ( p ∧ q ) ∨ r
2. ( p ∧ ~ q ) ∨ (~ q ∧ r ) ∨ ( r ∧ ~
q)
Obtain the DNF of the form ( p → q ) ∧ (~p ∧ q )
Conjunctive Normal Form
› A statement form which consist of conjunction(∧)
between disjunction(∨) is called Conjunctive
Normal Form (CNF)

› Examples : 1. ( p ∧ q )
2. ( ~ p ∨ q ) ∧ (~ p ∨ r )
Obtain the CNF of the form ( p ∧ q ) ∨ (~p ∧ q ∧ r )
Obtain the DNF of the form p ∨ (~ p → (q ∨ (q →
~r )
•Sentence: If it rains, the ground will be wet.
Logic: p→q
(p: "It rains," q: "The ground will be wet.")

•Sentence: The sun is shining and it is not raining.


Logic: p∧¬q
(p: "The sun is shining," q: "It is raining.")

•Sentence: Either she studies or she fails.


Logic: p∨q
(p: "She studies," q: "She fails.")
•Sentence: You can pass the exam only if you study.
Logic: p→q
(p: "You study," q: "You pass the exam.")
•Sentence: If today is Sunday, then tomorrow is Monday.
Logic: p→q
(p: "Today is Sunday," q: "Tomorrow is Monday.")
•Sentence: If the train is late, then I will miss the meeting.
Logic: p→q
(p: "The train is late," q: "I miss the meeting.")
•Sentence: Either the dog barks or the cat meows.
Logic: p∨q
(p: "The dog barks," q: "The cat meows.")
•Sentence: If you do not submit the assignment, you will not get marks.
Logic: ¬p→¬q
(p: "You submit the assignment," q: "You get marks.")
•Sentence: The lamp is on if and only if the switch is pressed.
Logic: p ⟺q
(p: "The lamp is on," q: "The switch is pressed.")
•Sentence: The cake will bake if the oven is hot and the timer is set.
Logic: p∧q→r
(p: "The oven is hot," q: "The timer is set," r: "The cake will bake.")

You might also like