0% found this document useful (0 votes)
388 views92 pages

DM - Unit 1 - PPT

Here are the key points about cardinality of sets: - Cardinality refers to the number of elements in a set. It is a measure of the "size" of the set. - The cardinality of a finite set is a natural number representing the count of elements in the set. - For an infinite set, the cardinality is defined in terms of a one-to-one correspondence between the elements of the set and the natural numbers. - Sets have the same cardinality if their elements can be paired off through a one-to-one correspondence. Otherwise, their cardinalities are different. - The cardinality of the empty set is 0. The cardinality of a finite set of

Uploaded by

UV New Movies
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)
388 views92 pages

DM - Unit 1 - PPT

Here are the key points about cardinality of sets: - Cardinality refers to the number of elements in a set. It is a measure of the "size" of the set. - The cardinality of a finite set is a natural number representing the count of elements in the set. - For an infinite set, the cardinality is defined in terms of a one-to-one correspondence between the elements of the set and the natural numbers. - Sets have the same cardinality if their elements can be paired off through a one-to-one correspondence. Otherwise, their cardinalities are different. - The cardinality of the empty set is 0. The cardinality of a finite set of

Uploaded by

UV New Movies
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/ 92

Modern Education Society’s

College of Engineering, Pune


19, Late Prin. V. K. Joag Path, Wadia College Campus, Pune-411001
Accredited by NBA and NAAC by “A” Grade
Affiliated to Savitribai Phule Pune University & Approved by AICTE, New Delhi.

Second Year of Computer Engineering (2019 Course)


(210241): Discrete Mathematics
Teaching Scheme Credit Scheme Examination Scheme and Marks
Lecture: 03 03 Mid_Semester (TH): 30 Marks
Hours/Week End_Semester (TH): 70 Marks

Marks weightage per unit for examination


Unit Number I II III IV V VI
Mid_Semester 15 15 - - - -
End_Semester - - 18 17 18 17

Prerequisites: Basic Mathematics

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Course Objectives
To introduce several Discrete Mathematical Structures found to be serving
as tools even today in the development of theoretical computer science.

1. To introduce students to understand, explain, and apply the foundational


mathematical concepts at the core of computer science.

2. To understand use of set, function and relation models to understand practical


examples, and interpret the associated operations and terminologies in context.

3. To acquire knowledge of logic and proof techniques to expand mathematical


maturity.

4. To learn the fundamental counting principle, permutations, and combinations.

5. To study how to model problem using graph and tree.

6. To learn how abstract algebra is used in coding theory.


Mr. S. B. Shinde Asst Professor, MESCOE Pune
Course Outcomes
On completion of the course, learner will be able to –
CO1: Formulate problems precisely, solve the problems, apply formal proof techniques, and
explain the reasoning clearly.

CO2: Apply appropriate mathematical concepts and skills to solve problems in both familiar
and unfamiliar situations including those in real-life contexts.

CO3: Design and analyze real world engineering problems by applying set theory,
propositional logic and to construct proofs using mathematical induction.

CO4: Specify, manipulate and apply equivalence relations; construct and use functions and apply
these concepts to solve new problems.

CO5: Calculate numbers of possible outcomes using permutations and combinations; to model
and analyze computational processes using combinatorics.

CO6: Model and solve computing problem using tree and graph and solve problems using
appropriate algorithms.

CO7: Analyze the properties of binary operations, apply abstract algebra in coding theory and
evaluate the algebraic structures.
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Learning Resources
 Text Books:
1. C. L. Liu, “Elements of Discrete Mathematics”‖, TMH, ISBN 10:0-07-066913-9.2.
2. N. Biggs, “Discrete Mathematics”, 3rd Ed, Oxford University Press, ISBN 0 –19-
850717–8.

 Reference Books:
1. Kenneth H. Rosen, “Discrete Mathematics and its Applications”‖, Tata McGraw-Hill,
ISBN 978-0-07-288008-3
2. Bernard Kolman, Robert C. Busby and Sharon Ross, “Discrete Mathematical
Structures”‖, Prentice-Hall of India /Pearson, ISBN: 0132078457, 9780132078450.
3. Narsingh Deo, “Graph with application to Engineering and Computer Science”,
Prentice Hall of India, 1990, 0 –87692 –145 –4.
4. Eric Gossett, “Discrete Mathematical Structures with Proofs”, Wiley India Ltd,
ISBN:978-81-265-2758-8.
5. Sriram P.and Steven S., “Computational Discrete Mathematics”, Cambridge University
Press, ISBN 13: 978-0-521-73311-3.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Unit I

Set Theory and Logic


Duration: (07 Hours)

Mr. S. B. Shinde
Asst Professor, MESCOE Pune
Unit-I: Contents
 Introduction and Significance of Discrete Mathematics,

 Sets–Naïve Set Theory (Cantorian Set Theory), Axiomatic Set Theory,


Set Operations, Cardinality of set, Principle of inclusion and exclusion.

 Types of Sets–Bounded and Unbounded Sets, Diagonalization argument,


Countable and Uncountable Sets, Finite and Infinite Sets, Countably
Infinite and Uncountably Infinite Sets, Power set,

 Propositional Logic- Logic, Propositional Equivalences, Application of


Propositional Logic-Translating English Sentences,

 Proof by Mathematical Induction and Strong Mathematical Induction


 Exemplar/ Case Studies:

Mr. S. B. Shinde Asst Professor, MESCOE Pune


What is Discrete Mathematics?
Adjective: Individually separate and distinct.
Synonyms: separate - detached - distinct - abstract.

Defining discrete mathematics is hard because defining mathematics is


hard.

What is Mathematics?

Discrete Mathematics is the study of mathematical structures that are


fundamentally discrete rather than continuous.
OR
Discrete Mathematics is the branch of mathematics dealing with objects
that can consider only distinct, separated values.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


What is Discrete Mathematics?
 Example:

 Consider the function which gives the number of children of each person
reading this.

 What is the range? I’m guessing it is something like {0, 1, 2, 3}. Maybe 4
is in there too.

 But certainly there is nobody reading this that has 1.32419 children.

 This output set is discrete because the elements are separate.

 The inputs to the function also form a discrete set because each input is an
individual person.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


What is SET ???
 A SET is an unordered collection of different elements.

 A set can be written explicitly by listing its elements using set bracket.

 If the order of the elements is changed or any element of a set is repeated,


it does not make any changes in the set.

 Sets are used to group objects together. Often, but not always, the objects
in a set have similar properties.

 We write a ∈ A to denote that ‘a’ is an element of the set A.


 The notation a ∉ A denotes that ‘a’ is not an element of the set A.

 Sets to be denoted -- Uppercase letters.


 Elements of sets -- Lowercase letters.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


What is SET ???
Example of Sets::
1. A set of all positive integers.
2. A set of all the planets in the solar system.
3. A set of all the states in India.
4. A set of all the lowercase letters of the alphabet.

Basic Properties of Sets::


1. The change in order of writing the elements does not make any
changes in the set.
2. If one or many elements of a set are repeated, the set remains the same.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Some Important Sets::
1. N − the set of all natural numbers = {1, 2, 3, 4,.....}
2. Z − the set of all integers = {.....,−3,−2,−1,0,1,2,3,.....}
3. Z+ − the set of all positive integers.
4. Q − the set of all rational numbers.
5. R − the set of all real numbers.
6. R+ − the set of positive real numbers.
7. W − the set of all whole numbers.
8. C − the set of complex numbers.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Set Theory Notation
Notation Description
{} We use these braces to enclose the elements of a set. Eg: A= {1, 2, 3}

: {x : x > 2} is the set of all x such that x is greater than 2.

∈ 2 ∈ {1, 2, 3} asserts that 2 is an element of the set {1, 2, 3}.


∉ 4 ∉ {1, 2, 3} because 4 is not an element of the set {1, 2, 3}.

⊆ A ⊆ B asserts that A is a subset of B: every element of A is also an element of B.

⊂ A ⊂ B asserts that A is a proper subset of B: every element of A is also an element of


B, but A , B.
∩ A ∩ B is the intersection of A and B: the set containing all elements which are
elements of both A and B.
∪ A ∪ B is the union of A and B: is the set containing all elements which are elements
of A or B or both.
∀ For All E.g: ∀x>1, x2>x

∃ There Exists E.g: ∃ x | x2>x

|A| The cardinality (or size) of A is the number of elements in A.


Mr. S. B. Shinde Asst Professor, MESCOE Pune
Representation of a Set
 Sets can be represented in two different ways ::
 Roster or Tabular Form::
 The set is represented by listing all the elements comprising it. The elements are
enclosed within braces and separated by commas.
 Example 1: Set of vowels in English alphabet, A = {a,e,i,o,u}
 Example 2: Set of odd numbers less than 10, B = {1,3,5,7,9}

 Set Builder Notation::


 The set is defined by specifying a property that elements of the set have in common.
 The set is described as A={x:p(x)}
 Example 1: The set {a,e,i,o,u} is written as − A={x:x is a vowel in English alphabet}
 Example 2: The set {1,3,5,7,9} is written as − B={x:1≤x<10 and (x%2)≠0}

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Cardinality of a Set
 Cardinality of a set S, denoted by |S|, is the number of elements of the
set. The number is also referred as the cardinal number.
 If a set has an infinite number of elements, its cardinality is ∞.
 Example 1: If A= {1,4,3,5} then |A|= 4,
 Example 2: If B ={1,2,3,4,5,…} then |B| = ∞
 Example 3: Find the cardinality of C ={23, 24, . . . , 37, 38}.
Solution: |C| =16
 Example 4: Find the cardinality of D ={1, {2, 3, 4}, ∅}.
Solution: |D| = 3

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Type of Set
 1. Finite Set::
 A set which contains a definite number of elements is called a finite set.
Empty set is also called a finite set.
 For Example:
 The Set of Vowel in English alphabet.
 The set of all colors in the rainbow.
 P = {2, 3, 5, 7, 11, 13, 17, ...... 97}
 S={x | x ∈ N and 70 > x > 50}
 N = {x : x ∈ N, x < 7}

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Type of Set Contd…

 2. Infinite Set::
 A set which contains infinite number of elements is called an infinite set.
 i.e set containing never-ending elements is called an infinite set.
 For Example:
 A = {x : x ∈ N, x > 1}
 B = {x : x ∈ W, x = 2n}
 S = {x | x ∈ N and x >10}
 Set of all points in a plane
 Set of all prime numbers

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Type of Set Contd…

 3. Subset ::
 A set X is a subset of set Y (Written as X⊆Y) if and only if every element
of X is also an element of set Y.
 Alternate way to define X is a subset of Y: ∀ x (x ∈ X) → (x ∈ Y)
 Every set is a subset of itself, i.e., X ⊂ X, Y ⊂ Y.
 Empty set is a subset of every set.
 For Example:
 Let, Y = {1, 2, 3, 4, 5, 6} and X = {1, 2}. Here set X is a subset of set
Y as all the elements of set X is in set Y. Hence, we can write X⊆Y.
 Let, Y = {1, 2, 3} and X = {1, 2, 3}.
 YES X⊆Y. As set X is a subset (Not a proper subset) of set Y as all
the elements of set X is in set Y.
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Type of Set Contd…

 4. Proper Subset::
 The term “proper subset” can be defined as “subset of but not equal to”.
i.e X⊂Y and X≠Y
 A Set X is a proper subset of set Y (Written as X⊂Y) if every element of X
is an element of set Y and |X|<|Y|.
 No set is a proper subset of itself.
 Null set or ∅ is a proper subset of every set.
 For Example:
 X={1,2,3} and Y ={1,2,3,4,5} Is: X ⊂ Y ?
 X = {p, q, r} and Y = {p, q, r, s, t} Is: X ⊂ Y ?
Answer: Yes.
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Type of Set Contd…

 5. Super Set::
 Whenever a set X is a subset of set Y, we say the Y is a superset of X and
written as Y ⊇ X.
 For Example:
 X = {a, e, i, o, u} and Y = {a, b, c, ............., z}
 Here X ⊆ Y i.e., X is a subset of Y but Y ⊇ X i.e., Y is a super set of X.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Type of Set Contd…

 6. Universal Set::
 It is a collection of all elements in a particular context or application.
 All the sets in that context or application are essentially subsets of this
universal set. Universal sets are represented as U.
 For Example:
 We may define U as the set of all animals on earth. In this case, set of all mammals is
a subset of U, set of all fishes is a subset of U, set of all insects is a subset of U, and
so on.
 If A = {1, 2, 3}; B = {2, 3, 4} ; C = {3, 5, 7} then U = {1, 2, 3, 4, 5, 7} [Here A ⊆ U,
B ⊆ U, C ⊆ U and U ⊇ A, U ⊇ B, U ⊇ C]
 If P is a set of all whole numbers and Q is a set of all negative numbers then the
universal set is a set of all integers.
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Type of Set Contd…

 7. Empty Set or Null Set::


 A set which does not contain any element is called an empty set, or the
null set or the void set and it is denoted by ∅ and is read as phi.
 In roster form, ∅ is denoted by {}.
 An empty set is a finite set, since the number of elements in an empty set
is finite, i.e., 0.
 For Example:
 S = {x | x ∈ N and 7 < x < 8} = ∅

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Type of Set Contd…

 8. Singleton Set or Unit Set::


 Singleton set or unit set contains only one element. A singleton set is
denoted by {S}.
 For Example:
 S = { x | x ∈ N, 7 < x < 9 } = {8}
 Let A = {x : x ∈ N and x² = 4}
Here A is a singleton set because there is only one element 2 whose square is 4.

 Let B = {x : x is a even prime number}


Here B is a singleton set because there is only one prime number which is even, i.e., 2.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Type of Set Contd…

 9. Equal Set::
 Two sets are equal (=) if and only if they have the same elements.
 Cardinality of equal set is same.
 For Example:
 If A={1,2,6}and B={6,1,2}, they are equal as every element of set A is
an element of set B and every element of set B is an element of set A.
 {1,2,3} = {3,1,2} = {1,2,1,3,2} are equal Sets
Note: Duplicates don't contribute anything new to a set, so remove them. The order
of the elements in a set doesn't contribute anything new.

 Are {1,2,3,4} and {1,2,2,4} equal?


Answer: ---- NO!
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Type of Set Contd…

 10. Equivalent Set::


 If the cardinalities of two sets are same, they are called equivalent sets.
 Elements need not be equal.
 The symbol for denoting an equivalent set is ‘↔’.
 For Example:
 If A={1,2,6} and B={16,17,22} they are equivalent as cardinality of A
is equal to the cardinality of B. i.e. |A| = |B| = 3. Therefore A ↔ B.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Type of Set Contd…

 11. Disjoint Set::


 Two sets A and B are said to be disjoint, if they do not have any element
in common. OR
 Two sets are called disjoint if their intersection is the empty set.
 Disjoint sets have the following properties:
 n(A∩B) = ∅
 n(A∪B) = n(A) + n(B)
 For Example:
 A = {1,2,6} and B={7,9,14}, A = {x : x is a prime number} and B = {x
: x is a composite number}.
Here A and B do not have any element in common and are disjoint sets.
 Let A = {1, 3, 5, 7, 9} and B = {2, 4, 6, 8, 10}.
Because A ∩ B = ∅, A and B are disjoint.
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Type of Set Contd…

 12. Overlapping Sets::


 Two sets A and B are said to be overlapping if they contain at least one
element in common.
 For Example:
 A = {a, b, c, d} and B = {a, e, i, o, u}, Here common element ‘a’.
 A = {1, 2, 6} and B = {6, 12, 42}. Here common element ‘6’; hence
these sets are overlapping sets.
 X = {x : x ∈ N, x < 4} and Y = {x : x ∈ I, -1 < x < 4}. Here, the two
sets contain three elements in common, i.e., (1, 2, 3).

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Venn Diagrams
 Venn diagram, invented in 1880 by John Venn, is a schematic diagram
that shows all possible logical relations between different mathematical
sets. OR
 A Venn diagram (also called primary diagram, set diagram or logic
diagram). is a diagram that shows all possible logical relations between a
finite collections of different sets.
 Each circle represents a set. The rectangle containing the circles
represents the universe. To represent combinations of these sets, we shade
the corresponding region.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Set Operation
 Union Operation::
 Let A and B be sets. The union of the sets A and B, denoted by A ∪ B, is
the set that contains those elements that are either in A or in B, or in both.
 An element x belongs to the union of the sets A and B if and only if x
belongs to A or x belongs to B.
A ∪ B = {x | x ∈ A ∨ x ∈ B}
 For Example:
 If A={10,11,12,13} and B = {13,14,15}, then A∪B={10,11,12,13,14,15}.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Set Operation
 Interaction Operation::
 Let A and B be sets. The intersection of the sets A and B, denoted by A ∩
B, is the set containing those elements in both A and B.
 An element x belongs to the intersection of the sets A and B if and only if
x belongs to A and x belongs to B.
A ∩ B = {x | x ∈ A ∧ x ∈ B}.
 For Example:
 If A={10,11,12,13} and B={13,14,15}, then A∩B={13}.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Set Operation
 Difference of Sets (Relative Complement)::
 Let A and B be sets. The difference of A and B, denoted by A − B, is the set
containing those elements that are in A but not in B.
 The difference of A and B is also called the complement of B with respect
to A.
 The difference of sets A and B is sometimes denoted by A\B.
 An element x belongs to the difference of A & B if & only if x∈A & x∉B.
A − B = {x | x ∈ A ∧ x ∉ B}
 For Example:
 If A={1, 3, 5} and B={1, 2, 3} then A-B ={5}

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Set Operation
 Complement of a Set::
 Let U be the universal set. The complement of the set A, denoted by Ā, is
the complement of A with respect to U. Therefore, the complement of the
set A is U − A.
 An element belongs to Ā if and only if x ∉ A. This tells us that
Ā = {x ∈ U | x ∉ A}
 For Example:
 Let A = {a, e, i, o, u} and U={a, b, c,…….,z} Then
Ā = {b, c, d, f, g, h, j, k, l, m, n, p, q, r, s, t, v, w, x, y, z}.
 Let A be the set of positive integers greater than 10 (with universal set the
set of all positive integers). Then
Ā = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Mr. S. B. Shinde Asst Professor, MESCOE Pune
Set Operation
 Symmetric Difference::
 Let A and B are two sets. The symmetric difference of two sets A and B is
the set (A – B) ∪ (B – A) and is denoted by A △ B.
Thus, A △ B = (A – B) ∪ (B – A) = {x : x ∉ A ∩ B}
 or, A △ B = {x : [x ∈ A and x ∉ B] or [x ∈ B and x ∉ A]}.
 A △ B = {x | x ∈ A –B ∨ B – A}
 For Example:
 If A = {1, 2, 3, 4, 5, 6, 7, 8} and B = {1, 3, 5, 6, 7, 8, 9}, Then
A – B = {2, 4}, B – A = {9} and A △ B = {2, 4, 9}.
 If P = {a, c, f, m, n} and Q = {b, c, m, n, j, k},Then
P △ Q = {a, b, f, j, k}
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Cartesian Products
 The order of elements in a collection is often important. Because sets are unordered, a
different structure is needed to represent ordered collections. This is provided by ordered n-
tuples.
 The ordered n-tuple (a1, a2. . . an) is the ordered collection that has a1 as its first element, a2
as its second element, . . . , and an as its nth element.
 Let A and B be sets. The Cartesian product of A and B, denoted by A × B, is the set of all

ordered pairs (a, b), where a ∈ A and b ∈ B. Hence, A × B = {(a, b) | a ∈ A ∧ b ∈ B}


 Cardinality of the Cartesian product: |A x B| = |A| * |B|.
 For Example:
 What is the Cartesian product of A = {1, 2} and B = {a, b, c}?
 A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}.
 B × A = {(a, 1), (a, 2), (b, 1), (b, 2), (c, 1), (c, 2)}
 Note that the Cartesian products A×B and B×A are not equal, unless A = ∅ or B = ∅.
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Power Sets
 Given a set S, the power set of S is the set of all subsets of the set S,
including the empty set and S itself.
 The power set of S is denoted by P(S).
 If a set has n elements, then its power set has 2n elements.
 For Example:
 If S is the set {x, y, z}, then the subsets of S are
{}, {x}, {y}, {z}, {x, y}, {x, z}, {y, z}, {x, y, z}
and hence
P(S)={{}, {x}, {y}, {z}, {x, y}, {x, z}, {y, z}, {x, y, z}}.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Power Sets
 For Example:
 What is the power set of the set {0, 1, 2}?
Solution: P({0, 1, 2}) ={∅, {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}}.

 What is the power set of the empty set? And


 What is the power set of the set {∅}?
Solution: The empty set has exactly one subset, namely, itself. Consequently,
P (∅) = {∅}.
The set {∅} has exactly two subsets, namely, ∅ and the set {∅} itself.
Therefore, P ({∅}) = {∅, {∅}}.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Set Identities

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Cardinal Properties of Sets
 If A and B are finite sets, then n(A ∪ B) = n(A) + n(B) - n(A ∩ B)
 If A ∩ B = ф , then n(A ∪ B) = n(A) + n(B)
 n(A ∩ B) = n(A) + n(B) - n(A ∪ B)
 n(A - B) = n(A) - n(A ∩ B)
 n(B - A) = n(B) - n(A ∩ B)

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Principle of Inclusion and Exclusion
 The inclusion–exclusion principle is a counting technique which
generalizes the familiar method of obtaining the number of elements in the
union of two finite sets; symbolically expressed as
|A∪B |= |A| + | B | −|A∩B |
 The principle is more clearly seen in the case of three sets, which for the
sets A, B and C is given by
|A∪B∪C| =|A| +| B| +| C| −|A∩ B| −|A∩C| −| B∩C| +|A∩B∩C|

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Principle of Inclusion and Exclusion
 To find the cardinality of the union of n sets:
 Include the cardinalities of the sets.
 Exclude the cardinalities of the pairwise intersections.
 Include the cardinalities of the triple-wise intersections.
 Exclude the cardinalities of the quadruple-wise intersections.
 Include the cardinalities of the quintuple-wise intersections.
 Continue, until the cardinality of the n-tuple-wise intersection is included (if n is odd)
or excluded (n even).
 In its general form, the principle of inclusion–exclusion states that for finite
sets A1, ..., An, one has the identity:

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Example on Principle of Inclusion and
Exclusion
 Example 1:: Let A and B be two finite sets such that n(A) = 20, n(B) = 28
and n(A ∪ B) = 36, find n(A ∩ B).
Solution: Using the formula n(A ∪ B) = n(A) + n(B) - n(A ∩ B).
then n(A ∩ B) = n(A) + n(B) - n(A ∪ B)
n(A ∩ B) = 20 + 28 - 36 = 48 - 36 = 12
 Example 2:: If n(A-B) = 18, n(A∪B) = 70 & n(A∩B)=25, then find n(B).
Solution: Using the formula n(A∪B) = n(A - B) + n(A ∩ B) + n(B - A)
70 = 18 + 25 + n(B - A)
∴ n(B - A) = 27
Now by using Cardinal Properties of Sets we have,
n(B) = n(A ∩ B) + n(B - A) = 25 + 27 = 52
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Example on Principle of Inclusion and
Exclusion
 Example 3:: In a group of 60 people, 27 like cold drinks and 42 like hot
drinks and each person likes at least one of the two drinks. How many like
both coffee and tea?
Solution: Let A = Set of people who like cold drinks.
B = Set of people who like hot drinks.
Given: (A ∪ B) = 60 n(A) = 27 n(B) = 42 then;
n(A ∩ B) = n(A) + n(B) - n(A ∪ B)
= 27 + 42 - 60 = 09
Therefore, 9 people like both tea and coffee.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Example on Principle of Inclusion and
Exclusion
 Example 4::In a class of 40 students, 15 like to play cricket and football and
20 like to play cricket. How many like to play football only but not cricket?
Solution: Let C= Students who like cricket & F= Students who like football
C ∩ F = Students who like cricket and football both
C - F = Students who like cricket only
F - C = Students who like football only.
Given: n(C) = 20 n(C ∩ F) = 15 n (C U F) = 40 n (F) = ?
n(C ∪ F) = n(C) + n(F) - n(C ∩ F)
40 = 20 + n(F) - 15
40 = 5 + n(F)
∴ n(F)= 35
∴ n(F - C) = n(F) - n (C ∩ F) = 35 – 15 = 20
∴ Number of students who like football only but not cricket = 20
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Example on Principle of Inclusion and
Exclusion
 Example 5:: In a survey of university students, 64 had taken mathematics
course, 94 had taken chemistry course, 58 had taken physics course, 28 had
taken mathematics and physics, 26 had taken mathematics and chemistry,
22 had taken chemistry and physics course, and 14 had taken all the three
courses. Find how many had taken one course only.
Solution:
 Step 1: Let M, C, P represent sets of students who had taken mathematics, chemistry
and physics respectively
 Step 2: From the given information, we have n(M) = 64 , n(C) = 94, n(P) = 58,
n(M∩P) = 28, n(M∩C) = 26, n(C∩P) = 22, n(M∩C∩P) = 14
 Step 3: No. of students who had taken only Math
= n(M) - [n(M∩P) + n(M∩C) - n(M∩C∩P)]
= 64 - [28+26-14]
= 64 - 40
= 24 Mr. S. B. Shinde Asst Professor, MESCOE Pune
Example on Principle of Inclusion and
Exclusion
 Step 4 : No. of students who had taken only Chemistry
= n(C) - [n(M∩C) + n(C∩P) - n(M∩C∩P)]
= 94 - [26+22-14]
= 94 - 34
= 60
 Step 5 : No. of students who had taken only Physics
= n(P) - [n(M∩P) + n(C∩P) - n(M∩C∩P)]
= 58 - [28+22-14]
= 58 - 36
= 22
 Step 6 : Total no. of students who had taken only one course
= 24 + 60 + 22
= 106
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Example on Principle of Inclusion and
Exclusion
 Example 5:: Alternative Method (Using Venn diagram)
 Step 1: Venn diagram related to the information given in the question:

 Step 2: From Venn diagram above, we have


No. of students who had taken only math = 24
No. of students who had taken only chemistry = 60
No. of students who had taken only physics = 22
 Step 3: Total no. of students who had taken only one course = 24 + 60 + 22= 106
 Hence, the total number of students who had taken only one course is 106
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Example on Principle of Inclusion and
Exclusion
 Example 6:: In a group of students, 65 play foot ball, 45 play hockey, 42
play cricket, 20 play foot ball and hockey, 25 play foot ball and cricket, 15
play hockey and cricket and 8 play all the three games. Find the total
number of students in the group. (Assume that each student in the group
plays at least one game.)
Solution:
Step 1: Let F, H and C represent the set of students who play foot ball,
hockey and cricket respectively.
Step 2: From the given information, we have
n(F) = 65 , n(H) = 45, n(C) = 42,
n(F∩H) = 20, n(F∩C) = 25, n(H∩C) = 15 n(F∩H∩C) = 8
Step 3: Total number of students in the group = n(F∪H∪C)
= n(F) + n(H) + n(C) - n(F∩H) - n(F∩C) - n(H∩C) + n(F∩H∩C)
= 65 + 45 + 42 -20 - 25 - 15 + 8 = 100

Hence, the total number of students in the group is 100


Mr. S. B. Shinde Asst Professor, MESCOE Pune
Example on Principle of Inclusion and
Exclusion
 Example 6:: Alternative Method (Using Venn diagram)
 Step 1 :Venn diagram related to the information given in the question:

 Step 2 :Total number of students in the group


= 28 + 12 + 18 + 7 + 10 + 17 + 8 = 100
 Hence, the total number of students in the group is 100
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Mathematical Induction
 Mathematical Induction is a mathematical technique which is used to prove a statement, a
formula or a theorem is true for every natural number.
 The technique involves two steps to prove a statement, as stated below –
 Step 1 (Base step) − It proves that a statement is true for the initial value. (i. e. n=n0)
 Step 2 (Inductive step) − It proves that if the statement is true for the nth iteration (or
number n), then it is also true for (n+1)th iteration ( or number n+1).
(i.e. Statement is true for n=k+1, assuming that it is true for n=k, (k≥n0)
 How to Do It:
 Step 1 − Consider an initial value for which the statement is true. It is to be shown that the
statement is true for n = initial value.
 Step 2 − Assume the statement is true for any value of n = k. Then prove the statement is
true for n = k+1. We actually break n = k+1 into two parts, one part is n = k (which is
already proved) and try to prove the other part.
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Mathematical Induction
 Have you heard of the "Domino Effect"?
 Step 1. The first domino falls
 Step 2. When any domino falls, the next domino falls
So ... all dominos will fall!

That is how Mathematical Induction works.

 In the world of numbers we say:


 Step 1. Show it is true for first case, usually n=1
 Step 2. Show that if n=k is true then n=k+1 is also true

https://www.mathsisfun.com/algebra/mathematical-induction.html

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Mathematical Induction Steps

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Mathematical Induction

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Mathematical Induction: Example 1:

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Mathematical Induction: Example 1:

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Mathematical Induction: Example 2:

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Mathematical Induction: Example 2:

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Mathematical Induction: Example 2:

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Mathematical Induction: Example 3:

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Mathematical Induction: Examples

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Bounded & Unbounded Set
 Let S be a subset of R then,
1. S is said to be bounded above if there exists a number M in R such
that x ≤ M for every x ∈ S. M is called an upper bound for S.
2. S is said to be bounded below if there exists a number m in R such that
x ≥ m for every x ∈ S. m is called a lower bound for S.
3. S is said to be bounded if it is bounded above and below.
4. Sis said to be unbounded if it lacks either an upper bound or a lower
bound.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Bounded & Unbounded Set Example
 Consider the finite set B = {2,12,0,5,-7,-2} here 12 is upper bounded and -
7 is lower bounded. Hence B is bounded.
 The set N of natural number is bounded below but not bounded above.
 The interval [0,1] is bounded.
 Consider set S= {1, 1/2,1/3,1/4……..}. This set consist all numbers of the
form 1/n where n ∈ N. We observe that all the number in set S are less
than equal to 1 and also observe that no number in set S is less then 0.Thus
we say 1 is uppper and 0 is lower bounded respectively for set S.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Bounded & Unbounded Set Example
 Consider sets C={4,6,8,10,……} and D= {0,-1,-2,-3,…..}.
 Each element of C is greater than or equal 4. Hence 4 is lower bound of C
and thus C is bounded below. From the nature of the element of C, we note
that for any number u, however large, there are always elements of C
greater than u. Therefore, u cannot be upper bound of C. Thus C has no
upper bound.
 Similarly, it can be seen that the set D is not bounded below although it is
bounded above.
 Hence both the sets C and D are unbounded sets.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Countably Infinite and Uncountably
Infinite Sets
 A set is countably infinite if its elements can be put in one-to-one
correspondence with the set of natural numbers.
 In other words, one can count off all elements in the set in such a way
that, even though the counting will take forever, you will get to any
particular element in a finite amount of time.
 Example: The integers Z form a countable set.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Countably Infinite and Uncountably
Infinite Sets
 A set is uncountable if it contains so many elements that they cannot be
put in one-to-one correspondence with the set of natural numbers.
 In other words, there is no way that one can count off all elements in the
set in such a way that, even though the counting will take forever, you will
get to any particular element in a finite amount of time. OR
 In mathematics, an uncountable set (or uncountably infinite set) is an
infinite set that contains too many elements to be countable.
 The uncountability of a set is closely related to its cardinal number: a
set is uncountable if its cardinal number is larger than that of the set of all
natural numbers.
 Example of an uncountable set is the set R of all real numbers;
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Multiset or bags
 A generalization of the concept of set in which elements may appear
multiple times: an unordered sequence of elements. OR
 A multiset (mset, for short) is an unordered collection of objects (called
the elements) in which, unlike a standard (Cantorian) set, elements are
allowed to repeat. OR
 In other words, an mset is a set to which elements may belong more than
once, and hence it is a non-Cantorian set.
 The number of copies of an element appearing in an mset is called its
multiplicity.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Multiset or bags
 The number of distinct elements in an mset M (which need not be Finite)
and their multiplicities jointly determine its cardinality, denoted by C(M).
 In other words, the cardinality of an mset is the sum of multiplicities of
all its elements.
 An mset M is called Finite if the number of distinct elements in M and
their multiplicities are both Finite, it is infinite otherwise.
 For Example: The multisets {a,a,b}, {a,b,a} and {b,a,a} are the same but
not equal to either {a,b,b} or to {a,b}.
 Two important Characteristics is of Msets:
 There may be repeated occurrences of elements.
 There is no particular order or arrangement of the elements.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Multiset or bags
 Two important Characteristics is of Msets:
 There may be repeated occurrences of elements.
 There is no particular order or arrangement of the elements.

 In fact we can characterize a multiset as a pair of (A, µ),where A is generic


set and µ is the multiplicity function defined as
µ: A → {1, 2, 3,…..}
 so that µ(a)=k, where k is number of times the element a occur in the mset.
 For Example: if [a, b, c, c, a, c] is the mset, µ(a)=2, µ(b)=1, and µ(c)=3.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Multiset or bags
 Equality of Multiset: If the number of occurrences of each element is the
same in both the msets, then the msets are equal.
 For Example: [a,b,a,a] = [a,a,b,a] and [a,b,a] ≠ [a,b]

 Multisubset or Msubset: A multiset A is said to be a multisubset of B if


multiplicity of each element in A is less or equal to its multiplicity in B.
 For Example: [1,2,2,3] ⊆ [1,1,1,2,2,3]

 Union and Intersection of Msets: Let A and B be Msets, and m and n be


the number of times x occurs in A and B respectively. Put the larger of m
and n occurrences of x in A U B. Put the smaller of m and n occurrences of
x in A ∩ B.
 For Example: [2, 2, 3] U [2, 3, 3, 4] = [2, 2, 3, 3, 4] & [2, 2, 3] ∩ [2, 3, 3, 4] =[2,3].

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Propositional Logic
 A statement can be defined as a declarative sentence, or part of a sentence, that
is capable of having a truth-value, such as being true or false.
 A propositional consists of propositional variables and connectives.
 The propositional variables are denoted by capital letters (A, B, etc) and
connectives connect the propositional variables.
 All the following declarative sentences are propositions:
1. The sun rises in the East and sets in the West.
2. Narendra Modi is the 14th Prime Minister of India.
3. Mumbai is the capital of India.
4. 1 + 1 = 2.
5. 2 + 2 = 3.
 Propositions 1, 2 and 4 are true, whereas 3 and 5 are false.
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Propositional Logic
 Now Consider the following sentences:
1. What time is it?
2. Read this carefully
3. x + 1 = 2.
4. x + y = z.
 Sentences 1 & 2 are not propositions because they are not declarative sentences.
 Sentences 3 & 4 are not propositions because they are neither true nor false.
 Here sentences 3 & 4 can be turned into a proposition if we assign values to the
variables.
 Sometimes, a statement can contain one or more other statements as parts.
 When two statements are joined together with "and", "or", the complex statement
formed:
 Paris is the capital of France and Paris has a population of over two million.
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Propositional Logic
 The Propositional logic and their The truth table is as follows:
 Negation/ NOT ( ¬ )
 OR ( ∨ ) (Disjunction)
 AND ( ∧ ) (Conjunction)
 Exclusive OR ( ⊕ )
 Implication / if-then ( → ) (Implication)
 If and only if ( ⇔ ) (Bi-conditional or Double Implication)
 The truth table is as follows:
A B ¬A A∨B A∧B A⊕B A→B A⇔B
T T F T T F T T
T F F T F T F F
F T T T F T T F
F F T F F F T T
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Types of propositions based on Truth
values
 Tautology: A proposition which is always true, is called a tautology.
 Contradiction: A proposition which is always false, is called a
contradiction.
 Contingency: A proposition that is neither a tautology nor a contradiction
is called a contingency.
 Propositional Equivalences: Two statements X and Y are logically
equivalent if any of the following two conditions hold:
 The truth tables of each statement have the same truth values.
 The bi-conditional statement X⇔Y is a tautology.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Examples on Propositional Logic
 Prove [(A→B) ∧ A]→B is a tautology
 Prove (A∨B) ∧ [(¬A) ∧ (¬B)] is a contradiction
 Prove (A∨B) ∧ (¬A) a contingency
A B A→B (A → B) ∧ A [( A → B ) ∧ A] → B
T T T T T
T F F F T
F T T F T
F F T F T

A B A ∨ B ¬ A ¬ B (¬ A) ∧ ( ¬ B) (A ∨ B) ∧ [( ¬ A) ∧ (¬ B)] (A ∨ B) ∧ (¬ A)

T T T F F F F F
T F T F T F F F
F T T T F F F T
F F F T T T F F
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Examples on Propositional Logic
 Prove ¬ (A∨ B) and [(¬A) ∧ (¬B)] are propositional equivalent:
 Testing by 1st method (Matching truth table):
A B A∨B ¬ (A ∨ B) ¬A ¬B [(¬ A) ∧ (¬ B)]
T T T F F F F
T F T F F T F
F T T F T F F
F F F T T T T

 Here, we can see the truth values of ¬ (A∨B) and [(¬A) ∧ (¬B)] are same, hence the
statements are equivalent.
 Testing by 2nd method (Bi-conditionality):
A B ¬ (A ∨ B ) [(¬ A) ∧ (¬ B)] [¬ (A ∨ B)] ⇔ [(¬ A ) ∧ (¬ B)]
T T F F T
T F F F T
F T F F T
F F T T T

 As [¬ (A∨B)] ⇔ [(¬A) ∧ (¬B)] is a tautology, the statements are equivalent.


Mr. S. B. Shinde Asst Professor, MESCOE Pune
Inverse, Converse, and Contra-positive
 Implication / if-then (→) is also called a conditional statement. It has
two parts −
 Hypothesis, P
 Conclusion, Q
 As mentioned earlier, it is denoted as P→Q.
 Example of Conditional Statement − “If you do your homework, you will
not be punished.” Here,
 "you do your homework" is the hypothesis, P, and
 "you will not be punished" is the conclusion, Q.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Inverse, Converse, and Contra-positive
 Inverse::
 An inverse of the conditional statement is the negation of both the
hypothesis and the conclusion. If the statement is “If P, then Q”, the
inverse will be “If not P, then not Q”.
The Inverse of P→ Q is ¬ P→ ¬ Q.
 Converse::
 The converse of the conditional statement is computed by interchanging
the hypothesis and the conclusion. If the statement is “If P, then Q”, the
converse will be “If Q, then P”.
The Converse of P → Q is Q → P.
 Contra-positive::
 The contra-positive of the conditional is computed by interchanging the
hypothesis and the conclusion of the inverse statement. If the statement
is “If P, then Q”, the contra-positive will be “If not Q, then not P”.
The Contra-positive of P → Q is ¬ Q→ ¬ P.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Inverse, Converse, and Contra-positive
 To Summarize,

Statement IF P then Q P→ Q
Inverse IF Not P then NOT Q ¬ P→ ¬ Q
Converse IF Q then P Q→P
Contra-positive IF Not Q then NOT P ¬ Q→ ¬ P

 Example 1: “If you do your homework , you will not be punished.”


 Statement: “If you do your homework , you will not be punished.”
 Inverse: “If you do not do your homework, you will be punished.”
 Converse: “If you will not be punished, you do your homework”.
 Contra-positive: “If you are punished, you did not do your homework”.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Inverse, Converse, and Contra-positive
 Example 2: “The home team wins whenever it is raining.”
 Statement: “If it is raining, then the home team wins.”
 Inverse: “If it is not raining, then the home team does not win.”
 Converse: “If the home team wins, then it is raining.”
 Contra-positive: “If the home team does not win, then it is not raining.”

 Example 3: “If today is Friday, then it is raining.”


 Statement: “If today is Friday then it is raining.”
 Inverse: “If today is not Friday, then it is not raining.”
 Converse: “If it is raining, then today is Friday.”
 Contra-positive: “If it is not raining, then today is not Friday.”
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Logical Equivalences

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Examples
1. Construct the truth table for (P → Q) ∧ (¬P ⇔Q)
2. Prove that P ∨¬ P is a Tautology
3. Prove that P ∧¬ P is a Contradiction
Solution 1:
P Q ¬P P→ Q ¬P ⇔Q (P → Q) ∧ (¬P ⇔Q)
T T F T F F
T F F F T F
F T T T T T
F F T T F F

Solution 2: Solution 3:
P ¬P P∨¬P P ¬P P∧¬P
T F T T F F
F T T F T F

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Examples
4. Determine whether each of the following is a Tautology, a Contradiction or
Contingency::
1. [P ∧ (P → Q)] → Q
2. (P → Q) ↔ (¬ Q → ¬ P)
3. (¬ P ∧ Q) ∧ (P ∨ ¬Q)
4. (P → ¬ Q) ∨ (¬ R → P)
5. (P → Q) ∧ (¬ P ∨ Q)
6. (P → Q) → (P ∧ Q)
Solution:
1,2, 4 are Tautology whereas 3 is Contradiction and 5, 6 are Contingency

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Examples
5. If P→Q is false, determine the value of (¬ (P∧Q)) →Q
6. If P & Q are false , find truth values of (P ∨ Q) ∧ ( ¬ P ∨ ¬ Q)
7. If P→Q is true, Can we determine the value ¬ P ∨ (P→Q)

P Q P→Q (P∧Q) ¬ (P∧Q) (¬ (P∧Q)) →Q


T F F F T F

P Q ¬P ¬Q P ∨ Q ¬ P ∨ ¬ Q (P ∨ Q) ∧ ( ¬ P ∨ ¬ Q)
F F T T F T F

P Q ¬P P→ Q ¬ P ∨ (P→Q)
T T F T T
F T T T T
F F T T T
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Examples
8. For given propositions construct truth tables:
a) P ∧ (¬ Q ∨ R)
b) (P ∧ Q) → ¬ R
c) P → (¬ Q ∨ ¬ R)
d) (P ↔ Q) ↔ (R ↔ S)
e) (P ⊕ Q) ∧ (P ⊕¬Q)

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Applications of Propositional Logic
 Logic has many important applications to mathematics, computer science, and numerous
other disciplines.
 Statements in mathematics and the sciences in natural language often are imprecise or
ambiguous.
 To make such statements precise, they can be translated into the language of logic. For
example, logic is used in the specification of software and hardware, because these
specifications need to be precise before development begins.
 Furthermore, propositional logic and its rules can be used to design computer circuits, to
construct computer programs, to verify the correctness of programs, and to build expert
systems.
 Logic can be used to analyze and solve many familiar puzzles. Software systems based on
the rules of logic have been developed for constructing some, but not all, types of proofs
automatically.
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Translating English Sentences
 There are many reasons to translate English sentences into expressions
involving propositional variables and logical connectives.
 In particular, English (and every other human language) is often
ambiguous.
 Translating sentences into compound statements removes the ambiguity.
 Basic three steps for translation are:
 Step 1: Find logical connectives.
 Step 2: Break the sentence into elementary propositions.
 Step 3: Rewrite the sentence in propositional logic.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Example:
Example 1: You can have free coffee if you are senior citizen and it is a
Tuesday
Solution:
Step 1: Find logical connectives.
You can have free coffee if you are senior citizen and it is a Tuesday
Step 2: Break the sentence into elementary propositions.
A: You can have free coffee
B: You are senior citizen
C: It is a Tuesday
Step 3: Rewrite the sentence in propositional logic.
(B ∧ C) → A
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Example:
Example 2: If you are older than 15 or you are with your parents then you can
play roll coaster.
Solution:
Step 1: Find logical connectives.
If you are older than 15 or you are with your parents then you can play roll coaster.
Step 2: Break the sentence into elementary propositions.
A= you are older than 15
B= you are with your parents
C= you can play roll coaster
Step 3: Rewrite the sentence in propositional logic.
(A ∨ B) → C
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Example:
Example 3: Express the specification “The automated reply cannot be sent
when the file system is full” using logical connectives.
Solution:
Let P : “The automated reply can be sent” & Q : “The file system is full.”
Q→ ¬ P
Example 4: “You can access the Internet from campus only if you are a
computer science major or you are not a freshman.”
Solution: Let A, C, and F represent respectively “You can access the internet
from campus,” “You are a computer science major,” and “You are a
freshman.”
A→ (C ∨ ¬ F)
Mr. S. B. Shinde Asst Professor, MESCOE Pune
Example:
Example 5: Assume two elementary statements:
P: you drive over 65 mph; Q: you get a speeding ticket.
Translate each of these sentences to logic
a) You do not drive over 65 mph.
b) You drive over 65 mph, but you don't get a speeding ticket.
c) You will get a speeding ticket if you drive over 65 mph.
d) If you do not drive over 65 mph then you will not get a speeding ticket.
e) Driving over 65 mph is sufficient for getting a speeding ticket.
f) You get a speeding ticket, but you do not drive over 65 mph.

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Example:
Example 5: Assume two elementary statements:
P: you drive over 65 mph; Q: you get a speeding ticket.
Translate each of these sentences to logic
a) You do not drive over 65 mph.: (¬ P)
b) You drive over 65 mph, but you don't get a speeding ticket. : (P ∧¬ Q)
c) You will get a speeding ticket if you drive over 65 mph. : (P → Q)
d) If you do not drive over 65 mph then you will not get a speeding ticket.:
(¬ P → ¬ Q)
e) Driving over 65 mph is sufficient for getting a speeding ticket. : (P →Q)
f) You get a speeding ticket, but you do not drive over 65 mph. : (Q ∧¬ P)

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Example:
Example 6: Let P and Q be the propositions: “The election is decided” and
“the votes have been counted” respectively. Express each of the propositions
as English sentences:
a) ¬ P
b) P ∨ Q
c) ¬ P ∧ Q
d) Q → P
e) ¬ P →¬ Q
f) P ⇔ Q
g) ¬ Q ∨ (¬ P ∧ Q)

Mr. S. B. Shinde Asst Professor, MESCOE Pune


Example:
Example 6: Let P and Q be the propositions: “The election is decided” and
“the votes have been counted” respectively. Express each of the propositions
as English sentences:
a) ¬ P : The election is not (yet) decided.
b) P ∨ Q : The election is decided or the votes have been counted.
c) ¬ P ∧ Q :The votes have been counted but the election is not (yet) decided.
d) Q → P : If the votes have been counted then the election is decided.
e) ¬ P →¬ Q :The election is not decided unless the votes have been counted.
f) P ⇔ Q :The election is decided if and only if the votes been counted.
g) ¬ Q ∨ (¬ P ∧ Q): The votes have not been counted, or they have been
counted by the election is not (yet) decided.
Mr. S. B. Shinde Asst Professor, MESCOE Pune
The End

You might also like