DSTLCST Notes Aktu

Download as pdf or txt
Download as pdf or txt
You are on page 1of 129

1 C (CS/IT-Sem-3)

QUANTUM SERIES

For
B.Tech Students of Second Year
of All Engineering Colleges Affiliated to
Dr. A.P.J. Abdul Kalam Technical University,
Uttar Pradesh, Lucknow
(Formerly Uttar Pradesh Technical University)

Discrete Structures & Theory of Logic

By
Dr. Anuj Bhardwaj Dr. Parul Tiwari
M.Sc., Ph.D M.Sc., Ph.D

TM

QUANTUM PAGE PVT. LTD.


Ghaziabad New Delhi
2 C (CS/IT-Sem-3) 3 C (CS/IT-Sem-3)

PUBLISHED BY : Apram Singh CONTENTS


Quantum Page Pvt. Ltd. KCS 303 : Discrete Structures & Theory of Logic
Plot No. 59/2/7, Site - 4, Industrial Area,
Sahibabad, Ghaziabad-201 010 UNIT - 1 : SETS, FUNCTIONS & NATURAL NUMBERS (1–1 C to 1–30 C)
Phone : 0120 - 4160479 Set Theory: Introduction, Combination of sets, Multisets, Ordered
pairs. Proofs of some general identities on sets. Relations:
Email : [email protected] Website: www.quantumpage.co.in Definition, Operations on relations, Properties of relations,
Composite Relations, Equality of relations, Recursive definition of
Delhi Office : 1/6590, East Rohtas Nagar, Sahadara, Delhi-110032
relation, Order of relations.
Functions: Definition, Classification of functions, Operations on
© ALL RIGHTS RESERVED functions, Recursively defined functions. Growth of Functions.
Natural Numbers: Introduction, Mathematical Induction, Variants
No part of this publication may be reproduced or transmitted,
of Induction, Induction with Nonzero Base cases. Proof Methods,
in any form or by any means, without permission. Proof by counter – example, Proof by contradiction.
UNIT - 2 : ALGEBRAIC STRUCTURES (2–1 C to 2–24 C)
Definition, Groups, Subgroups and order, Cyclic Groups, Cosets,
Information contained in this work is derived from sources Lagrange's theorem, Normal Subgroups, Permutation and Symmetric
groups, Group Homomorphisms, Definition and elementary
believed to be reliable. Every effort has been made to ensure
properties of Rings and Fields.
accuracy, however neither the publisher nor the authors
UNIT - 3 : LATTICES & BOOLEAN ALGEBRA (3–1 C to 3–22 C)
guarantee the accuracy or completeness of any information La tti ces: D efi nition, Properties of la tti ces – Bounded,
published herein, and neither the publisher nor the authors Complemented, Modular and Complete lattice.
shall be responsible for any errors, omissions, or damages Boolean Algebra: Introduction, Axioms and Theorems of Boolean
al gebra, Al gebrai c ma nipula tion of Boolea n expressions.
arising out of use of this information. Simplification of Boolean Functions, Karnaugh maps, Logic gates,
Digital circuits and Boolean algebra.
Discrete Structures & Theory of Logic (CS/IT : Sem-3) UNIT - 4 : PROPOSITIONAL & PREDICATE LOGIC (4–1 C to 4–20 C)
1st Edition : 2009-10 12th Edition : 2020-21 Propositional Logic: Proposition, well formed formula, Truth tables,
Tautology, Satisfiability, Contradiction, Algebra of proposition,
2nd Edition : 2010-11
Theory of Inference.
3rd Edition : 2011-12 Predicate Logic: First order predicate, well formed formula of
4th Edition : 2012-13 predicate, quantifiers, Inference theory of predicate logic.
5th Edition : 2013-14 UNIT - 5 : TREES, GRAPHS & COMBINATORICS (5–1 C to 5–38 C)
6th Edition : 2014-15 Trees: Definition, Binary tree, Binary tree traversal, Binary search tree.
Graphs: Definition and terminology, Representation of graphs,
7th Edition : 2015-16 Multigraphs, Bipartite graphs, Planar graphs, Isomorphism and
8th Edition : 2016-17 Homeomorphism of graphs, Euler and Hamiltonian paths, Graph
9th Edition : 2017-18 coloring, Recurrence Relation & Generating function: Recursive
definition of functions, Recursive algorithms, Method of solving
10th Edition : 2018-19 recurrences.
11th Edition : 2019-20 (Thoroughly Revised Edition) Combinatorics: Introduction, Counting Techniques, Pigeonhole
Principle.
Price: Rs. 80/- only
SHORT QUESTIONS (SQ–1 C to SQ–23 C)

SOLVED PAPERS (2014-15 TO 2019-20) (SP–1 C to SP–24 C)


Printed Version : e-Book.
Discrete Structures & Theory of Logic 1–1 C (CS/IT-Sem-3)

1 Set Theory, Functions


and Natural Numbers

CONTENTS
Part-1 : Set Theory : Introduction, ........................ 1–2C to 1–5C
Combination of Sets, Multisets

Part-2 : Ordered Pair, Proof of Some .................... 1–5C to 1–8C


General Identities on Sets

Part-3 : Relations : Definition, Operation .......... 1–8C to 1–16C


on Relations, Properties of Relation,
Composite Relation, Equality of
Relation, Recursive Definition of
Relation, Order of Relation

Part-4 : Function : Definition, ............................ 1–16C to 1–22C


Classification of Functions,
Operations on Functions,
Recursively Defined Functions,
Growth of Functions

Part-5 : Natural Numbers : ................................. 1–22C to 1–26C


Introductions, Mathematical
Induction, Variants of
Induction, Induction with
Non-zero Base Cases

Part-6 : Proof Methods, Proof by ........................ 1–26C to 1–29C


Counter–Example,
Proof by Contradiction
1–2 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–3 C (CS/IT-Sem-3)

10. Disjoint set : Let A and B be two sets, if there is no common element
PART-1 between A and B, then they are said to be disjoint.

Set Theory : Introduction, Combination of Sets, Multisets. Que 1.2. Describe the different types of operation on sets.

Answer
Questions-Answers
1. Union : Let A and B be two sets, then the union of sets A and B is a set
Long Answer Type and Medium Answer Type Questions that contain those elements that are either in A or B or in both. It is
denoted by A  B and is read as ‘A union B’.
Symbolically, A  B = {x|x  A or x  B}
For example : A = {1, 2, 3, 4 }
Que 1.1. What do you understand by set ? Explain different types B = {3, 4, 5, 6 }
of set. A  B = {1, 2, 3, 4, 5, 6}
2. Intersection : Let A and B be two sets, then intersection of A and B is
Answer a set that contain those elements which are common to both A and B. It
1. A set is a collection of well defined objects, called elements or members is denoted by A  B and is read as ‘A intersection B’.
of the set. Symbolically, A  B = {x|x  A and x  B}
2. These elements may be anything like numbers, letters of alphabets, For example : A = {1, 2, 3, 4}
points etc. B = {2, 4, 6, 7}
3. Sets are denoted by capital letters and their elements by lower case then A  B = {2, 4}
letters. 3. Complement : Let U be the universal set and A be any subset of U,
4. If an object x is an element of set A, we write it as x  A and read it as ‘x then complement of A is a set containing elements of U which do not
belongs to A’ otherwise x  A (x does not belong to A). belong to A. It is denoted by Ac or A or A .
Types of set : Symbolically, Ac = {x|x  U and x  A}
1. Finite set : A set with finite or countable number of elements is called For example : U = {1, 2, 3, 4, 5, 6}
finite set. and A = {2, 3, 5}
2. Infinite set : A set with infinite number of elements is called infinite then Ac = {1, 4, 6}
set. 4. Difference of sets : Let A and B be two sets. Then difference of A and
3. Null set : A set which contains no element at all is called a null set. It is B is a set of all those elements which belong to A but do not belong to B
denoted by  or { }. It is also called empty or void set. and is denoted by A – B.
4. Singleton set : A set which has only one element is called singleton set. Symbolically, A – B = {x|x  A and x  B}
5. Subset : Let A and B be two sets, if every elements of A also belongs to For example : Let A = {2, 3, 4, 5, 6, 7}
B i.e., if every element of set A is also an element of set B, then A is and B = {4, 5, 7}
called subset of B and it is denoted by A  B. then A – B = {2, 3, 6}
Symbolically, A  B if x  A  x  B. 5. Symmetric difference of set : Let A and B be two sets. The symmetric
6. Superset : If A is subset of a set B, then B is called superset of A. difference of A and B is a set containing all the elements that belong to
7. Proper subset : Any subset A is said to be proper subset of another set A or B but not both. It is denoted by A  B or A  B.
B, if there is at least one element of B which does not belong to A, i.e., if Also A  B = (A  B) – (A  B)
A  B but A  B. It is denoted by A  B. For example : Let A = {2, 3, 4, 6}
8. Universal set : In many applications of sets, all the sets under B = {1, 2, 5, 6}
consideration are considered as subsets of one particular set. This set is then A  B = {1, 3, 4, 5}
called universal set and is denoted by U.
9. Equal set : Two set A and B are said to be equal if every element of A Que 1.3. What do you mean by multisets ?
belong to set B and every element of B belong to set A. It is written as
A = B. Answer
Symbolically, A = B if x  A and x  B.
1. Multisets are sets where an element appear more than once,
1–4 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–5 C (CS/IT-Sem-3)

For example : A = {1, 1, 1, 2, 2, 3} ii. B = {1, 8, 27, 64}


B = {a, a, a, b, b, b, c, c,} iii. C = {3, 6, 9, 12, 15 ....}
are multisets. iv. D = {2, 3, 5, 7, 11, 13 .....}
2. The multisets A and B can also be written as
A = {3.1, 2.2, 1.3} and B = {3.a, 3.b, 2.c} Answer
3. The multiplicity of an element in a multiset is defined to be the number i. A = {x|x is an integer and –4  x  3}
of times an element appears in the multiset. In above examples, ii. B = {x|x = n3, where 1  n  4, n is natural number}
multiplicities of the elements 1, 2, 3 in multiset A are 3, 2, 1 respectively. iii. C = {x|x = 3n, where n is natural number}
4. Let A and B be two multisets. Then, A  B, is the multiset where the iv. D = {x|x is the integer and prime number}
multiplicity of an element is the maximum of its multiplicities in A and B.
5. The intersection of A and B, A  B, is the multiset where the multiplicity PART-2
of an element is the minimum of its multiplicities in A and B.
6. The difference of A and B, A – B, is the multiset where the multiplicity Ordered Pair, Proof of Some General Identities on Sets.
of an element is equal to the multiplicity of the element in A minus the
multiplicity of the element in B if the difference is positive, and is equal
to zero if the difference is zero and negative. Questions-Answers
7. The sum of A and B, A + B, is the multiset where the multiplicity of an
elements is the sum of multiplicities of the elements in A and B. Long Answer Type and Medium Answer Type Questions

Que 1.4. Let P and Q be two multisets {4.a, 3.b, 1.c} and {3.a, 3.b,
2.d} respectively. Find Que 1.7. List down laws of algebra of sets.
i. P  Q, ii. P  Q, iii. P – Q, iv. Q – P, v. P + Q. OR
Write down the general identities on sets.
Answer
i. P Q = {4.a, 3.b, 1.c, 2.d} Answer
ii. P Q = {3.a, 3.b} Let A, B, C be any three sets and U be the universal set, then following are
iii. P – Q = {1.a, 1.c} the laws of algebra of sets :
iv. Q – P = {2.d} 1. Idempotent laws :
v. P + Q = {7.a, 6.b, 1.c, 2.d} a. A  A = A
Que 1.5. Describe each of following in roster form : b. A  A = A
2. Commutative laws :
i. A = {x : x is an even prime} a. A  B = B  A
ii. B = {x : x is a positive integral divisor of 60} b. A  B = B  A
iii. C = {x  R : x2 – 1 = 0} 3. Associative laws :
iv. D = {x : x2 – 2x + 1 = 0} a. A  (B  C) = (A  B)  C
v. E = {x : x is multiple of 3 or 5} b. A  (B  C) = (A  B)  C
4. Distributive laws :
Answer
a. A  (B  C) = (A  B)  (A  C)
i. A = {2} b. A  (B  C) = (A  B)  (A  C)
ii. B = {1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60} 5. Identity laws :
iii. C = {1, –1} a. A  = A
iv. D = {1} b. A U = A
v. E = {3, 5, 6, 10, 15 ....} c. A  U = U
d. A  = 
Que 1.6. Describe the following in set builder form : 6. Involution law :
i. A = {–4, –3, –2, –1, 0, 1, 2, 3} a. (Ac)c = A
1–6 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–7 C (CS/IT-Sem-3)

7. Complement laws : Bit string for s1 is 1010101010


a. A  Ac = U Bit string for s2 is 0101010101
b. A  Ac =  Bit string for s3 is 1111100000
c. Uc = 
d. c = U Que 1.10. If A and B are two subsets of universal set, then prove
8. De Morgan’s laws : the following :
a. (A  B)c = Ac  Bc a. (A – B) = (B – A) iff A = B
b. (A  B)c = Ac  Bc b. (A – B) = A iff A  B = 
9. Absorption laws :
a. A  (A  B) = A Answer
b. A  (A  B) = A a. Let A=B
Consider any element x  A – B
Que 1.8. Prove for any two sets A and B that, (A  B) = A B.
 x  A and x  B
AKTU 2014-15, Marks 05  x  B and x  A [ A = B]
 x B–A
 A–B B–A ...(1.10.1)
Answer
Conversely, if xB–A
Let x  (A B)  x  B and x  A
 xAB  x  A and x  B
 x  A and x  B  xA–B
 x  A and x  B B–A A–B ...(1.10.2)
 x  A B From eq. (1.10.1) and (1.10.2), we have
 (A  B) A B ...(1.8.1) If A= BA–B=B–A
Now, let x  A  B Now let A–B= B–A
 x  A and x  B Let x  A – B as A – B = B – A
 x  A and x  B  x B–A
 x  (A  B) Now x  A – B  x  A and x  B ...(1.10.3)
x  (A  B) and x  B – A  x  B and x  A ...(1.10.4)
(AB)  (A B) ...(1.8.2) Eq. (1.10.3) and (1.10.4), can hold true when A = B
From eq. (1.8.1) and (1.8.2), (A B) = A B b. Let A–B= A
To show AB=
Que 1.9. Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, and the ordering of
Let A  B   and let x  A  B and x  
elements of U has the elements in increasing order; that is, ai = i.  x  A and x  B
What bit strings represent the subset of all odd integers in U, the  x  (A – B) and x  B [ A – B = A]
subset of all even integers in U, and the subset of integers not  x  A and x  B and x  B
exceeding 5 in U ?  x
which is a contradiction.
Answer  AB=
Since U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} Now conversely, let A  B = 
Let the subset of all odd integers be s1, i.e., To show A – B = A
s1 = {1, 3, 5, 7, 9} Let xA–B
subset of all even integers be s2, i.e.,  x  A and x  B
s2 = {2, 4, 6, 8, 10}  xA [as A  B = ]
and the subset of integers not exceeding 5 be s3, i.e.,  A–B A ...(1.10.5)
s3 = {1, 2, 3, 4, 5} Conversely, let x  A
The bit string by characteristic function is given as follows :  x  A and x  B [as A  B = ]
1–8 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–9 C (CS/IT-Sem-3)

 xA–B 4. Inverse relation : A relation R defined from B to A is called inverse


 AA–B ...(1.10.6) relation of R defined from A to B if
From eq. (1.10.5) and (1.10.6), R–1 = {(b, a) : b  B and a  A and (a, b)  R}.
A=A–B For example : Consider relation
R = {(1, 1), (1, 2), (1, 3), (3, 2)}
then R–1 = {(1, 1), (2, 1), (3, 1), (2, 3)}
PART-3 5. Complement of a relation : Let relation R is defined from A to B, then
Relations : Definition, Operation on Relations, Properties of complement R is set of ordered pairs {(a, b) : (a, b)  R}. It is also called
Relation, Composite Relation, Equality of Relation, Recursive complementary relation.
Definition of Relation, Order of Relation. For example :
Let A = {1, 2, 3} B = {4, 5}
Then A × B = {(1, 4), (1, 5), (2, 4), (2, 5), (3, 4), (3, 5)}
Questions-Answers Let R be defined as R = {(1, 4), (3, 4), (3, 5)}
Then RC = R = {(1, 5), (2, 4), (2, 5)}
Long Answer Type and Medium Answer Type Questions
Que 1.12. Explain operation on relation with example.

Que 1.11. Describe the term relation along with its types. Answer
Let A and B be two non-empty sets, then R is relation from A to B if R is 1. Relations are sets of ordered pairs so all set operations can be done on
subset of A × B and is set of ordered pair (a, b) where a  A and b  B. It is relations.
denoted by aRb and read as “a is related to b by R”. 2. The resulting sets contain ordered pairs and are, therefore, relations.
Symbolically, R = {(a, b) : a  A, b  B, a R b } 3. If R and S denote two relations, then R  S, known as intersection of
If (a, b)  R then a R b and read as “a is not related to b by R”. R and S, defines a relation such that
x(R  S) y = x R y  x S y
For example :
4. Similarly, R  S, known as union of R and S, such that
Let A = {1, 2, 3, 4}, B = {1, 2} and aRb iff a × b = even number
x(R  S) y = x R y  x S y
Then R = {(1, 2), (2, 1), (2, 2), (3, 2), (4, 1), (4, 2)}
Also, x(R – S) y = x R y  x $ y where R – S is known as different
Types of relation :
of R and S
1. Universal relation : A relation R is called universal relation on A if
and x(R) y = x R y where R is the complement of R
R = A × A. In case where R is defined from A to B, then R is universal
For example : A = {x, y, z}, B = {x, y, z}, C = {x, y, z}
relation if R = A × B.
D = {Y, z}, R = {(x, X), (x, Y), (y, z)}
For example :
S = {(x, Y), (y, z)}
If A = {1, 2, 3}
The complement of R consists of all pairs of the Cartesian product
then R = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1),
A × B that are not R. Thus A × B = {(x, X), (x, Y), (x, Z), (y, X), (y, Y),
(3, 2), (3, 3)}
(y, Z), (z, X), (z, Y), (z, Z)}
is universal relation over A.
Hence R = {(x, Z), (y, X), (y, Y), (z, X), (z, Y), (z, Z)}
2. Identity relation : A relation R is called identity relation on A if
R  S = {(x, X), (x, Y), (y, Z)}
R = {(a, a)|a  A}. It is denoted by IA or A or . It is also called diagonal
R  S = {(x, Y), (y, Z)}
relation.
R – S = {(x, Y)}
For example :
If A = {1, 2, 3}, then IA = {(1, 1), (2, 2), (3, 3)} Que 1.13. Give properties of relation.
is identity relation on A.
3. Void relation : A relation R is called a void relation on A if R = . It is Answer
also called null relation.
For example : Properties of relation are :
If A = {1, 2, 3} and R is defined as R = {(a + b) |a + b > 5}, a, b  A then 1. Reflexive relation : A binary relation R on set A is said to be reflexive
R = . if every element of set A is related to itself.
1–10 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–11 C (CS/IT-Sem-3)

i.e.,  a  A, (a, a)  R or aRa. 2. Symbolically, R  S = {(a, c)| b  B such that (a, b)  R and
For example : Let R = {(1, 1), (1, 2), (2, 2), (2, 3), (3, 3)} be a relation (b, c)  S}
defined on set A = {1, 2, 3}. As (1, 1)  R, (2, 2)  R and (3, 3)  R.
Que 1.15. Describe recursive definition of relation.
Therefore, R is reflexive relation.
2. Irreflexive relation : A binary relation R defined on set A is said to
irreflexive if there is no element in A which is related to itself i.e., Answer
 a  A such that (a, a)  R. 1. The characteristic function CR of a relation R  Nk is defined as follows :
For example : Let R = {(1, 2), (2, 1), (3, 1)} be a relation defined on set – CS(X1, ..., Xk) = 1 if <X1, ..., Xk>  S
A = {1, 2, 3}. As (1, 1)  R, (2, 2)  R and (3, 3)  R. Therefore, R is – CS(X1, ..., Xk) = 0 if <X1, ..., Xk>  S
irreflexive relation. 2. A relation R is a recursive set iff its characteristic function CR is a
3. Non-reflexive relation : A relation R defined on set A is said to be non- recursive function.
reflexive if it is neither reflexive nor irreflexive i.e., some elements are 3. Examples of recursive relations : <, >, , =
related to itself but there exist at least one element not related to itself. c<(x, y) = sg(y  x)
4. Symmetric relation : A binary relation on a set A is said to be c>(x, y) = sg(x  y)
symmetric if (a, b)  R  (b, a) R. c(x, y) = sg (x  y)
5. Asymmetric relation : A binary relation on a set A is said to be
asymmetric if (a, b)  R  (b, a)  R. c=(x, y) = sg (x  y) ×c(x, y) = sg (y  x)
6. Antisymmetric relation : A binary relation R defined on a set A is said 4. Consider relation R(x, y, z) defined as follows :
to antisymmetric relation if (a, b)  R and (b, a)  R  a = b i.e., aRb and – R(x, y, z) iff y × z  x
bRa  a = b for a, b  R. 5. We see that R is the result of substituting the recursive function × into
7. Transitive relation : A binary relation R on a set A is transitive recursive relation .
whenever (a, b)  R and (b, c)  R then (a, c)  R 6. Thus, R is recursive.
i.e., aRb and bRc  aRc. 7. (Technically, R is the result of substituting the functions f1(x, y, z) = y ×
z and f2(x, y, z) = x into , and we need to show that f1(x, y, z) = y × z and
Que 1.14. Write short notes on : f2(x, y, z) = x are recursive ... but that’s trivial using the identity
a. Equivalence relation functions).
b. Composition of relation
Que 1.16. Define the term partial order relation or partial ordering
OR
Write a short note on equality of relation. relation.

Answer Answer
a. Equivalence relation : A binary relation R defined on set A is called Partial Order Relation (POR) if
1. A relation R on a set A is said to be equivalence relation if it is R satisfies following properties :
reflexive, symmetric and transitive. i. (a, a)  R  a  A (Reflexive)
2. The two elements a and b related by an equivalence relation are ii. If (a, b)  R and (b, a)  R, the a = b (Antisymmetric)
called equivalent. iii. If (a, b)  R and (b, c)  R  (a, c)  R where a, b, c  A (Transitive)
3. So, a relation R is called equivalence relation on set A if it satisfies A set A together with a partial order relation R is called partial order set or
following three properties : poset.
i. (a, a)  R  a  A (Reflexive)
Que 1.17. Write short notes on :
ii. (a, b)  R  (b, a)  R (Symmetric)
iii. (a, b)  R and (b, c)  R  (a, c)  R (Transitive) a. Closure of relations
b. Composition of relation : b. Total order
1. Let R be a relation from a set A to B and S be a relation from set B c. Compatibility relation
to C then composition of R and S is a relation consisting or ordered
pair (a, c) where a  A and c  C provided that there exist b  B such
that (a, b)  R  A × B and (b, c)  S  B × C. It is denoted by RS.
1–12 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–13 C (CS/IT-Sem-3)

a – c is divisible by m
Answer a  c (mod m), yes it is transitive.
a. Closure of relations : R is an equivalence relation.
i. Reflexive closure : Let R be a relation defined on set A. The To show : (x1 + x2)  (y1 + y2) :
R  IA is called reflexive closure of R, where IA = {(a, a)|a  A} is It is given x1  y1 and x2  y2
diagonal or identity relation. i.e., x1 – y1 divisible by m
ii. Symmetric closure : Let R be a relation defined on set A. Then x2 – y2 divisible by m
R  R–1 is called symmetric closure of R, where R–1 is inverse of R Adding above equation :
on A. (x1 – y1) + (x2 – y2) is divisible by m
b. Total order : A binary relation R on a set A is said to be total order iff it  (x1 + x2) – (y1 + y2) is divisible by m
is i.e., (x1 + x2)  (y1 + y2)
i. Partial order
Que 1.19. Let R be binary relation on the set of all strings of 0’s
ii. (a, b)  R or (b, a)  R  a, b  A
It is also called linear order. and 1’s such that R = {(a, b)|a and b are strings that have the same
c. Compatibility relation : A binary relation R defined on set A is said to number of 0’s}. Is R is an equivalence relation and a partial ordering
be compatible relation if it is reflexive and symmetric. It is denoted by ‘’. relation ? AKTU 2014-15, Marks 05
Que 1.18. Show that R = {(a, b)|a  b (mod m)} is an equivalence
Answer
relation on Z. Show that if x1  y1 and x2  y2 then (x1 + x2)  (y1 + y2).
For equivalence relation :
AKTU 2014-15, Marks 05 Reflexive : a R a  (a, a)  R a  R
where a is a string of 0’s and 1’s.
Answer Always a is related to a because both a has same number of 0’s.
R = {(a, b) | a  b (mod m)} It is reflexive.
For an equivalence relation it has to be reflexive, symmetric and transitive. Symmetric : Let (a, b)  R
Reflexive : For reflexive  a   we have (a, a)  R i.e., then a and b both have same number of 0’s which indicates that again
a  a (mod m) both b and a will also have same number of zeros. Hence (b, a)  R. It is
 a – a is divisible by m i.e., 0 is divisible by m symmetric.
Therefore aRa,  a  Z, it is reflexive. Transitive : Let (a, b)  R, (b, c)  R
Symmetric : Let (a, b)  Z and we have (a, b)  R  a and b have same number of zeros.
(a, b)  R i.e., a  b (mod m) (b, c)  R  b and c have same number of zeros.
 a – b is divisible by m Therefore a and c also have same number of zeros, hence (a, c)  R.
 a – b = km, k is an integer It is transitive.
 (b – a) = (– k) m  R is an equivalence relation.
 (b – a) = p m, p is also an integer For partial order, it has to be reflexive, antisymmetric and transitive. Since,
 b – a is also divisible by m symmetricity and antisymmetricity cannot hold together. Therefore, it is not
 b  a (mod m )  (b, a)  R partial order relation.
It is symmetric. Que 1.20. Let A {1, 2, 3,..........., 13}. Consider the equivalence relation
Transitive : Let (a, b)  R and (b, c)  R then
(a , b)  R  a – b is divisible by m on A × A defined by (a, b) R (c, d) if a + d = b + c. Find equivalence
 a – b = t m, t is an integer ...(1.18.1) classes of (5, 8). AKTU 2014-15, Marks 05
(b, c)  R  b – c is divisible by m
 b – c = s m, s is an integer ...(1.18.2)
Answer
From eq. (1.18.1) and (1.18.2)
a – b + b – c = (t + s) m A = {1, 2, 3, ...., 13}
a – c = lm, l is also an integer [(5, 8)] = [(a, b) : (a, b) R (5, 8), (a, b)  A × A]
1–14 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–15 C (CS/IT-Sem-3)

= [(a, b) : a + 8 = b + 5]
 b R a
= [(a, b) : a + 3 = b]
[5, 8] = {(1, 4), (2, 5), (3, 6), (4, 7) aRb and bRa holds only when a = b. Relation is antisymmetric.
(5, 8), (6, 9), (7, 10), (8, 11) Transitive : Let a, b, c  A and aRb and bRc
(9, 12), (10, 13)}  b  a, c  b
 ca
Que 1.21. The following relation on A = {1, 2, 3, 4}. Determine  aRc
whether the following : Hence, relation is transitive.
a. R = {(1, 3), (3, 1), (1, 1), (1, 2), (3, 3), (4, 4)} Therefore,  is a partial order relation.
b. R = A × A ii. Since all the elements of the given set A are comparable to each other,
we always have a least upper bound and greatest lower bound for each
Is an equivalence relation or not ? AKTU 2015-16, Marks 10 pair of elements of A and A is also a partial order relation. Hence, (A, )
is a lattice.
Answer
Que 1.23. Let n be a positive integer and S a set of strings. Suppose
a. R = {(1, 3), (3, 1), (1, 1), (1, 2), (3, 3), (4, 4)}
Reflexive : (a, a)  R  a  A that R n is the relation on S such that sR nt if and only if
 (1, 1)  R, (2, 2)  R s = t, or both s and t have at least n characters and first n characters
 R is not reflexive. of s and t are the same. That is, a string of fewer than n characters is
Symmetric : Let (a, b)  R then (b, a)  R. related only to itself; a string s with at least n characters is related
 (1, 3)  R so (3, 1)  R to a string t if and only if t has at least n characters and t beings with
 (1, 2)  R but (2, 1)  R the n characters at the start of s. AKTU 2018-19, Marks 07
 R is not symmetric.
Transitive : Let (a, b)  R and (b, c)  R then (a, c)  R
Answer
 (1, 3)  R and (3, 1)  R so (1, 1)  R
 (2, 1)  R and (1, 3)  R but (2, 3)  R We have to show that the relation Rn is reflexive, symmetric, and transitive.
 R is not transitive. 1. Reflexive : The relation Rn is reflexive because s = s, so that sRns
Since, R is not reflexive, not symmetric, and not transitive so R is not an whenever s is a string in S.
equivalence relation. 2. Symmetric : If sRn t, then either s = t or s and t are both at least n
b. R=A×A characters long that begin with the same n characters. This means that
Since, A × A contains all possible elements of set A. So, R is reflexive, tRn s. We conclude that Rn is symmetric.
symmetric and transitive. Hence R is an equivalence relation. 3. Transitive : Now suppose that sRn t and tRn u. Then either s = t or s
and t are at least n characters long and s and t begin with the same n
Que 1.22. Let (A, ) be a partially ordered set. Let  be a binary characters, and either t = u or t and u are at least n characters long and
relation A such that for a and b in A, a is related to b iff b  a. t and u begin with the same n characters. From this, we can deduce that
i. Show that  is partially ordered relation. either s = u or both s and u are n characters long and s and u begin with
ii. Show that (A, ) is lattice or not. the same n characters, i.e., sRn u. Consequently, Rn is transitive.

Que 1.24. Let X = {1, 2, 3,....., 7} and R = {(x, y)|(x – y) is divisible by 3}.
Answer
i. (A, ) is a partially ordered relation if it is reflexive, antisymmetric and Is R equivalence relation. Draw the digraph of R.
transitive. AKTU 2017-18, Marks 07
Reflexive : Let a  A then by definition of relation, aRa  a  a which
is true. Answer
Hence, the relation R i.e.,  is reflexive.
Antisymmetric : Let a, b  A and Given that X = {1, 2, 3, 4, 5, 6, 7}
aRb  b  a and R = {(x, y) : (x – y) is divisible by 3 }
Then R is an equivalence relation if
 a  b
1–16 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–17 C (CS/IT-Sem-3)

i. Reflexive :  x  X  ( x  x) is divisible by 3 Range of function : The range of f is set of all images of elements of X.
i.e., Range (f) = {y : y  Y and y = f (x)  x X }
So, ( x, x)  X  x  X or, R is reflexive.
Also Range (f)  Y
ii. Symmetric : Let x, y  X and (x, y)  R Classification of functions :
 (x – y) is divisible by 3  (x – y) = 3n1, (n1 being an integer) 1. Algebraic functions : Algebraic functions are those functions which
 (y – x) = – 3n2 = 3n2, n2 is also an integer consist of a finite number of terms involving powers and roots of the
So, y – x is divisible by 3 or R is symmetric. independent variable x.
iii. Transitive : Let x, y, z  X and (x, y)  R, (y, z)  R Three particular cases of algebraic functions are :
Then x – y = 3n1, y – z = 3n2, n1, n2 being integers i. Polynomial functions : A function of the form a0xn + a1xn–1+...
 x – z = 3(n1 + n2), n1 + n2 = n3 be any integer + an where n is a positive integer and a0, a1, ...., an are real constants
So, (x – z) is also divisible by 3 or (x, z)  R and a0  0 is called a polynomial of x in degree n, for example
So, R is transitive. f (x) = 2x3 + 5x2 + 7x – 3 is a polynomial of degree 3.
Hence, R is an equivalence relation.
f (x )
ii. Rational functions : A function of the form where f (x) and
g( x )
1 3 g(x) are polynomials.
2
iii. Irrational functions : Functions involving radicals are called
3
irrational functions. f(x) = x + 5 is an example of irrational
4 7 6 function.
5 2. Transcendental functions : A function which is not algebraic is called
transcendental function.
Fig. 1.24.1. Diagraph of R. i. Trigonometric functions : Six functions sin x, cos x, tan x, sec x,
cosec x, cot x where the angle x is measured in radian are called
trigonometric functions.
PART-4 ii. Inverse trigonometric functions : Six functions sin–1 x, cos–1 x,
tan–1 x, cot–1 x, sec–1 x, cosec–1 x, are called inverse trigonometric
Function : Definition, Classification of Functions, Operations on functions.
Functions, Recursively Defined Functions, Growth of Functions. iii. Exponential functions : A function f (x) = ax (a > 0) satisfying the
law a = a and axay = ax+y is called the exponential function.
iv. Logarithm functions : The inverse of the exponential function is
Questions-Answers called logarithm function.

Long Answer Type and Medium Answer Type Questions Que 1.26. Give the types / operations on functions.

Answer
Que 1.25. Define the term function. Also, give classification of it. 1. One-to-one function (Injective function or injection) : Let
f : X  Y then f is called one-to-one function if for distinct elements of X
Answer there are distinct image in Y i.e., f is one-to-one iff
1. Let X and Y be any two non-empty sets. A function from X to Y is a rule f(x1) = f(x2) implies x1 = x2  x1, x2,  X
that assigns to each element x  X a unique element y  Y. A B
f
2. If f is a function from X to Y we write f : X  Y.
3. Functions are denoted by f, g, h, i etc.
4. It is also called mapping or transformation or correspondence.
Domain and co-domain of a function : Let f be a function from X to Y.
Then set X is called domain of function f and Y is called co-domain of function f. Fig. 1.26.1. One-to-one.
1–18 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–19 C (CS/IT-Sem-3)

2. Onto function (Surjection or surjective function) : Let f : X  Y


then f is called onto function iff for every element y  Y there is an Answer
element x  X with f(x) = y or f is onto if Range (f) = Y. a. f(x) = x2 + 1
X Y Let x1, x2  R such that
f(x1) = f(x2 )
f x 12 + 1 = x 22 + 1
x12 = x22
x1 = ± x2
Therefore, if x2 = 1 then x1 = ± 1
Fig. 1.26.2. Onto. So, f is not one-to-one.
Hence, f is not bijective.
3. One-to-one onto function (Bijective function or bijection) : A b. Let x1, x2  R such that f(x1) = f(x2)
function which is both one-to-one and onto is called one-to-one onto x13 = x23
function or bijective function. x1 = x2
X Y  f is one-to-one.
f Let y  R such that
1 a y = x3
2 b x = (y)1/3
3 c
For  y  R  a unique x  R such that y = f (x)
 f is onto.
Fig. 1.26.3. One-to-one onto.
Hence, f is bijective.
4. Many one function : A function which is not one-to-one is called many c. Let x1, x2  R such that f(x1) = f(x2)
one function i.e., two or more elements in domain have same image in
x12  1 x2  1
co-domain i.e.,  = 22
x1  2
2
x2  2
If f : X  Y then f(x1) = f(x2)  x1  x2.
If x1 = 1, x2 = – 1 then f(x1) = f(x2)
X Y but x1  x2
 f is not one-to-one.
1 f b Hence, f is not bijective.
2 c
Que 1.28. If f : A  B, g : B  C are invertible functions, then show
3 d
that g  f : A  C is invertible and (g o f)–1 = f–1  g–1.
Fig. 1.26.4. Many one. AKTU 2014-15, Marks 05
5. Identity function : Let f : X  X then f is called identity function if
f (a) = a  a  X i.e., every element of X is image of itself. It is denoted Answer
by I. If f: A  B and g : B  C be one-to-one onto functions, then g  f is also one-
6. Inverse function (Invertible function) : Let f be a bijective function onto and (g  f)–1 = f–1  g–1
from X to Y. The inverse function of f is the function that assigns an Proof. Since f is one-to-one, f (x1) = f (x2)  x1 = x2 for x1, x2  R
element y  Y, a unique element x  X such that f(x) = y and inverse of Again since g is one-to-one, g (y1) = g (y2)  y1 = y2 for y1, y2  R
f denoted by f –1. Therefore if f(x) = y implies f–1 (y) = x. Now g  f is one-to-one, since (g  f) (x1) = (g  f) (x2)  g [f(x1)] = g [f (x2)]
 f (x1) = f(x2 ) [g is one-to-one]
Que 1.27. Determine whether each of these functions is a bijective  x1 = x2 [f is one-to-one]
from R to R. Since g is onto, for z  C, there exists y  B such that g (y) = z. Also f being
a. f(x) = x2 + 1 b. f(x) = x3 onto there exists x  A such that f (x) = y. Hence z = g (y)
= g [f (x)] = (g  f) (x)
c. f(x) = (x2 + 1)/(x2 + 2) AKTU 2015-16, Marks 15
1–20 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–21 C (CS/IT-Sem-3)

This shows that every element z  C has pre-image under gof. So, g  f is This concept of recursion can be used to define sets, sequences and
onto. algorithms also.
Thus, g  f is one-to-one onto function and hence (g  f)–1 exists. We will define three functions which are called Basis function or Initial
By the definition of the composite functions, g  f : A  C. So, functions that are used in defining other functions by induction.
(g  f)–1 : C  A. 1. Zero function : (Z : z(x) = 0)
Also g–1 : C  B and f–1 : B  A. 2. Successor function : (S : s(x) = x + 1)
Then by the definition of composite functions, f–1 g–1 : C  A. 3. Projection function or generalized identity function :
Therefore, the domain of (g  f)–1 = the domain of f–1 g–1. Uin : Uin ( x1 , x2 ,.... xn )  xi )
Now (g  f)–1 (z) = x  (g  f) (x) = z
where superscripts n indicates a number of argument of the function
 g (f (x)) = z
and subscripts i indicates the value of the function is equal to ith
 g (y) = z where y = f (x)
argument.
y = g–1 (z)
c. Primitive recursion :
 f–1 (y) = f–1 (g–1 (z)) = (f–1  g–1) (z)
A function is called primitive recursion if and only if it can be constructed
 x = (f–1  g–1) (z) [f–1 (y) = x]
from the initial functions and other known primitive recursive functions
Thus, (g  f) (z) = (f  g ) (z).
–1 –1 –1
by a finite number of operations and recursion only.
So, (g  f)–1 = f–1  g–1.
For example : Consider the function
Que 1.29. Explain the following : f(x, y) = x + y
Now f(x, y + 1) = x + (y + 1)
a. Composition of functions = (x + y) + 1
b. Recursive function = f(x, y) + 1
c. Primitive recursion Also f(x, 0) = x + 0 = x
Now f(x, 0) = x = U11 (x) .....(1.29.1)
Answer
Also f(x, y + 1) = f(x, y) + 1
a. Composition of functions : = S{f(x, y)} where S is the successor function
If f : X  Y and g : Y  Z then the composition of f and g is a new function = {U33[x, y, f(x, y)]} ...(1.29.2)
from X to Z denoted by gof = g(f(x)) If we consider g(x) = U11(x) and h(x, y, z) = S·U33 (x, y, z)
X Y Z From eq. (1.29.1) and (1.29.2), we get f (x, 0) = g(x)
and f(x, y + 1) = h{x, y, f(x, y)}
x y = f(x) z = g  f(x) Thus, f is obtained from the initial functions U11, U33 and S by applying
f g compositions once and recursion once. Hence, f is primitive recursive.

Que 1.30. Write short note on growth of functions.


gf
Answer
fg
1. We need to approximate the number of steps required to execute any
Fig. 1.29.1. Many one onto.
algorithm because of the difficulty involved in expression or difficulty in
1. If f and g are considered to be relations then composition of f and g evaluating an expression. We compare one function with another
was denoted by fog whereas the composition of function f and g is function to know their rate of growths.
denoted by gof. 2. If f and g are two functions we can give the statements like ‘f has same
2. Composition of functions is not commutative i.e., fog  gof. growth rate as g’ or ‘f has higher growth rate than g’.
3. Composition of functions is associative i.e., fo(goh) = (fog)oh. 3. Growth rate of function can be defined through notation.
where h : X  Y, g : Y  Z, and f : Z  W. a. -Notation (Same order) : This notation bounds a function to
b. Recursive function (Recursively defined function) : within constant factors. We say f(n) = g(n) if there exist positive
Sometimes it becomes difficult to define a function explicitly then it may constants n0, c1 and c2 such that to the right of n0 the value of f(n)
be easy to define this function in terms of itself. This technique is referred always lies between c1g(n) and c2g(n) inclusive.
as recursion.
1–22 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–23 C (CS/IT-Sem-3)

c2 g(n)
Questions-Answers
f(n)
c1 g(n) Long Answer Type and Medium Answer Type Questions

n Que 1.31. Describe mathematical induction.


n 0 f(n) =  (g(n))
Fig. 1.30.1.
1.37.1.
Answer
b. O-Notation (Upper bound) : This notation gives an upper bound Mathematical induction is a technique of proving a proposition over the
for a function to within a constant factor. We write f(n) = O(g(n)) if positive integers. It is the most basic method of proof used for proving
there are positive constants n0 and c such that to the right of n0, the statements having a general pattern. A formal statement of principle of
value of f(n) always lies on or below cg(n). mathematical induction can be stated as follows :
Let S(n) be statement that involve positive integer n = 1, 2, ... then
cg(n)
Step 1 : Verify S(1) is true. (Inductive base)
Step 2 : Assume that S(k) is true for some arbitrary k.
f(n)
(Inductive hypothesis)
Step 3 : Verify S(k + 1) is true using basis of inductive hypothesis.
(Inductive step)

n Que 1.32. Prove that n3 + 2n is divisible by 3 using principle of


n0 f(n) = O(g(n))
mathematical induction, where n is natural number.
Fig. 1.30.2.
AKTU 2015-16, Marks 10
c. -Notation (Lower bound) : This notation gives a lower bound
for a function to within a constant factor. We write f(n) = g(n)) if Answer
there are positive constants n0 and c such that to the right of n0, the Let S(n) : n3 + 2n is divisible by 3.
value of f(n) always lies on or above cg(n). Step I : Inductive base : For n = 1
f(n) (1)3 + 2.1 = 3 which is divisible by 3
Thus, S(1) is true.
cg(n) Step II : Inductive hypothesis : Let S(k) is true i.e., k3 + 2k is divisible by
3 holds true.
or k3 + 2k = 3s for s  N
Step III : Inductive step : We have to show that S(k + 1) is true
i.e., (k + 1)3 + 2(k + 1) is divisible by 3
n Consider (k + 1)3 + 2(k + 1)
n0 f(n) =  (g(n))
= k3 + 1 + 3k2 + 3k + 2k + 2
Fig. 1.30.3. = (k3 + 2k) + 3(k2 + k + 1)
= 3s + 3l where l = k2 + k + 1  N
= 3(s + l)
PART-5 Therefore, S(k + 1) is true
Natural Numbers : Introduction, Mathematical Induction, Hence by principle of mathematical induction S(n) is true for all
Variants of Induction, Induction with Non-zero Base Cases. n  N.
1–24 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–25 C (CS/IT-Sem-3)

1 1 1 n a (r k  1)
Que 1.33. Prove by induction : + + ... + = . a + ar + ar2 + .... + ark–1 = ...(1.34.1)
1.2 2.3 n ( n + 1) ( n + 1) r 1
Now we will show that it is true for n = k + 1 using eq. (1.34.1)
AKTU 2016-17, Marks 10 i.e., a + ar + ar2 +.... + ark-1 + ark
Using eq. (1.34.1), we get
Answer a (r k  1)
+ ark
Let the given statement be denoted by S(n). r 1
1. Inductive base : For n = 1
ar k  a  ar k1  ar k a ( r k  1  1)
1 1 1 = =
=  r 1 r 1
1.2 11 2
which is R.H.S. for n = k + 1, hence it is true for n = k + 1.
Hence S (1) is true. By mathematical induction, it is true for all n.
2. Inductive hypothesis : Assume that S (k) is true i.e.,
1 1 1 k Que 1.35. Prove that if n is a positive integer, then 133 divides
  .....  =
1.2 2.3 k(k  1) k  1
11n + 1 + 122n – 1. AKTU 2018-19, Marks 07
3. Inductive step : We wish to show that the statement is true for
n = k + 1 i.e.,
Answer
1 1 1 k1
  .....  = We prove this by induction on n.
1.2 2.3 (k  1)(k  2) k2 Base case : For n = 1, 11n+1 + 122n–1 = 112 + 121 = 133 which is divisible by
1 1 1 1 133.
Now,   .....  
1.2 2.3 k(k  1) ( k  1)(k  2) Inductive step : Assume that the hypothesis holds for n = k, i.e.,
11k+1 + 122k–1 = 133A for some integer A. Then for n = k + 1,
k 1 k2  2k  1 11n+1 + 122n–1 = 11k+1+1 + 122(k+1)–1
=  
k  1 ( k  1)(k  2) ( k  1)(k  2) = 11k+2 + 122k+1
k1 = 11 * 11k+1 + 144 * 122k–1
= = 11 * 11k+1 + 11 * 122k–1 + 133 * 122k–1
k2
= 11[11k+1 + 122k–1] + 133 * 122k–1
Thus, S(k + 1) is true whenever S(k) is true. By principle of mathematical
= 11* 133A + 133 * 122k–1
induction, S(n) is true for all positive integer n.
= 133[11A + 122k–1]
Que 1.34. Prove by the principle of mathematical induction, that Thus if the hypothesis holds for n = k it also holds for n = k + 1. Therefore, the
statement given in the equation is true.
the sum of finite number of terms of a geometric progression,
a + ar + ar2 + ... arn–1 = a(rn – 1)/(r – 1) if r  1. Que 1.36. Prove by mathematical induction
AKTU 2014-15, Marks 05 n4 – 4n2 is divisible by 3 for all n > = 2.
AKTU 2017-18, Marks 07
Answer
Basis : True for n = 1 i.e., Answer
L.H.S = a Base case : If n = 0, then n4 – 4n2 = 0, which is divisible by 3.
a (r  1) Inductive hypothesis : For some n  0, n4 – 4n2 is divisible by 3.
R.H.S = =a
r1 Inductive step : Assume the inductive hypothesis is true for n. We need to
Therefore, L.H.S. = R.H.S. show that (n + 1)4 – 4(n + 1)2 is divisible by 3. By the inductive hypothesis, we
Induction : Let it be true for n = k i.e., know that n4 – 4n2 is divisible by 3.
Hence (n + 1)4 – 4(n + 1)2 is divisible by 3 if
(n + 1)4 – 4(n + 1)2 – (n4 –4n2) is divisible by 3.
1–26 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–27 C (CS/IT-Sem-3)

Now (n + 1)4 – 4(n + 1)2 – (n4 – 4n2)


= n4 + 4n3 + 6n2 + 4n + 1 – 4n2 – 8n – 4 – n4 + 4n2 Answer
= 4n3 + 6n2 – 4n – 3, Different methods of proof are :
which is divisible by 3 if 4n 3 – 4n is. Since 4n 3 – 4n = 4n(n + 1) 1. Direct proof : In this method, we will assume that hypothesis p is true
(n – 1), we see that 4n3 – 4n is always divisible by 3. from the implication p  q. We can proof that q is true by using rules of
Going backwards, we conclude that (n + 1)4 – 4(n + 1)2 is divisible by 3, and interference or some other theorem. This will show p  q is true. The
that the inductive hypothesis holds for n + 1. combination of p is true and q is false will never occur.
By the Principle of Mathematical Induction, n4 – 4n2 is divisible by 3, for all 2. Indirect methods : These are of five types as follows :
n  N.
a. Proof by contrapositive.
Que 1.37. Prove by mathematical induction b. Proof by contradiction (Reductio ad absurdum).
c. Proof by exhaustive cases.
3 + 33 + 333 + ............ 3333 = (10n + 1 – 9n – 10)/27 d. Proof by cases.
AKTU 2017-18, Marks 07 e. Proof by counter example.
Que 1.39. Explain proof by counter example.
Answer
3 + 33 + 333 + ............ + 3333 ... = (10n + 1 – 9n – 10)/27 Answer
Let given statement be denoted by S(n)
1. Inductive base : For n = 1 In this method, we will give an example for which given statement is false.
(102  9(1)  10) 100  19 81 This example is called counter example.
3= ,3=  =3 For example : Prove by counter that every positive integer can be written
27 27 27
3 = 3. Hence S(1) is tree. as sum of square of three integers.
2. Inductive hypothesis : Assume that S(k) is true i.e., To look for a counter example we will first write successive positive integers
3 + 33 + 333 + ............ + 3333 = (10k + 1 – 9k – 10)/27 as the sum of square of three integers.
3. Inductive steps : We have to show that S(k + 1) is also true i.e., 1 = 12 + 02 + 02
3 + 33 + 333 + ............ (10k + 2 – 9(k + 1) – 10)/27 2 = 12 + 02 + 12
Now, 3 + 33 + ............ + 33 ............ 3 3 = 12 + 12 + 12
= 3 + 33 + 333 + ............ + 3 ............ 3 4 = 22 + 02 + 02
= (10k + 1 – 9k – 10)/27 + 3(10k + 1 – 1)/9 5 = 02 + 12 + 22
= (10k + 1 + 9k – 10 + 9.10k + 1 – 9)/27 6 = 12 + 12 + 22
= (10k + 1 + 9.10k + 1 – 9k – 8 – 10)/27 = (10k + 2 – 9(k + 1) – 10)/27 But there is no way to write 7 as a sum of three squares which gives
Thus S(k + 1) is true whenever S(k) is true. By the principle of counter example. Therefore, given statement is false.
mathematical induction S(n) true for all positive integer n.
Que 1.40. Explain proof by contradiction with example.
PART-6
Answer
Proof Methods, Proof by Counter – Example, Proof by Contradiction.
In this method, we assume that q is false i.e., ~ q is true. Then by using rules
of inference and other theorems we will show the given statement is true
Questions-Answers as well as false i.e., we will reach at a contradiction. Therefore, q must be
true.
Long Answer Type and Medium Answer Type Questions For example : Prove that 3 is irrational.
Let 3 is a rational number. Then  positive prime integer p and q such that
p
Que 1.38. What are the different proof methods ? 3 =
q
p2
 3=  p2 = 3q2 ...(1.40.1)
q2
1–28 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 1–29 C (CS/IT-Sem-3)

 3/p2 (3 divides p2) iii. Proof by Cases : In this method, we will cover up all the possible
 3/p ( p is an integer) cases that we come across while proving the theorem.
 p = 3x for some x  Z Example : Prove that if x and y are real numbers, then max (x, y)
 p2 = 9x2 ...(1.40.2) min (x, y) = x + y.
From eq. (1.40.1) and (1.40.2) we get, Case I : If x  y, then max (x, y) + min (x, y) = y + x = x + y.
9x2 = 3q2 Case II : if x  y, then max (x, y) + min (x, y) = x + y.
 q2 = 3x2
 3/q2 (3 divides q2)
 3/q VERY IMPORTANT QUESTIONS
 3 divides p and q which is contradiction to our assumption that p and
Following questions are very important. These questions
q are prime. Therefore, 3 is irrational.
may be asked in your SESSIONALS as well as
Que 1.41. Write a short note on the following with example : UNIVERSITY EXAMINATION.
i. Proof by contrapositive.
ii. Proof by exhaustive cases.
Q. 1. Prove for any two sets A and B that, (A  B) = A B.
iii. Proof by cases.
Ans. Refer Q. 1.8.
Answer
Q. 2. Show that R = {(a, b)|a  b (mod m)} is an equivalence
i. Proof by contrapositive : In this we can prove p  q is true by
relation on Z. Show that if x1  y1 and x2  y2 then (x1 + x2) 
showing ~ q  ~ p is true. It is also called proof by contraposition.
(y1 + y2).
Example : Using method of contraposition if n is integer and 3n + 2 is
Ans. Refer Q. 1.18.
even then n is even.
Let p : 3n + 2 is even
Q. 3. Let R be binary relation on the set of all strings of 0’s and
q : n is even
1’s such that R = {(a, b)|a and b are strings that have the
Let ~ q is true i.e., n is odd
same number of 0’s}. Is R is an equivalence relation and a
 n = 2k + 1, where k  Z
partial ordering relation ?
Now, 3n + 2 = 3(2k + 1) + 2
Ans. Refer Q. 1.19.
= 2(3k + 2) + 1
= 2m + 1 where m = 3k + 2  Z
Q. 4. Let A {1, 2, 3,..........., 13}. Consider the equivalence relation
 (3n + 2) is odd  ~ p is true
on A × A defined by (a, b) R (c, d) if a + d = b + c. Find
Hence ~ q  ~ p is true.
equivalence classes of (5, 8).
 By method of contraposition p  q is true.
Ans. Refer Q. 1.20.
ii. Proof by exhaustive cases : Some proofs proceed by exhausting all
the possibilities. We will examine a relatively small number of examples
Q. 5. The following relation on A = {1, 2, 3, 4}. Determine whether
to prove the theorem. Such proofs are called exhaustive proofs.
the following :
Example : Prove that n2 + 1  2n where n is a positive integer and
a. R = {(1, 3), (3, 1), (1, 1), (1, 2), (3, 3), (4, 4)}
1  n  4.
b. R = A × A
We will verify the given inequality n2 + 1  2n for n = 1, 2, 3, 4.
Is an equivalence relation or not ?
For n = 1; 1 + 1 = 2 which is true
Ans. Refer Q. 1.21.
For n = 2; 4 + 1 > 22 which is true
For n = 3; 9 + 1 > 23 which is true
Q. 6. Let n be a positive integer and S a set of strings. Suppose
For n = 4; 16 + 1 > 24 which is true
that Rn is the relation on S such that sRnt if and only if
In each of these four cases n2 + 1  2n holds true. Therefore, by method
s = t, or both s and t have at least n characters and first n
of exhaustive cases n2 + 1  2n, where n is the positive integer and
characters of s and t are the same. That is, a string of fewer
1  n  4 is true.
than n characters is related only to itself; a string s with at
1–30 C (CS/IT-Sem-3) Set Theory, Functions & Natural Numbers Discrete Structures & Theory of Logic 2–1 C (CS/IT-Sem-3)

least n characters is related to a string t if and only if t has

2
at least n characters and t beings with the n characters at
the start of s.
Ans. Refer Q. 1.23.

Q. 7. Let X = {1, 2, 3,....., 7} and R = {(x, y)|(x – y) is divisible by 3}. Is


R equivalence relation. Draw the digraph of R.
Ans. Refer Q. 1.24. Algebraic Structures
Q. 8. Determine whether each of these functions is a bijective
from R to R.
a. f(x) = x2 + 1
b. f(x) = x3
c. f(x) = (x2 + 1)/(x2 + 2)
Ans. Refer Q. 1.27. CONTENTS
Q. 9. If f : A  B, g : B  C are invertible functions, then show Part-1 : Algebraic Structures : .............................. 2–2C to 2–10C
that g  f : A  C is invertible and (g o f)–1 = f–1  g–1. Definition, Groups,
Ans. Refer Q. 1.28. Subgroups and Order

Q. 10. Prove that n3 + 2n is divisible by 3 using principle of Part-2 : Cyclic Group, Cosets, ............................. 2–10C to 2–16C
mathematical induction, where n is natural number. Lagrange’s Theorem
Ans. Refer Q. 1.32.
Part-3 : Normal Subgroups, ................................ 2–17C to 2–18C
Permutation and
1 1 1 n Symmetric of Groups
Q. 11. Prove by induction : + + ... + = .
1.2 2.3 n ( n + 1) (n + 1)
Part-4 : Group Homomorphisms, ....................... 2–19C to 2–22C
Ans. Refer Q. 1.33. Definition and Elementary
Properties of Rings and Fields.
Q. 12. Prove by the principle of mathematical induction, that
the sum of finite number of terms of a geometric
progression,
a + ar + ar2 + ... arn–1 = a(rn – 1)/(r – 1) if r  1.
Ans. Refer Q. 1.34.

Q. 13. Prove that if n is a positive integer, then 133 divides


11n + 1 + 122n – 1.
Ans. Refer Q. 1.35.

Q. 14. Prove by mathematical induction, n4 – 4n2 is divisible by 3


for all n > = 2.
Ans. Refer Q. 1.36.

Q. 15. Prove by mathematical induction


3 + 33 + 333 + ............ 3333 = (10n + 1 – 9n – 10)/27
Ans. Refer Q. 1.37.

2–2 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 2–3 C (CS/IT-Sem-3)

1. a * b  G  a, b  G [closure property]
PART-1 2. a * (b * c) = (a * b) * c  a, b, c  G [associative property]
3. There exist an element e  G such that for any a  G
Algebraic Structures : Definition, Groups, Subgroups and Order.
a * e = e * a = e [existence of identity]
4. For every a  G,  element a–1  G
such that a * a–1 = a–1 * a = e
Questions-Answers For example : (Z, +), (R, +), and (Q, +) are all groups.
ii. Abelian group : A group (G, *) is called abelian group or commutative
Long Answer Type and Medium Answer Type Questions group if binary operation * is commutative i.e., a * b = b * a  a, b  G
For example : (Z, +) is an abelian group.
iii. Finite group : A group {G, *} is called a finite group if number of
Que 2.1. What is algebraic structure ? List properties of algebraic
elements in G are finite. For example G = {0, 1, 2, 3, 4, 5} under  6 is a
system. finite group.
Answer Infinite group : A group {G, *} is called infinite group if number of
element in G are infinite.
Algebraic structure : An algebraic structure is a non-empty set G equipped For example, (Z, +) is infinite group.
with one or more binary operations. Suppose * is a binary operation on G. iv. Order of group : Order of group G is the number of elements in group
Then (G, *) is an algebraic structure. G. It is denoted by o (G) or |G|. A group of order 1 has only the identity
Properties of algebraic system : Let {S, *, +} be an algebraic structure element.
where * and + binary operation on S : v. Groupoid : Let (S, *) be an algebraic structure in which S is a non-
1. Closure property : (a * b)  S  a, b,  S empty set and * is a binary operation on S. Thus, S is closed with the
2. Associative property : (a * b) * c = a * (b * c)  a, b, c  S operation *. Such a structure consisting of a non-empty set S and a
3. Commutative property : (a * b) = (b * a)  a, b  S binary operation defined in S is called a groupoid.
4. Identity element :  e  S such that a * e = a (right identity)  a  S, Que 2.3. Describe subgroup with example.
e is called identity element of S with respect to operation *.
5. Inverse element : For every a  S,  a–1 S such that
Answer
a * a–1 = e = a– 1 * a
–1
here a is called inverse of ‘a’ under operation *. If (G, *) is a group and H  G. The (H, *) is said to subgroup of G if
6. Cancellation property : (H, *) is also a group by itself. i.e.,
a * b = a * c  b = c and b * a = c * a  b = c  a, b, c  S and a  0 (1) a * b  H  a, b  H (Closure property)
(2)  e  H such that a * e = a = e * a  a  H
7. Distributive property :  a, b, c  S
Where e is called identity of G.
a * (b + c) = (a * b) + (a * c) (right distributive)
(3) a – 1  H such that a * a – 1 = e = a– 1 * a  a  H
(b + c) * a = (b * a) + (c * a) (left distributive)
For example : The set Q+ of all non-zero +ve rational number is subgroup
8. Idempotent property : An element a  S is called idempotent element
of Q – {0}.
with respect to operation * if a * a = a.
Que 2.4. Show that the set G = {x + y 2 |x, y  Q} is a group with
Que 2.2. Write short notes on :
respect to addition.
i. Group ii. Abelian group
iii. Finite and infinite group iv. Order of group Answer
v. Groupoid
i. Closure :
Answer Let X = x1 + 2 y1
i. Group : Let (G, *) be an algebraic structure where * is binary operation Y = x2 + 2 y2
then (G, *) is called a group if following properties are satisfied : where x1, x2, y1, y2 Q and X, Y  G
2–4 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 2–5 C (CS/IT-Sem-3)

Then X + Y = (x1 + 3. Then ah1, ah2, ...., ahm, are the members of aH, all distinct.
2 y1) + (x2 + 2 y2)
For, we have
= (x1 + x2) + (y1 + y2) 2 ahi = ahj  hi = hj
= X1 + 2Y1  G where X1, Y1  Q by cancellation law in G.
Therefore, G is closed under addition [ Sum of two rational numbers is 4. Since G is a finite group, the number of distinct left cosets will also be
rational]. finite, say k. Hence the total number of elements of all cosets is km
ii. Associativity : which is equal to the total number of elements of G.
Let X, Y and Z  G Hence
n = mk
 X = x1 + 2 y1 Y = x2 + 2 y2 Z = x3 + 2 y3 This show that m, the order of H, is a divisor of n, the order of the
where x1, x2, x3, y1, y2, y3  Q group G.
Consider (X + Y) + Z = (x1 + 2 y1 + x2 + 2 y2) + (x3 + 2 y 3) We also find that the index k is also a divisor of the order of the group.
= ((x1 + x2) + (y1 + y2) 2 ) + (x3 + 2 y 1) Que 2.6. Define identity and zero elements of a set under a binary
= (x1 + x2 + x3) + (y1 + y2 + y3) 2 ...(2.4.1) operation *. What do you mean by an inverse element ?
Also X + (Y + Z) = (x1 + 2 y1) + ((x2 + 2 y2) + (x3 + 2 y3)) Answer
= (x1 + 2 y1) + ((x2 + x3) + (y2 + y3) 2 ) Identity element : An element e in a set S is called an identity element with
= (x1 + x2 + x3) + (y1 + y2 + y3) 2 ...(2.4.2) respect to the binary operation * if, for any element a in S
From eq. (2.4.1) and (2.4.2) a*e= e*a=a
(X + Y) + Z = X + (Y + Z) If a * e = a, then e is called the right identity element for the operation * and
Therefore, G is associative under addition. if e * a = a, then e is called the left identity element for the operation *.
iii. Identity element : Zero element : Let R be an abelian group with respect to addition. The
Let e  G be identity elements of G under addition then element 0 R will be the additive identity. It is called the zero element of R.
Inverse element : Consider a set S having the identity element e with
(x + y 2 ) + (e1 + e2 2 ) = x + y 2
respects to the binary operation *. If corresponding to each element
where e = e1 + e2 2 and e1, e2, x, y  Q a  S there exists an element b  S such that
a*b= b*a=e
e1 + e2 2 = 0 + 0 2 Then b is said to be the inverse of a and is usually denoted by a – 1. We say a
e1 = 0 and e2 = 0 is invertible.
Therefore, 0  G is identity element.
iv. Inverse element : Que 2.7. Prove that (Z6, (+6)) is an abelian group of order 6, where
– x – y 2  G is inverse of x + y 2  G. Z6 = {0, 1, 2, 3, 4, 5}. AKTU 2014-15, Marks 05
Therefore, inverse exist for every element x + y 2  G such that, y  Q.
Hence, G is a group under addition. Answer

Que 2.5. The composition table is :


Let H be a subgroup of a finite group G. Prove that order
+6 0 1 2 3 4 5
of H is a divisor of order of G. AKTU 2018-19, Marks 07 0 0 1 2 3 4 5
1 1 2 3 4 5 0
Answer 2 2 3 4 5 0 1
1. Let H be any sub-group of order m of a finite group G of order n. Let us 3 3 4 5 0 1 2
consider the left coset decomposition of G relative to H. 4 4 5 0 1 2 3
2. We will show that each coset aH consists of m different elements. 5 5 0 1 2 3 4
Let H = {h1, h2, ....., hm} Since 2 +6 1 = 3
2–6 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 2–7 C (CS/IT-Sem-3)

4 +6 5 = 3 5. Commutativity : The corresponding rows and columns of the table


From the table we get the following observations : are identical. Therefore the binary operation is commutative. Hence,
Closure : Since all the entries in the table belong to the given set Z6. Therefore, (G, *) is an abelian group.
Z6 is closed with respect to addition modulo 6.
Associativity : The composition ‘+6’ is associative. If a, b, c are any three Que 2.9. Write the properties of group. Show that the set (1, 2, 3,
elements of Z6, 4, 5) is not group under addition and multiplication modulo 6.
a +6 (b +6 c) = a +6 (b + c) [ b +6 c = b + c (mod 6)]
= least non-negative remainder when a + (b + c) is divided by 6. AKTU 2017-18, Marks 07
= least non-negative remainder when (a + b) + c is divided by 6.
= (a + b) +6 c = (a +6 b) +6 c. Answer
Identity : We have 0  Z6. If a is any element of Z6, then from the composition
Properties of group : Refer Q. 2.2(i), Page 2–2C, Unit-2.
table we see that
Numerical :
0 +6 a = a = a +6 0
Addition modulo 6 (+6) : Composition table of S = {1, 2, 3, 4, 5} under
Therefore, 0 is the identity element.
operation +6 is given as :
Inverse : From the table we see that the inverse of 0, 1, 2, 3, 4, 5 are 0, 5, 4,
3, 2, 1 respectively. For example 4 +6 2 = 0 = 2 +6 4 implies 4 is the inverse +6 1 2 3 4 5
of 2.
Commutative : The composition is commutative as the elements are 1 2 3 4 5 0
symmetrically arranged about the main diagonal. The number of elements 2 3 4 5 0 1
in the set Z6 is 6. 3 4 5 0 1 2
 (Z6, +6) is a finite abelian group of order 6. 4 5 0 1 2 3
Que 2.8. Let G = {1, – 1, i, – i} with the binary operation 5 0 1 2 3 4
Since, 1 +6 5 = 0 but 0  S i.e., S is not closed under addition modulo 6.
multiplication be an algebraic structure, where i =  1 . Determine So, S is not a group.
Multiplication modulo 6 (*6) :
whether G is an abelian or not. AKTU 2018-19, Marks 07
Composition table of S = {1, 2, 3, 4, 5} under operation *6 is given as

Answer *6 1 2 3 4 5
The composition table of G is
1 1 2 3 4 5
1 –1 i –i 2 2 4 0 2 4
*
3 3 0 3 0 3
1 1 –1 i –i
4 4 2 0 4 2
–1 –1 1 –i i
5 5 4 3 2 1
i i –i –1 1 Since, 2 *6 3 = 0 but 0  S i.e., S is not closed under multiplication modulo 6.
–i –i i –1 1 So, S is not a group.

Que 2.10. Let G = {a, a2, a3, a4, a5, a6 = e}. Find the order of every
1. Closure property : Since all the entries of the composition table are
the elements of the given set, the set G is closed under multiplication. element.
2. Associativity : The elements of G are complex numbers, and we know
Answer
that multiplication of complex numbers is associative.
3. Identity : Here, 1 is the identity element. o(a) : a6 = e  o(a) = 6
4. Inverse : From the composition table, we see that the inverse elements o(a2) : (a2)3 = a6 = e  o (a2) = 3
of 1, – 1, i, – i are 1, – 1, – i, i respectively. o(a3) : (a3)2 = a6 = e  o(a3) = 2
2–8 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 2–9 C (CS/IT-Sem-3)

o(a4) : (a4)3 = a12 = (a6)2 = e2 = e  o(a4) = 3


o(a5) : (a5)6 = a30 = (a6)5 = e5 = e  o(a5) = 6 Que 2.13. Let G be the set of all non-zero real number and let
o(a6) : (a6)1 = a6 = e  o(a6) = 1 a * b = ab/2. Show that (G *) be an abelian group.
Que 2.11. Let G be a group and let a, b  G be any elements. AKTU 2015-16, Marks 10
Then
i. (a–1)–1 = a Answer
i. Closure property : Let a, b  G.
ii. (a * b)–1 = b–1 * a–1. AKTU 2014-15, Marks 05
ab
a*b=  G as ab  0
Answer 2
 * is closure in G.
i. Let e be the identity element for * in G. ii. Associativity : Let a, b, c  G
Then we have a * a – 1 = e, where a – 1  G.
Also (a – 1) – 1 * a – 1 = e  bc  a(bc) abc
Consider a * (b * c) = a *    
Therefore, (a – 1) – 1 * a – 1 = a * a – 1. 2 4 4
Thus, by right cancellation law, we have (a – 1) – 1 = a.  ab (ab) c abc
ii. Let a and b  G and G is a group for *, then a * b G (closure)
(a * b) * c =   * c =
 2 
4 4
Therefore, (a * b) – 1 * (a * b) = e. ....(2.11.1)  * is associative in G.
Let a – 1 and b – 1 be the inverses of a and b respectively, then a – 1, iii. Existence of the identity : Let a  G and  e such that
b – 1  G.
ae
Therefore, (b – 1 * a – 1) * (a * b) = b – 1 * (a – 1 * a) * b (associativity) a*e= =a
= b–1 * e * b = b–1 * b = e ...(2.11.2) 2
 ae = 2a
From (2.11.1) and (2.11.2) we have,
 e=2
(a * b) – 1 * (a * b) = (b – 1 * a – 1)* (a * b)
 2 is the identity element in G.
(a * b) – 1 = b – 1 * a –1 (by right cancellation law)
iv. Existence of the inverse : Let a  G and b  G such that a * b = e = 2
Que 2.12. Prove that the intersection of two subgroups of a group ab
 =2
2
is also subgroup. AKTU 2014-15, Marks 05  ab = 4
4
Answer  b=
a
Let H1 and H2 be any two subgroups of G. Since at least the identity element 4
e is common to both H1 and H2.  The inverse of a is ,  a  G.
a
 H1  H2   v. Commutative : Let a, b  G
In order to prove that H1  H2 is a subgroup, it is sufficient to prove that
ab
a  H1  H2, b H1  H2 ab–1 H1  H2 a*b=
Now a H1  H2  a H1 and a H2 2
b H1  H2 b H1 and b  H2 ba ab
and b*a= 
But H1, H2 are subgroups. Therefore, 2 2
a  H1, b  H1 ab–1  H1  * is commutative.
a H2 , bH2 ab–1  H2 Thus, (G, *) is an abelian group.
Finally, ab–1  H1, ab–1  H2  ab–1  H1  H2
Thus, we have shown that Que 2.14. Prove that inverse of each element in a group is unique.
a  H1 H2, b  H1  H2  ab–1  H1  H2.
Hence, H1  H2 is a subgroup of G. AKTU 2015-16, Marks 10
2–10 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 2–11 C (CS/IT-Sem-3)

3. The group <a> generated by ‘a’ is a subgroup of G.


Answer 4. By Lagrange’s theorem, the order of ‘a’ divides |G|.
Let (if possible) b and c be two inverses of element a  G. 5. But the only divisors of |G|= p are 1 and p. Since a  e we have |<a>|> 1,
Then by definition of group : so |<a>| = p.
b*a= a*b=e 6. Hence, <a> = G and G is cyclic.
and a*c= c*a=e
Que 2.17. Show that every group of order 3 is cyclic.
where e is the identity element of G
Now b = e * b = (c * a) * b
AKTU 2014-15, Marks 05
= c * (a * b)
= c*c
=c Answer
b=c 1. Suppose G is a finite group whose order is a prime number p, then to
Therefore, inverse of an element is unique in (G, *). prove that G is a cyclic group.
2. An integer p is said to be a prime number if p  0, p  1, and if the only
divisors of p are ± 1, ± p.
PART-2 3. Some G is a group of prime order, therefore G must contain at least 2
Cyclic Group, Cosets, Lagrange’s Theorem. element. Note that 2 is the least positive prime integer.
4. Therefore, there must exist an element a  G such that a  the identity
element e.
5. Since a is not the identity element, therefore o(a) is definitely  2. Let
Questions-Answers o(a) = m. If H is the cyclic subgroup of G generated by a then
o (H = o (a) = m).
Long Answer Type and Medium Answer Type Questions 6. By Lagrange’s theorem m must be a divisor of p. But p is prime and
m  2. Hence, m = p.
7.  H = G. Since H is cyclic therefore G is cyclic and a is a generator of G.
Que 2.15. Define cyclic group with suitable example.
Que 2.18. Show that group (G, +5) is a cyclic group where G = {0, 1,
Answer 2, 3, 4}. What are its generators ?
Cyclic group : A group G is called a cyclic group if  at least one element a
in G such that every element x  G is of the form an, where n is some integer. Answer
The element a  G is called the generator of G. Composition table of G under operation +5 is shown in Table 2.18.1.
For example : Table 2.18.1.
Show that the multiplicative group G = {1, – 1, i, – i} is cyclic. Also find its
+5 0 1 2 3 4
generators.
We have, i1 = i, i2 = – 1, i3 = – i, i4 = 1. 0 0 1 2 3 4
and (– i)1 = – i, (– i)2 = – 1, (– i)3 = i, (– i)4 = 1
1 1 2 3 4 0
Thus, every element in G be expressed as in or (– i)n
 G is cyclic group and its generators are i and – i. 2 2 3 4 0 1
3 3 4 0 1 2
Que 2.16. Prove that every group of prime order is cyclic.
4 4 0 1 2 3
AKTU 2018-19, Marks 07 0 is the identity element of G under +5.
11 = 1  1 mod 5
Answer 12 = 1 + 1  2 mod 5
1. Let G be a group whose order is a prime p. 13 = 1 + 1 + 1  3 mod 5
2. Since P > 1, there is an element a G such that a  e. 14 = 1 + 1 + 1 + 1  4 mod 5
15 = 1 = 1 + 1 + 1 + 1  0 mod 5
2–12 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 2–13 C (CS/IT-Sem-3)

where 1n means 1 is added n times


Proof : Let aH = bH or aH  bH = 
Therefore, 1 is generator of G.
and to prove that aH = bH.
Similarly, 2, 3, 4 are also generators of G.
Therefore, G is a cyclic group with generator 1, 2, 3, 4. Let aH  bH
Then there exists h1, h2  H such that
Que 2.19. Show that G = [(1, 2, 4, 5, 7, 8), X9] is cyclic. How many x = ah1 and x = bh2
a = xh1–1 = bh2 h1–1
generators are there ? What are they ? AKTU 2015-16, Marks 7.5 Since H is a subgroup, we have h2 h1–1  H
let h2 h1–1 = h H
Answer Now, aH = bh2h1–1 H = (bh) H = b (hH) = bh (  hH = H by property 2)
Composition table for X9 is  aH = bH if a H  bH  
X9 1 2 4 5 7 8 Thus, either a H  bH =  or aH = bH.
1 2 3 4 5 7 8 4. aH = bH iff a–1 b  H.
2 2 4 8 1 5 7 Proof : Let aH = bH.
4 4 8 7 2 1 5 a–1 aH = a–1 bH
5 5 1 2 7 8 4 eH = a–1 bH (e is identity in G)
7 7 5 1 8 4 2 H = (a–1 b) H
8 8 7 5 4 2 1 Therefore by property (2); a–1 b  H.
Conversely, now if a–1 b  H.
1 is identity element of group G Then consider bH = e (bH) = (a a–1) (bH)
21 = 2  2 mod 9 = a (1–1 b) H
22 = 4  4 mod 9 = aH
23 = 8  8 mod 9 Thus aH = bH iff a–1 b  H.
24 = 16  7 mod 9 5. aH is a subgroup of G iff a  H.
25 = 32  5 mod 9 Proof : Let aH is a subgroup of G then it contains the identity e of G.
26 = 64  1 mod 9
Therefore, 2 is generator of G. Hence G is cyclic. Thus, aH  eH  
Similarly, 5 is also generator of G. then by property (3) ; aH = eH = H
Hence there are two generators 2 and 5. aH =   a  H
Conversely, if a  H then by property (2); aH = H.
Que 2.20. Define cosets. Write and prove properties of cosets.
Que 2.21. State and prove Lagrange’s theorem for group. Is the
Answer
converse true ? AKTU 2016-17, Marks 10
Let H be a subgro up o f gro up G and le t a  G the n the se t
Ha = {ha : h  H} is called right coset generated by H and a. Answer
Also the set aH = {ah : h  H} is called left coset generated by a and H.
Properties of cosets : Let H be a subgroup of G and let a and b belong to Lagrange’s theorem :
G. Then Statement : The order of each subgroup of a finite group is a divisor of the
1. a  a H order of the group.
Proof : a = a e  a H Proof : Let G be a group of finite order n. Let H be a subgroup of G and let
Since e is identity element of G. O(H) = m. Suppose h1, h2.... ..., hm are the m members of H.
2. aH = H iff a  H. Let a  G, then Ha is the right coset of H in G and we have
Proof : Let aH = H. Ha = {h1 a, h2 a,....hm a}
Then a = ae  aH = H (e is identity in G and so is in H) Ha has m distinct members, since = hi a = hj a  hi = hj
aH Therefore, each right coset of H in G has m distinct members. Any two
distinct right cosets of H in G are disjoint i.e., they have no element in
3. aH = bH or aH  bH = 
2–14 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 2–15 C (CS/IT-Sem-3)

common. Since G is a finite group, the number of distinct right cosets of H in Thus order of each subgroup of a finite group G is a divisor of the order of the
G will be finite, say, equal to k. The union of these k distinct right cosets of H group.
in G is equal to G. Cor 1 : If H has m different cosets in G then by Lagrange’s theorem :
Thus, if Ha1, Ha2,...., Hak are the k distinct right cosets of H in G. Then o(G) = m o(H)
G = Ha1  Ha2  Ha3  ....  Hak o(G )
 the numbe r of elements in G = the numbe r of e lements in  m=
o( H )
Ha1 + ...... + the number of elements in Ha2 +......+ the number of elements in
o(G )
Hak  [G : H] =
 O(G) = km o( H )
 n = km Cor 2 : If |G| = n and a  G then an = e
n Let |a| = m  am = e
 k= Now, the subset H of G consisting of all integral powers of a is a subgroup of
m
 m is a divisor of n. G and the order of H is m.
 O(H) is a divisor of O(G). Then by Lagrange’s theorem, m is divisor of n.
Proof of converse : If G be a finite group of order n and n  G, then Let n = mk, then
an = e an = amk = (am)k = ek = e
Let o (a) = m which implies am = e. Que 2.23.
Now, the subset H of G consisting of all the integral power of a is a subgroup
of G and the order of H is m. a. Prove that every cyclic group is an abelian group.
Then, by the Lagrange’s theorem, m is divisor of n. b. Obtain all distinct left cosets of {(0), (3)} in the group
Let n = mk, then (Z6, +6) and find their union.
an = amk = (am)k = ek = e c. Find the left cosets of {[0], [3]} in the group (Z6, +6).
 Yes, the converse is true. AKTU 2016-17, Marks 10
Que 2.22. State and explain Lagrange’s theorem.
Answer
Answer a. Let G be a cyclic group and let a be a generator of G so that
G = <a> = {an : n  Z}
Lagrange’s theorem :
If g1 and g2 are any two elements of G, there exist integers r and s such
If G is a finite group and H is a subgroup of G then o(H) divides o(G).
that g1 = ar and g2 = as. Then
Moreover, the number of distinct left (right) cosets of H in G is o(G)/o(H).
g1 g2 = ar as = ar+s = as+r = as . ar = g2g1
Proof : Let H be subgroup of order m of a finite group G of order n.
So, G is abelian.
Let H {h1, h2, ..., hm}
b.  [0] + H = [3] + H, [1] + [4] + H and [2] + H = [5] + H are the three
Let a  G. Then aH is a left coset of H in G and aH = {ah1, ah2, ..., ahm} has m
distinct left cosets of H in (Z6 , + 6 ).
distinct elements as ahi = ahj  hi = hj by cancellation law in G.
We would have the following left cosets :
Thus, every left coset of H in G has m distinct elements.
g1H = {g1 h, h  H}
Since G is a finite group, the number of distinct left cosets will also be finite.
g2H = {g2 h, h  H}
Let it be k. Then the union of these k-left cosets of H in G is equal to G.
gnH = {gn h, h  H}
i.e., if a1H, a2H, ..., akH are right cosets of H in G then
The union of all these sets will include all the g s, since for each set
G = a1H a2H  ... akH.
gk = {gk h, h  H}
 o(G) = o(a1H) + o(a2H) + ... + o(akH)
we have ge gk = {gk h, h  H}
(Since two distinct left cosets are mutually disjoint.)
where e is the identity.
 n = m + m + ... + m (k times)
Then if we make the union of all these sets we will have at least all the
n elements of g. The other elements are merely gh for some h. But since ghG
 n = mk  k =
m they would be repeated elements in the union. So, the union of all left cosets
o(G ) of H in G is G, i.e.,
 k= .
o( H ) Z6 = {[0], [1], [2], [3], [4], [5]}
2–16 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 2–17 C (CS/IT-Sem-3)

c. Let Z6 = {[0], [1], [2], [3], [4], [5]} be a group.


H = {[0], [3]} be a subgroup of (Z6, +6). PART-3
The left cosets of H are,
[0] + H = {[0], [3]} Normal Subgroups, Permutation and Symmetric of Groups.
[1] + H = {[1], [4]}
[2] + H = {[2], [5]}
[3] + H = {[3], [0]} Questions-Answers
[4] + H = {[4], [1]}
[5] + H = {[5], [2]} Long Answer Type and Medium Answer Type Questions

Que 2.24. Write and prove the Lagrange’s theorem. If a group


Que 2.26. Write short notes on :
G = {...., – 3, 2, – 1, 0, 1, 2, 3,.....} having the addition as binary operation.
If H is a subgroup of group G where x2  H such that x  G. What is a. Normal subgroup
b. Permutation group
H and its left coset w.r.t 1 ? AKTU 2014-15, Marks 05
Answer
Answer
a. Normal subgroup : A subgroup H of G is said to be normal subgroup
Lagrange’s theorem : Refer Q. 2.22, Page 2–14C, Unit-2. of G if Ha = aH  a G i.e., the right coset and left coset of H is G
Numerical : generated by a are the same.
H = {x2 : x  G} = {0, 1, 4, 9, 16, 25 ....} i. Clearly, every subgroup H of an abelian group G is a normal
Left coset of H will be 1 + H = {1, 2, 5, 10, 17, 26, ....} subgroup of G. For a  G and h  H, ah = ha.
Que 2.25. What do you mean by cosets of subgroup ? Consider the ii. Since a cyclic group is abelian, every subgroup of a cyclic group is
normal.
group Z of integers under addition and the s ubgroup b. Permutation group : A set G of all permutation on a non-empty
H = {..., –10, –5, 0, 5, 10, ....} considering the multiple of 5. set A under the binary operation * is called permutation group.
i. Find the cosets of H in Z. If A = {1, 2, 3, ...., n}, the given permutation group formed by A is also
ii. What is index of H in Z ? called symmetric group of degree n denoted by Sn. Number of elements
of Sn will be n!.
Answer
Cyclic permutation : Let A = {x1, x2, ..., xn}. Then let t1, t2,..., tk be
Coset : Refer Q. 2.20, Page 2–12C, Unit-2. elements of set A and permutation P : A  defined by
Numerical : P(t1) = t2
i. We have Z = {– 7, – 6, – 5, – 4, – 3, – 2, – 1, 0, 1, 2, 3, 4, 5, 6, ....} P(t2) = t3
and H = {...., – 10, – 5, 0, 5, 10, ....} ...........
Let 0 Z and the right cosets are given as ...........
H = H + 0 = {...., – 10, – 5, 0, 5, 10, ....} P(tk–1) = tk
H + 1 = {...., – 9, – 4, 1, 6, 11, ....} P(tk) = t1
H + 2 = {...., – 8, – 3, 2, 7, 12, ....} is called a cyclic permutation of length k.
H + 3 = {...., – 7, – 2, 3, 8, 13, ....} a b c d e
H + 4 = {....., – 6, – 1, 4, 9, 14, ....} For example : Consider A = {a, b, c, d, e}. Then let P =  .
H + 5 = {...., – 10, – 5, 0, 5, 10, ....] = H c b d a e
Now, its repetition starts. Now, we see that the right cosets, Then P has a cycle of length 3 given by (a, c, d).
H, H + 1, H + 2, H + 3, H + 4 are all distinct and more over they are Que 2.27. Define the subgroup of a group. Let (G, ) be a group.
disjoint. Similarly the left cosets will be same as right cosets.
ii. Index of H in G is the number of distinct right/left cosets. Let H = {a | a  G and a  b = b  a for all b  G}. Show that H is a
Therefore, index is 5. normal subgroup.
2–18 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 2–19 C (CS/IT-Sem-3)

Answer
PART-4
Subgroup : If (G, *) is a group and H  G. Then (H, *) is said to subgroup of
G if (H, *) is also a group by itself. Group Homomorphism, Definition and Elementary Properties of
i.e., Ring and Fields.
1. a * b  H  a, b  H (Closure property)
2.  e  H such that a * e = a = e * a  a  H
where e is called identity of G. Questions-Answers
3.  a–1 H such that a * a–1 = e = a–1 * a  a  H
Numerical : Let (G, x) be a group. A non-empty subset H of a group G is said Long Answer Type and Medium Answer Type Questions
to be a subgroup of G if (H, *) itself is a group.
Given that, H = {a|a G and a  b = b a;  b G}
Que 2.29. Discuss homomorphism and isomorphic group.
Let a, b  H  a  x = x  a and b  x = x  b,  x G
 (b  x) – 1 = (x b) – 1
 x – 1  b – 1 = b – 1  x1 Answer
 b H.
– 1
Homomorphism : Let (G1, •) and (G2, *) be two groups then a mapping
Now, (a  b – 1)  x = a  (b – 1  x) [  is associative] f : G1  G2 is called a homomorphism if f(a • b) = f(a) * f(b) for all a, b  G1.
= a  (x  b – 1) [ use b – 1 H] Thus f is homomorphism from G1 to G2 then f preserves the composition in
= (a  x)  b – 1 [ a H] G1 and G2 i.e., image of composition is equal to composition of images.
= (x  a)  b – 1
= x  (a  b – 1) The group G2 is said to be homomorphic image of group G1 if there exist a
 a  b–1 H homomorphism of G1 onto G2.
Therefore, H is a subgroup of group G. Isomorphism : Let (G1, •) and (G2, *) be two groups then a mapping
Let h  H and g  G and any x in G. f : G1  G2 is an isomorphism if
Consider i. f is homomorphism.
(g  h  g – 1)  x = (g  g – 1  h)  x [ h  H]
ii. f is one to one i.e., f(x) = f(y)  x = y  x, y  G1.
= (e  h)  x = h  x
= xh [ h  H] iii. f is onto.
= x  (h  g  g – 1)
Que 2.30. Give the definitions of rings, integral domains and fields.
= x  (g  h  g – 1) [ h  H]
 g  h  g – 1  H for any g  G
 H is a normal subgroup of G. Answer
Ring : A ring is an algebraic system (R, +, •) where R is a non-empty set and
Que 2.28. If N and M are normal subgroup of G then N  M is a + and • are two binary operations (which can be different from addition and
normal subgroup of G. multiplication) and if the following conditions are satisfied :
1. (R, +) is an abelian group.
Answer
2. (R, •) is semigroup i.e., (a • b) • c = a • (b • c)  a, b, c  R.
As N and M are subgroups of G then N  M is a subgroup of G. Let g  G 3. The operation • is distributive over +.
and a  N  M i.e., for any a, b, c  R
a  N and a  M. a • (b + c) = (a • b) + (a • c) or (b + c) • a = (b • a) + (c • a)
Since N is normal subgroup of G, gag–1  N Integral domain : A ring is called an integral domain if :
Since M is normal subgroup of G, gag–1  M i. It is commutative
 gag–1  N  M is a normal subgroup of G. ii. It has unit element
iii. It is without zero divisors
Hence N  M is a normal subgroup of G.
2–20 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 2–21 C (CS/IT-Sem-3)

Field : A ring R with at least two elements is called a field if it has following iv. Here 0 is the additive identity and 1 is the multiplicative identity. Identity
properties : property is satisfied.
i. R is commutative v. Inverse exists in both the tables. The additive inverse of 0, 1 are 1, 0
ii. R has unity respectively and the multiplicative inverse of non-zero element of Z2
iii. R is such that each non-zero element possesses multiplicative inverse. is 1.
For example, the rings of real numbers and complex numbers are also fields. vi. Multiplication is distributive over addition.
Hence (Z2, +2, *2) is a ring as well as field. Since, we know that every field is
Que 2.31. Consider a ring (R, +, ) defined by a • a = a, determine an integral domain therefore it is also an integral domain.
whether the ring is commutative or not.
Que 2.33. If the permutation of the elements of {1, 2, 3, 4, 5} are
AKTU 2014-15, Marks 05
given by a = (1 2 3) (4 5), b = (1) (2) (3) (4 5), c = (1 5 2 4) (3). Find the value
Answer of x, if ax = b. And also prove that the set Z4 = (0, 1, 2, 3) is a commutative
ring with respect to the binary modulo operation +4 and *4.
Let a, b R (a + b)2 = (a + b)
 (a + b) (a + b) = (a + b) AKTU 2015-16, Marks 10
(a + b)a + (a + b)b = (a + b)
Answer
(a2 + ba) + (ab + b2) = (a + b)
ax = b  (123) (45) x = (1) (2) (3) (4, 5)
(a + ba) + (ab + b) = (a + b) (  a2 = a and b2 = b)
(a + b) + (ba + ab) = (a + b) + 0  1 2 3 4 5  1 2 3 4 5  1 2 3 4 5
  2 3 1 4 5  1 2 3 5 4 x   1 2 3 5 4
 ba + ab = 0
a + b = 0 a + b = a + a [being every element of its own additive inverse]
 1 2 3 4 5  1 2 3 4 5
 b=a  2 3 1 5 4 x =  1 2 3 5 4
 ab = ba
1
 R is commutative ring.  1 2 3 4 5  1 2 3 4 5
x= 
 2 3 1 5 4  1 2 3 5 4
Que 2.32. Write out the operation table for [Z2, +2, * 2]. Is Z2 a
ring ? Is an integral domain ? Is a field ? Explain.  2 3 1 5 4  1 2 3 4 5
= 
 1 2 3 4 5  1 2 3 5 4
Answer
 1 2 3 4 5  1 2 3 4 5
The operation tables are as follows : = 
we have Z2 = {0, 1}  3 1 2 5 4  1 2 3 5 4
+2 0 1 *2 0 1
 1 2 3 4 5
x=
 3 1 2 4 5
0 0 1 0 0 0
1 1 0 1 0 1 4 0 1 2 3 4 0 1 2 3
Since (Z2, +2, *2) satisfies the following properties : 0 0 1 2 3 0 0 0 0 0
i. Closure axiom : All the entries in both the tables belong to Z2. Hence, 1 1 2 3 0 1 0 1 2 3
closure is satisfied. 2 2 3 0 1 2 0 2 0 2
ii. Commutative : In both the tables all the entries about the main diagonal 3 3 0 1 2 3 0 3 2 1
are same therefore commutativity is satisfied. We find from these tables :
iii. Associative law : The associative law for addition and multiplication i. All the entries in both the tables belong to Z4. Hence, Z4 is closed with
are also satisfied. respect to both operations.
2–22 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 2–23 C (CS/IT-Sem-3)

ii. Commutative law : The entries of 1st, 2nd, 3rd, 4th rows are identical
with the corresponding elements of the 1 st , 2nd, 3rd, 4th columns
respectively in both the tables. Hence, Z4 is commutative with respect to VERY IMPORTANT QUESTIONS
both operations. Following questions are very important. These questions
iii. Associative law : The associative law for addition and multiplication may be asked in your SESSIONALS as well as
a +4 (b +4 c) = (a +4 b) +4 c for all a, b, c Z4 UNIVERSITY EXAMINATION.
a ×4 (b ×4 c) = (a ×4 b) ×4 c, for all a, b, c Z4
can easily be verified.
iv. Existence of identity : 0 is the additive identity and 1 is multiplicative Q. 1. Let H be a subgroup of a finite group G. Prove that order of
identity for Z4. H is a divisor of order of G.
v. Existence of inverse : The additive inverses of 0, 1, 2, 3 are 0, 3, 2, 1 Ans. Refer Q. 2.5.
respectively.
Q. 2. Prove that (Z6, (+6)) is an abelian group of order 6, where
Multiplicative inverse of non-zero element 1, 2, 3 are 1, 2, 3 respectively.
Z6 = {0, 1, 2, 3, 4, 5}.
vi. Distributive law : Multiplication is distributive over addition i.e., Ans. Refer Q. 2.7.
a ×4(b +4c) = a ×4b + a ×4c
(b +4c) ×4a = b ×4a + c ×4a Q. 3. Let G = {1, – 1, i, – i} with the binary operation multiplication
For, a ×4(b +4c) = a ×4(b + c) for b +4 c = b + c (mod 4) be an algebraic structure, where i =  1 . Determine
= least positive remainder when a × (b + c) is whether G is an abelian or not.
divided by 4
Ans. Refer Q. 2.8.
= least positive remainder when ab + ac is divided
by 4 Q. 4. Write the properties of group. Show that the set (1, 2, 3, 4, 5)
= ab +4ac is not group under addition and multiplication modulo 6.
= a ×4b +4a ×4c Ans. Refer Q. 2.9.
For a ×4b = a × b (mod 4)
Since (Z4, +4) is an abelian group, (Z4, ×4) is a semigroup and the operation is Q. 5. Let G be a group and let a, b  G be any elements.
distributive over addition. The (Z4, +4, ×4) is a ring. Now (Z4, ×4) is commutative Then
with respect to ×4. Therefore, it is a commutative ring. i. (a–1)–1 = a
ii. (a * b)–1 = b–1 * a–1.
Que 2.34. What is meant by ring ? Give examples of both Ans. Refer Q. 2.11.
commutative and non-commutative rings.
Q. 6. Prove that the intersection of two subgroups of a group is
AKTU 2018-19, Marks 07 also subgroup.
Ans. Refer Q. 2.12.
Answer
Ring : Refer Q. 2.30, Page 2–19C, Unit-2. Q. 7. Let G be the set of all non-zero real number and let
a * b = ab/2. Show that (G *) be an abelian group.
Example of commutative ring : Refer Q. 2.31, Page 2–20C, Unit-2.
Ans. Refer Q. 2.13.
Example of non-commutative ring : Consider the set R of 2 × 2 matrix
with real element. For A, B, C  R Q. 8. Prove that inverse of each element in a group is unique.
A * (B + C) = (A * B) + (A * C) Ans. Refer Q. 2.14.
also, (A + B) * C = (A * C) + (B * C)
 * is distributive over +. Q. 9. Prove that every group of prime order is cyclic.
 (R, +, *) is a ring. Ans. Refer Q. 2.16.
We know that AB  BA, Hence (R, +, *) is non-commutative ring.
2–24 C (CS/IT-Sem-3) Algebraic Structures Discrete Structures & Theory of Logic 3–1 C (CS/IT-Sem-3)

Q. 10. Show that every group of order 3 is cyclic.

3
Ans. Refer Q. 2.17.

Q. 11. Show that G = [(1, 2, 4, 5, 7, 8), X9] is cyclic. How many


generators are there ? What are they ?
Ans. Refer Q. 2.19. Lattices and
Q. 12. State and prove Lagrange’s theorem for group. Is the Boolean Algebra
converse true ?
Ans. Refer Q. 2.21.

Q. 13.
a. Prove that every cyclic group is an abelian group.
b. Obtain all distinct left cosets of {(0), (3)} in the group
(Z6, +6) and find their union. CONTENTS
c. Find the left cosets of {[0], [3]} in the group (Z6, +6).
Ans. Refer Q. 2.23. Part-1 : Lattices : Definition, ................................. 3–2C to 3–10C
Properties of Lattices–Bounded,
Q. 14. Write and prove the Lagrange’s theorem. If a group Complemented, Modular
G = {...., – 3, 2, – 1, 0, 1, 2, 3,.....} having the addition as binary and Complete Lattice
operation. If H is a subgroup of group G where x2  H such
that x  G. What is H and its left coset w.r.t 1 ? Part-2 : Boolean Algebra : .................................... 3–10C to 3–13C
Ans. Refer Q. 2.24. Introduction, Axioms and
Theorems of Boolean Algebra
Q. 15. Consider a ring (R, +, ) defined by a • a = a, determine
whether the ring is commutative or not. Part-3 : Algebraic Manipulation .......................... 3–13C to 3–17C
of Boolean Expressions,
Ans. Refer Q. 2.31.
Simplification of Boolean
Functions, Karnaugh Maps
Q. 16. If the permutation of the elements of {1, 2, 3, 4, 5} are given
by a = (1 2 3) (4 5), b = (1) (2) (3) (4 5), c = (1 5 2 4) (3). Find the
Part-4 : Logic Gates, Digital ................................ 3–17C to 3–20C
value of x, if ax = b. And also prove that the set Z4 = (0, 1, 2, 3) Circuits and
is a commutative ring with respect to the binary modulo Boolean Algebra
operation +4 and *4.
Ans. Refer Q. 2.33.

Q. 17. What is meant by ring ? Give examples of both commutative


and non-commutative rings.
Ans. Refer Q. 2.34.


3–2 C (CS/IT-Sem-3) Lattices and Boolean Algebra Discrete Structures & Theory of Logic 3–3 C (CS/IT-Sem-3)

Answer
PART-1
Types of lattice :
Lattices : Definition, Properties of Lattices–Bounded, 1. Bounded lattice : A lattice L is said to be bounded if it has a greatest
Complemented, Modular and Complete Lattice. element 1 and a least element 0. In such lattice we have
a  1 = 1, a  1 = a
a  0 = a, a  0 = 0
Questions-Answers  a  L and 0  a  I
2. Complemented lattice : Let L be a bounded lattice with greatest
Long Answer Type and Medium Answer Type Questions
element 1 and least element 0. Let a  L then an element a  L is
complement of a if,
a  a = 1 and a  a = 0
Que 3.1. Define lattice. Give its properties. A lattice L is called complemented if is bounded and if every element in
L has a complement.
Answer 3. Distributive lattice : A lattice L is said to be distributive if for any
A lattice is a poset (L, ) in which every subset {a, b} consisting of 2 elements element a, b and c of L following properties are satisfied :
has least upper bound (lub) and greatest lower bound (glb). Least upper i. a  (b  c) = (a  b)  (a  c)
bound of {a, b} is denoted by a  b and is known as join of a and b. Greatest ii. a  (b  c) = (a  b)  (a  c)
lower bound of {a, b} is denoted by a  b and is known as meet of a and b.
otherwise L is non-distributive lattice.
Lattice is generally denoted by (L, , ).
4. Complete lattice : A lattice L is called complete if each of its non-
Properties :
empty subsets has a least upper bound and greatest lower bound.
Let L be a lattice and a, b L then
For example :
1. Idempotent property :
i. (Z, ) is not a complete lattice.
i. aa=a ii. a  a = a
2. Commutative property : ii. Let S be the class of all subsets of some universal set A and a
relation  is defined as X  Y  X is a subset of Y such that
i. ab=ba ii. a  b = b  a
X  Y = X  Y and X  Y. Every subset of S has glb and lub. So, S
3. Associative property :
is complete.
i. a  (b  c) = (a  b)  c ii. a  (b  c) = (a  b)  c
5. Modular lattice : A lattice (L, ) is called modular lattice if,
4. Absorption property :
a  (b  c) = (a  b)  c whenever a  c for all a, b, c  L.
i. a  (a  b) = a ii. a  (a  b) = a
5. i. a  b = b iff a  b ii. a  b = a iff a  b Que 3.3. If the lattice is represented by the Hasse diagram given
iii. a  b = a iff a  b = b below :
6. Distributive Inequality : i. Find all the complements of ‘e’.
i. a  (b  c)  (a  b)  (a  c) ii. a  (b  c)  (a  b)  (a  c) ii. Prove that the given lattice is bounded complemented lattice.
b
7. Isotonicity :
Let a, b, c,  L and a  b, then a c
i. acbc ii. a  c  b  c
8. Stability :
Let a, b, c,  L, then f d
i. a  b, a  c a  (b  c), a  (b  c)
e
ii. a  b, a  c a  (b  c), a  (b  c)
Fig. 3.3.1.
Que 3.2. Explain types of lattice. AKTU 2014-15, Marks 10
3–4 C (CS/IT-Sem-3) Lattices and Boolean Algebra Discrete Structures & Theory of Logic 3–5 C (CS/IT-Sem-3)

Consider a1 = a1  0
Answer = a1  (a  a2) [from (3.5.2)]
i. Complements of e are c and d which are as follows : = (a1  a)  (a1  a2) [Distributive property]
c e = b , c  e = f = (a  a1)  (a1  a2) [Commutative property]
de=b , de=f = I  (a1  a2) [from (3.5.1)]
ii. A lattice is bounded if it has greatest and least elements. Here b is = a1  a2 ...(3.5.3)
greatest and f is least element.
Now Consider a2 = a2  0
Que 3.4. Define a lattice. For any a, b, c, d in a lattice (A, ) if a  b = a2  (a  a1) [from (3.5.2)]
and c  d then show that a  c  b  d and a  c  b  d. = (a2  a)  (a2  a1) [Distributive property]
= (a  a2)  (a1  a2) [Commutative property]
AKTU 2018-19, Marks 07
= I  (a1  a2) [from (3.5.1)]
Answer = a1  a2 ...(3.5.4)
Hence, from (3.5.3) and (3.5.4),
Lattice : Refer Q. 3.1, Page 3–2C, Unit-3.
a1 = a2
Numerical :
So, for bounded distributive lattice complement is unique.
As a  b and c  d, a  b  b d and c  d  b  d.
Hasse diagram of [P(a, b, c), ] or [P(a, b, c), ] is shown in Fig. 3.5.1.
By transtivity of , a  b d and c  b  d.
{a, b, c}
So b d is an upper bound of a and c.
So a  c  bd.
As a  c  a and a c  c, a  c  a  b and a c  c  d.
Hence a  c is a lower bound of b and d. So a c  b  d.
{a, b} {a, c} {b, c}
So a c  b  d.
Que 3.5. Let L be a bounded distributed lattice, prove if a
complement exists, it is unique. Is D12 a complemented lattice ? {a} {b} {c}
Draw the Hasse diagram of [P (a, b, c), <], (Note : ‘<’ stands for subset).
Find greatest element, least element, minimal element and maximal
element. AKTU 2015-16, Marks 15 
OR
Fig. 3.5.1.
Draw the Hasse diagram of [P (a, b, c), ] (Note : ‘’ stands for subset).
Find greatest element, least element, minimal element and maximal Greatest element is {a, b, c} and maximal element is {a, b, c}..
The least element is  and minimal element is .
element. AKTU 2015-16, Marks 10
Que 3.6. The directed graph G for a relation R on set A = {1, 2, 3,
Answer 4} is shown below :
Let a1 and a2 be two complements of an element a  L.
Then by definition of complement 1 2

a  a1  I 
 ...(3.5.1)
a  a1  0 
a  a2  I  3 4
 ...(3.5.2)
a  a2  0  Fig. 3.6.1.
3–6 C (CS/IT-Sem-3) Lattices and Boolean Algebra Discrete Structures & Theory of Logic 3–7 C (CS/IT-Sem-3)

i. Verify that (A, R) is a poset and find its Hasse diagram. Now a  b = least upper bound of a, b
ii. Is this a lattice ? = least {all upper bounds of a, b}
iii. How many more edges are needed in the Fig. 3.6.1 to extend
(A, R) to a total order ? = least {b, c, ...} [using a  b  c]
iv. What are the maximal and minimal elements ? =b ...(3.7.1)
AKTU 2014-15, Marks 10 and b  c = greatest lower bound of b, c
= maximum {all lower bounds of b, c}
Answer = maximum {b, a, ...} [using a  b  c]
i. The relation R corresponding to the given directed graph is, =b ...(3.7.2)
R = {(1, 1), (2, 2), (3, 3), (4, 4), (3, 1), (3, 4), (1, 4), (3, 2)} Eq. (3.7.1) and (3.7.2) gives, a b = b c
R is a partial order relation if it is reflexive, antisymmetric and transitive. b. (a  b)  (b c)  (a  b)  (a  c) = b
Reflexive : Since aRa,  a  A . Hence, it is reflexive. Consider, (a  b) (b  c)
Antisymmetric : Since aRb and bRa then we get a = b otherwise aRb = b  b [using a  b  c and definition of  and ]
or bRa. =b ...(3.7.3)
Hence, it is antisymmetric. and (a  b)  (a c) = b  c
Transitive: For every aRb and bRc we get aRc. Hence, it is transitive. =b ...(3.7.4)
Therefore, we can say that (A, R) is poset. Its Hasse diagram is : From eq. (3.7.3) and (3.7.4), (a  b)  (b  c) = (a  b)  (a  c) = b.
1
Que 3.8.
2
a. Prove that every finite subset of a lattice has an LUB and a
GLB.
b. Give an example of a lattice which is a modular but not a
4
distributive. AKTU 2016-17, Marks 10
3
Fig. 3.6.2.
ii. Since there is no lub of 1 and 2 and same for 2 and 4. The given poset is Answer
not a lattice. a.
 1 2 3 4 1. The theorem is true if the subset has 1 element, the element being
1 1  1 1 its own glb and lub.
2  2 2  2. It is also true if the subset has 2 elements.
3 1 2 3 1 3. Suppose the theorem holds for all subsets containing 1, 2, ..., k
elements, so that a subset a1, a2, ..., ak of L has a glb and a lub.
4 1  1 4
4. If L contains more than k elements, consider the subset
iii. Only one edge (4, 2) is included to make it total order. {a1, a2, ..., ak + 1} of L.
iv. Maximals are {1, 2} and minimals are {3, 4}. 5. Let w = lub (a1, a2, ..., ak).
6. Let t = lub (w, ak + 1).
Que 3.7. In a lattice if a  b  c, then show that
7. If s is any upper bound of a1, a2, ..., ak + 1, then s is  each of a1, a2, ...,
a. ab=bc ak and therefore s  w.
b. (a  b)  (b  c) = (a  b)  (a  c) = b AKTU 2016-17, Marks 10 8. Also, s  ak + 1 and therefore s is an upper bound of w and ak + 1.
9. Hence s  t.
Answer 10. That is, since t  each a1, t is the lub of a1, a2, ..., ak + 1.
a. Given : a  b  c 11. The theorem follows for the lub by finite induction.
3–8 C (CS/IT-Sem-3) Lattices and Boolean Algebra Discrete Structures & Theory of Logic 3–9 C (CS/IT-Sem-3)

12. If L is finite and contains m elements, the induction process stops (P(S), ) is not a lattice because ({a, b},{b, d}) has no lub and glb.
when k + 1 = m.
Que 3.10. Explain modular lattice, distributive lattice and bounded
b.
1. The diamond is modular, but not distributive. lattice with example and diagram. AKTU 2017-18, Marks 10
2. Obviously the pentagon cannot be embedded in it.
3. The diamond is not distributive : Answer
y  (x  z) = y (y  x)  (y  z) = 1 Modular distributive and bounded lattice : Refer Q. 3.2, Page 3–2C,
4. The distributive lattices are closed under sublattices and every Unit-3.
sublattice of a distributive lattice is itself a distributive lattice. Example :
5. If the diamond can be embedded in a lattice, then that lattice has a Let consider a Hasse diagram :
non-distributive sublattice, hence it is not distributive. 1

Que 3.9. Show that the inclusion relation  is a partial ordering


a b c
on the power set of a set S. Draw the Hasse diagram for inclusion on
the set P(S), where S = {a, b, c, d}. Also determine whether (P(S), ) is
0
a lattice. AKTU 2018-19, Marks 07 Fig. 3.10.1.
Modular lattice :
Answer
0  a i.e., taking b = 0
Show that the inclusion relation () is a partial ordering on the power set of b  (a  c) = 0  0 = 0, a  (b  c) = a  c = 0
a set S. Distributive lattice :
Reflexivity : A  A whenever A is a subset of S. For a set S, the lattice P(S) is distributive, since union and intersection each
Antisymmetry : If A and B are positive integers with A  B and B  A, then satisfy the distributive property.
A = B.
Transitivity : If A  B and B  C, then A  C. Bounded lattice : Since, the given lattice has 1 as greatest and 0 as least
Hasse diagram : element so it is bounded lattice.

Que 3.11. Draw the Hasse diagram of (A, ), where


{a, b, c, d}
A = {3, 4, 12, 24, 48, 72} and relation  be such that a  b if a divides b.
AKTU 2017-18, Marks 07
{a, b, d} {a, c, d}
{a, b, c} {b, c, d}
Answer
Hasse diagram of (A, ) where A = {3, 4, 12, 24, 48, 72}
1

{a, c} {b, c} {b, d} {c, d}


{a, b} {a, c} a c
b

{a} {b} {c} {d} 0


Fig. 3.11.1.

Que 3.12. For any positive integer D36, then find whether (D36, ‘|’)

Fig. 3.9.1. is lattice or not ? AKTU 2017-18, Marks 07
3–10 C (CS/IT-Sem-3) Lattices and Boolean Algebra Discrete Structures & Theory of Logic 3–11 C (CS/IT-Sem-3)

4. Complement laws :
Answer
a. a + a = 1 b. a.a = 0
D36 = Divisor of 36 = {1, 2, 3, 4, 6, 9, 12, 18, 36}
Basic theorems :
Hasse diagram :
(1  3) = {3, 6}, (1  2) = {2, 4}, (2  6) = {6, 18}, (9  4) = {} Let a, b, c  B, then
36
1. Idempotent laws :
12 12 a. a+a=a b. a.a = a
2. Boundedness (Dominance) laws :
6
4 9 a. a+1=1 b. a.0 = 0
3. Absorption laws :
2 3
a. a + (a.b) = a b. a.(a + b) = a
1
Since, 9  4 = {} 4. Associative laws :
So, D36 is not a lattice. a. (a + b) + c = a + (b + c) b. (a.b).c = a.(b.c)
5. Uniqueness of complement :
PART-2 a + x = 1 and a.x = 0, then x = a
Boolean Algebra : Introduction, Axioms and Theorems of 6. Involution law : (a) = a
Boolean Algebra.
7. a. 0 = 1 b. 1 = 0
8. De-Morgan’s laws :
Questions-Answers a. (a + b) = a.b b. (a.b) = a + b

Long Answer Type and Medium Answer Type Questions Que 3.14. Prove the following theorems :
a. Absorption law : Prove that  a, b,  B
i. a.(a + b) = a ii. a + a.b = a
Que 3.13. What is Boolean algebra ? Write the axioms of Boolean
b. Idempotent law : Prove that  a B, a + a = a and a.a = a.
algebra. Also, describe the theorems of it. c. De Morgan’s law : Prove that  a, b,  B
i. (a + b) = a.b ii. (a. b) = a + b
Answer d. Prove that 0 = 1 and 1 = 0.
A Boolean algebra is generally denoted by (B, +, ., 0, 1) where (B, +,.) is a
lattice with binary operations ‘+’ and ‘.’ called the join and meet respectively Answer
and () is unary operation in B. The elements 0 and 1 are zero (least) and unit a. Absorption law :
(greatest) elements of lattice (B, +, .). B is called a Boolean algebra if the i. To prove : a.(a + b) = a
following axioms are satisfied for all a, b, c in B. Let a.(a + b) = (a + 0).(a + b) by Identity law
Axioms of Boolean algebra : = a + 0.b by Distributive law
= a + b.0 by Commutative law
If a, b, c  B, then
= a+0 by Dominance law
1. Commutative laws : = a by Identity law
a. a+b=b+a b. a.b = b.a ii. To prove : a + a.b = a
2. Distributive laws : Let a + a.b = a.1 + a.b by Identity law
= a.(1 + b) by Distributive law
a. a + (b.c) = (a + b).(a + c) b. a.(b + c) = (a.b) = (a.c) = a.(b + 1) by Commutative law
3. Identity laws : = a.1 by Dominance law
a. a+0=a b. a.1 = a = a by Identity law
3–12 C (CS/IT-Sem-3) Lattices and Boolean Algebra Discrete Structures & Theory of Logic 3–13 C (CS/IT-Sem-3)

b. Idempotent law :
To prove : a + a = a and a.a = a Que 3.15. Define Boolean algebra. Show that in a Boolean algebra
Let a= a+0 by Identity law meet and join operations are distributive to each other.
= a + a. a by Complement law
= (a + a).(a + a) by Distributive law Answer
= (a + a).1 by Complement law Boolean algebra : Refer Q. 3.10, Page 3–10C, Unit-3.
= a+a by Identity law
Meet and join operations are distributive :
Now let a = a.1 by Identity law
= a.(a + a) by Complement law 1. Let L be a poset under an ordering . Let a, b  L.
= a.a + a.a by Distributive law 2. We define :
= a.a + 0 by Complement law a  b (read “a join b”) as the least upper bound of a and b, and
= a.a by Identity law
a  b(read “a meet b”) as greatest lower bound of a and b.
c. De Morgan’s law :
i. To prove : (a + b) = a.b 3. Since the join and meet operation produce a unique result in all cases
To prove the theorem we will show that where they exist, we can consider them as binary operations on a set if
(a + b) + a.b = 1 they always exist.
Consider (a + b) + a.b = {(a + b) + a}.{(a + b) + b}by Distributive law 4. A lattice is a poset L (under ) in which every pair of elements has a lub
= {(b + a) + a}.{(a + b) + b} and a glb.
by Commutative law 5. Since a lattice L is an algebraic system with binary operations  and , it
= {b + (a + a)}.{a + (b + b)} is denoted by [L, , ].
by Associative law
= (b + 1).(a + 1) by Complement law 6. Let us consider,
a. [P(A), , ] is a lattice for any set A and
= 1.1 by Dominance law
b. The join operation is the set operation of union and the meet
=1 ...(3.14.1)
Also consider (a + b).ab = ab.(a + b) by Commutative law operation is the operation of intersection; that is,  =  and  = .
= ab.a + ab.b by Distributive law 7. It can be shown that the commutative laws, associative laws, idempotent
= a.(ab) + a.(b b) by Commutative law laws, and absorption laws are all true for any lattice.
= (a. a).b + a(b. b) by Associative law 8. An example of this is clearly [P(A); , ], since these laws hold in the
= 0. b + a.0 by Complement law algebra of sets.
= b.0 + a.0 by Commutative law
9. This lattice is also distributive such that join is distributive over meet
= 0+0 by Dominance law
and meet is distributive over join.
=0 ...(3.14.2)
From eq. (3.14.1) and (3.14.2), we get,
ab is complement of (a + b) i.e.(a + b) = a b. PART-3
ii. To prove : (a. b) = a + b Algebraic Manipulation of Boolean Expressions, Simplification
Follows from principle of duality, that is, interchange operations + and • of Boolean Functions, Karnaugh Maps.
and interchange the elements 0 and 1.
d. To prove : 0 = 1 and 1 = 0.
0 = (a a) by Complement law
= a + (a) by De Morgan’s law Questions-Answers
= a + a by Involution law
= a + a by Commutative law Long Answer Type and Medium Answer Type Questions
=1 by Complement law
Now (0) = 1
 0 = 1 Que 3.16. Express each Boolean expression as SOP and then in its
 1 = 0. complete sum-of-products form.
3–14 C (CS/IT-Sem-3) Lattices and Boolean Algebra Discrete Structures & Theory of Logic 3–15 C (CS/IT-Sem-3)

a. E = x(xy + xy + yz) a. F (x, y, z) = (0, 1, 5, 7)


b. E = z(x+ y) + y. b. F (x, y, z) = (1, 2, 3, 6, 7)

Answer Answer
a. E = x.x.y + x.x.y + x.y.z = x.y + x.y.z = x.y' a. f(x, y, z) = (0, 1, 5, 7)
( x.x.y = 0 and x.y is contained in x.y.z) z
xy 0 1
Complete SOP form = x.y (z + z) ( z is missing) 00 0 1
= x.y.z + x.y. z 01 2 3
b. E = z.(x+ y) + y = x.z + y.z + y
11 6 7
Then E = x.z(y + y) + y.z.(x + x) + y.(x + x) (z + z) f=xy+xz
10 4 5
(by Complement law)
= x.y.z + x.y.z + x.y.z + x.y.z + x.y.z + x.z.y Fig. 3.18.1.
+ x.y.z+ x.y.z b. f (x, y, z) =  (1, 2, 3, 6, 7)
yz
= x.y.z + x.y.z + x.y.z + x.y.z + x.y.z + x.y.z x 00 01 11 10
0 0 1 3 2
Que 3.17. Define a Boolean function of degree n. Simplify the
1 4 5 7 6
following Boolean expression using Karnaugh maps
Fig. 3.18.2.
xyz + xy'z + x'y'z + x'yz + x'y'z'
f= xz+y
Answer
Que 3.19. Simplify the following Boolean function using K-map :
Boolean function of degree n :
F(x, y, z) = (0, 2, 3, 7)
1. Let B = {0, 1}. Then Bn = {(x1, x2 ...., xn)|xi B for 1  i  n} is the set of all
possible n-tuples of 0s and 1s. AKTU 2017-18, Marks 07
2. The variable x is called a Boolean variable if it assumes values only
from B, that is, if its only possible values are 0 and 1. Answer
yz
3. A function from Bn to B is called a Boolean function of degree n. x 00 01 11 10
4. For example, the function F(x, y) = xy from the set of ordered pairs of 0 1 1 1

Boolean variables to the set {0, 1}, is a Boolean function of degree z 1 1


with F(1, 1) = 1, F(1, 0) = 0, F(0, 1) = 0 and F(0, 0) = 0.
Numerical : The Karnaugh map for the given function is : F = x z  yz
xyz + xyz + xyz + xyz + xyz Que 3.20. Simplify the following Boolean expressions using
yz
x yz yz yz yz K-map :
a. Y = ((AB) + A + AB)
x 1 1 1 b. A B C D + A B C D + A B CD + A B CD = A B
x 1 1 AKTU 2015-16, Marks 10

Fig. 3.17.1. Answer


Then the simplified expression is : z + x'y'. a. Y = ((AB) + A + AB)

Que 3.18. Simplify the following Boolean functions using three = ((AB)) (A + (AB))

variable maps : = (AB) ((A) (AB))


3–16 C (CS/IT-Sem-3) Lattices and Boolean Algebra Discrete Structures & Theory of Logic 3–17 C (CS/IT-Sem-3)

= AB (A (A + B))
Que 3.22. Find the Sum-Of-Products and Product-Of-s um
= AB (AA + AB)
expansion of the Boolean function F(x, y, z) = (x + y) z.
= AB(0 + AB) = AB AB
AKTU 2018-19, Marks 07
= ABB
=0 Answer
Here, we find that the expression is not in minterm. For getting minterm, F(x, y, z) = (x + y)z
we simplify and find that its value is already zero. Hence, no need to use
K-map for further simplification. x y z x+y z (x + y)z

b. A B C D + A B C D + A B CD + A B CD = A B 1 1 1 1 0 0
= A BCD + ABCD + ABCD + ABCD 1 1 0 1 1 1

CD AB 1 0 1 1 0 0
A B  C D  1 1 0 0 1 1 1
A B  C D 1
0 1 1 1 0 0
AB CD 1
0 1 0 1 1 1
AB CD 1
0 0 1 0 0 0
Fig. 3.20.1.
0 0 0 0 1 0
On simplification by K-map, we get AB corresponding to all the four
one’s. Sum-Of-Product :
F(x, y, z) = xyz + xyz + xyz
Que 3.21. Find the Boolean algebra expression for the following
Product-Of-Sum :
F(x, y, z) = (x + y + z)(x + y+ z)(x+ y + z)(x+ y+ z)
system. AKTU 2016-17, Marks 7.5
(x+ y+ z')
A
B
C PART-4
Logic Gates, Digital Circuits and Boolean Algebra.

Questions-Answers
Fig. 3.21.1.
Long Answer Type and Medium Answer Type Questions
Answer
A ABC
B Que 3.23. Consider the Boolean function.
C ABC + A(B + C )
A.(B  + C )
B a. f(x1, x2, x3, x4) = x1 + (x2. (x1 + x4) + x3. (x2 + x4))
B + C i. Simplify f algebraically
ii. Draw the logic circuit of the f and the reduction of the f.
C
b. Write the expres sions E 1 = (x + x * y) + (x/y) and
Fig. 3.21.2.
E2 = x + ((x * y + y)/y), into
3–18 C (CS/IT-Sem-3) Lattices and Boolean Algebra Discrete Structures & Theory of Logic 3–19 C (CS/IT-Sem-3)

i. Prefix notation Binary tree is :

ii. Postfix notation AKTU 2014-15, Marks 10 +

/
Answer x
y
a. i. f(x1, x2, x3, x4) = x1 + (x2.(x1 + x4) + x3.(x2+ x4) +
= x1 + x2.x1 + x2.x4 + x3.x2 + x3.x4 y
*
= x1 + x2 + x2.x4 + x3.x2 + x3.x4
y
= x1 + x2.(1 + x4) + x3.x2 + x3.x4 x
Fig. 3.23.3.
= x1 + x2 + x3.x2 + x3.x4
= x1 + x2 + x3 + x3.x4 Prefix : + x / + * x y y y
Postfix : x x y * y + y / +
= x1 + x2 + x3.(1 + x4)
= x1 + x2 + x3 Que 3.24. Construct circuits that produce the following output :
ii. Logic circuit :
F(X, Y, Z) = (X + Y + Z) ( XYZ )
x1 x1 + x2 + x3
x2
x3 Answer
The logic network is shown below :
Fig. 3.23.1.
Reduction of f : X X+Y+Z
f (x1, x2, x3, x4) = x1 + (x2.(x1 + x4) + x3.(x2 + x4) Y
Z
= x1 + (x2.x1 + x2.x4) + (x3.x2 + x3.x4)
= x1 + x2.x1 + x2.x4 + x3.x2 + x3.x4 (X + Y + Z) X Y Z
b. E1 = (x + x * y) + (x/y)
Binary tree is : X
X
Y XYZ
+ Y
Z
+ / Z
Fig. 3.24.1.
x * x y

Que 3.25. Draw the logic network corresponding to the following


x y
Boolean expressions :
Fig. 3.23.2.
i. xy + x y
Prefix : ++ x * x y / xy ii. XYZ + XYZ + XY
Postfix : xx y * + xy / +
E2 = x + ((x * y + y)/y)
3–20 C (CS/IT-Sem-3) Lattices and Boolean Algebra Discrete Structures & Theory of Logic 3–21 C (CS/IT-Sem-3)

Ans. Refer Q. 3.3.


Answer
i. The logic network is shown in Fig. 3.25.1. Q. 2. Define a lattice. For any a, b, c, d in a lattice (A, ) if a  b and
x c  d then show that a  c  b  d and a  c  b  d.
Ans. Refer Q. 3.4.
y
xy + xy
Q. 3. Let L be a bounded distributed lattice, prove if a complement
exists, it is unique. Is D12 a complemented lattice ? Draw
x the Hasse diagram of [P (a, b, c), <], (Note : ‘<’ stands for
subset). Find greatest element, least element, minimal
y xy
y element and maximal element.
Fig. 3.25.1. Ans. Refer Q. 3.5.
ii. The logic network shown in Fig. 3.25.2.
X Q. 4. The directed graph G for a relation R on set A = {1, 2, 3, 4} is
X shown below :
Y XY Z 
Y
1 2

XY Z  + XYZ + XY 
Z
Z X YZ

3 4
XY
Fig. 2.
i. Verify that (A, R) is a poset and find its Hasse diagram.
Fig. 3.25.2. ii. Is this a lattice ?
iii. How many more edges are needed in the Fig. 2 to extend
(A, R) to a total order ?
VERY IMPORTANT QUESTIONS iv. What are the maximal and minimal elements ?
Ans. Refer Q. 3.6.
Following questions are very important. These questions
may be asked in your SESSIONALS as well as Q. 5. In a lattice if a  b  c, then show that
UNIVERSITY EXAMINATION. a. a  b = b  c
b. (a  b)  (b  c) = (a  b)  (a  c) = b
Ans. Refer Q. 3.7.
Q. 1. If the lattice is represented by the Hasse diagram given
below : Q. 6.
i. Find all the complements of ‘e’. a. Prove that every finite subset of a lattice has an LUB and a
ii. Prove that the given lattice is bounded complemented GLB.
lattice. b. Give an example of a lattice which is a modular but not a
b distributive.
c Ans. Refer Q. 3.8.
a
Q. 7. Show that the inclusion relation  is a partial ordering on
the power set of a set S. Draw the Hasse diagram for
f d inclusion on the set P(S), where S = {a, b, c, d}. Also determine
e whether (P(S), ) is a lattice.
Fig. 1. Ans. Refer Q. 3.9.
3–22 C (CS/IT-Sem-3) Lattices and Boolean Algebra Discrete Structures & Theory of Logic 4–1 C (CS/IT-Sem-3)

Q. 8. Explain modular lattice, distributive lattice and bounded

4
lattice with example and diagram.
Ans. Refer Q. 3.10.

Q. 9. Draw the Hasse diagram of (A, ), where A = {3, 4, 12, 24, 48,
72} and relation  be such that a  b if a divides b. Propositional Logic
Ans. Refer Q. 3.11.
and Predicate Logic
Q. 10. For any positive integer D36, then find whether (D36, ‘|’) is
lattice or not ?
Ans. Refer Q. 3.12.

Q. 11. Simplify the following Boolean function using K-map :


F(x, y, z) = (0, 2, 3, 7)
Ans. Refer Q. 3.19. CONTENTS
Q. 12. Simplify the following Boolean expres sions us ing
K-map : Part-1 : Propositional Logic : .................................. 4–2C to 4–6C
a. Y = ((AB) + A + AB) Proposition, Well Formed
b. A B C D + A B C D + A B CD + A B CD = A B Formula, Truth Tables
Ans. Refer Q. 3.20.
Part-2 : Tautology, Satisfiability, ......................... 4–6C to 4–14C
Q. 13. Find the Boolean algebra expression for the following Contradiction, Algebra of
system. Proposition, Theory of Inference
A
B
C Part-3 : Predicate Logic : ..................................... 4–15C to 4–19C
First Order Predicate,
Well Formed Formula
of Predicate, Quantifiers,
Inference Theory of
Predicate Logic

Fig. 3.
Ans. Refer Q. 3.21.
Q. 14. Find the Sum-Of-Products and Product-Of-sum expansion
of the Boolean function F(x, y, z) = (x + y) z.
Ans. Refer Q. 3.22.
Q. 15. Consider the Boolean function.
a. f(x1, x2, x3, x4) = x1 + (x2. (x1 + x4) + x3. (x2 + x4))
i. Simplify f algebraically
ii. Draw the logic circuit of the f and the reduction of the
f.
b. Write the expres sions E 1 = (x + x * y) + (x/y) and
E2 = x + ((x * y + y)/y), into
i. Prefix notation ii. Postfix notation
Ans. Refer Q. 3.23.

4–2 C (CS/IT-Sem-3) Propositional Logic & Predicate Logic Discrete Structures & Theory of Logic 4–3 C (CS/IT-Sem-3)

Table. 4.2.1.
PART-1 S. No. Connective words Name of connective Symbol
Propositional Logic : Proposition, Well Formed Formula,
1. Not Negation ~ or  or –
Truth Tables.
2. And Conjunction 
3. Or Disjunction 
Questions-Answers
4. If-then Implication 
Long Answer Type and Medium Answer Type Questions
5. If and only if Biconditional 

i. Negation : If P is a proposition then negation of P is a proposition


Que 4.1. Define the term proposition. Also, explain compound which is true when p is false and false when p is true. It is denoted
proposition with example. by ~ p or  or p’ or p .
Truth table :
Answer
p ~p
Proposition : Proposition is a statement which is either true or false but not
both. It is a declarative statement. It is usually denoted by lower case letters T F
p, q, r, s, t etc. They are called Boolean variable or logic variable. F T
For example :
ii. Conjunction : If p and q are two propositions then conjunction of
1. Dr. A.P.J. Abdul Kalam was Prime Minister of India. p and q is a proposition which is true when both p and q are true
2. Roses are red. otherwise false. It is denoted by p  q.
Truth table :
3. Delhi is in India
p q pq
(1) proposition is false whereas (2) and (3) are true.
Compound proposition : A compound proposition is formed by composition T T T
of two or more propositions called components or sub-propositions. T F F
For example : F T F
F F F
1. Risabh is intelligent and he studies hard.
2. Sky is blue and clouds are white. iii. Disjunction : If p and q be two propositions, then disjunction of p
and q is a proposition which is true when either one of p or q or both
Here first statement contain two propositions ‘‘Risabh is intelligent’’ and ‘‘he are true and is false when both p and q are false and it is denoted by
studies hard’’ whereas second statement contain propositions ‘‘sky is blue’’ p  q.
and ‘‘clouds are white’’. As both statements are formed using two propositions.
Truth table :
So they are compound propositions.
p q pq
Que 4.2. Discuss connectives in detail with truth tables.
T T T
Answer T F T
1. The words or phrases used to form compound proposition are called F T T
connectives. F F F
2. There are five basic connectives as shown in the Table 4.2.1.
4–4 C (CS/IT-Sem-3) Propositional Logic & Predicate Logic Discrete Structures & Theory of Logic 4–5 C (CS/IT-Sem-3)

iv. Converse
Que 4.3. What do you mean by well formed formula ?
v. Contrapositive AKTU 2014-15, Marks 10
Answer OR
1. Well formed formula is defined as a mathematical expression Define inverse.
represented in well defined form and uses parenthesis, braces and
Answer
square brackets to avoid the ambiguity.
i. Conjunction : If p and q are two statements, then conjunction of p and
2. Logical statements are also represented in well defined form using
q is the compound statement denoted by p  q and read as
parenthesis according to priority of operations. To generate well formed
“p and q”. Its truth table is,
formula recursively, following rules are used :
i. An atomic statement P is a well formed formula. p q pq
ii. If P is well formed formula then ~ P is also a well formed. T T T
If P and Q are well formed formulae then (P  Q), (P  Q), (P  Q)
iii. T F F
and (P  Q) are also well formed formulae.
F T F
iv. A statement consists of variables, parenthesis and connectives is
recursively a well formed formula iff it can be obtained by applying F F F
the above three rules. Example :
For example :
1. (P  (P  Q) p : Ram is healthy.
2. ((P  Q)  R) q : He has blue eyes.
Que 4.4. Write short notes on : p  q : Ram is healthy and he has blue eyes.
i. Truth table ii. Logical equivalence ii. Disjunction : If p and q are two statements, the disjunction of
p and q is the compound statement denoted by p  q and it is read as “p
Answer or q”. Its truth table is,
i. Truth table : A truth table is a table that shows the truth value of a
compound proposition for all possible cases. p q pq

p q (p  q) p q (p  q) p ~p T T T

T T T T T T T F T F T
F T T
T F F T F T F T
F F F
F T F F T T
F F F F F F Example :

ii. Logical equivalence : If two propositions P (p, q, .....) and Q (p, q, ...) p : Ram will go to Delhi.
where p, q, ..... are propositional variables, have the same truth values q : Ram will go to Calcutta.
in every possible case, the propositions are called logically equivalent or
simply equivalent, and denoted by p  q : Ram will go to Delhi or Calcutta.
P (p, q, .......)  Q (p, q, ........) iii. Conditional : If p and q are propositions. The compound proposition if
Que 4.5. Explain the following terms with suitable example : p then q denoted by p  q or p  q and is called conditional proposition
or implication. It is read as “If p then q” and its truth table is,
i. Conjunction
ii. Disjunction
iii. Conditional
4–6 C (CS/IT-Sem-3) Propositional Logic & Predicate Logic Discrete Structures & Theory of Logic 4–7 C (CS/IT-Sem-3)

p q pq Que 4.6. Explain tautologies, contradictions, satisfiability and


T T T contingency.
T F F
Answer
F T T
1. Tautology : Tautology is defined as a compound proposition that is
F F T always true for all possible truth values of its propositional variables and
Example : it contains T in last column of its truth table.
p : Ram works hard. Propositions like,
q : He will get good marks. i. The doctor is either male or female.
p  q : If Ram works hard then he will get good marks. ii. Either it is raining or not.
For converse and contrapositive : are always true and are tautologies.
Let p : It rains. 2. Contradiction : Contradiction is defined as a compound proposition
that is always false for all possible truth values of its propositional
q : The crops will grow.
variables and it contains F in last column of its truth table.
iv. Converse : If p  q is an implication then its converse is given by q  p
Propositions like,
states that S : If the crops grow, then there has been rain.
i. x is even and x is odd number.
v. Contrapositive : If p  q is an implication then its contrapositive is
given by q  p states that, ii. Tom is good boy and Tom is bad boy.
t : If the crops do not grow then there has been no rain. are always false and are contradiction.
Inverse : 3. Contingency : A proposition which is neither tautology nor
If p  q is implication the inverse of p  q is ~ p  ~ q. contradiction is called contingency.
Consider the statement Here the last column of truth table contains both T and F.
p : It rains. 4. Satisfiability :
q : The crops will grow A compound statement formula A (P1, P2, ... Pn) is said to be satisfiable,
if it has the truth value T for at least one combination of truth value of
The implication p  q states that, P1, P2,.... Pn.
r : If it rains then the crops will grow.
Que 4.7. Write short note on algebra of propositions.
The inverse of the implication p  q, namely ~ p  ~ q states that.
u : If it does not rain then the crops will not grow. Answer
Proposition satisfies various laws which are useful in simplifying complex
PART-2 expressions. These laws are listed as :
Tautology, Satisfiability, Contradiction, Algebra of Proposition, 1. Idempotent laws :
Theory of Inference. a. p  p  p
b. p  p  p
2. Associative laws :
Questions-Answers a. (p  q)  r  p  (q  r)
b. (p  q)  r  p  (q  r)
Long Answer Type and Medium Answer Type Questions 3. Commutative laws :
a. p  q  q  p
b. p  q  q  p
4–8 C (CS/IT-Sem-3) Propositional Logic & Predicate Logic Discrete Structures & Theory of Logic 4–9 C (CS/IT-Sem-3)

4. Distributive laws : p q
a. p  (q  r)  (p  q)  (p  r) ~q
b. p  (q  r)  (p  q)  (p  r)  ~p
5. Identity laws : 3. Hypothetical syllogism : By this rule whenever the two implications
a. p  F  p p  q and q  r are true then the implication p  r is also true.
b. p  T  T The argument is of the form :
c. p  F  F
p q
d. p  T  p
q r
6. Complement laws :
 p r
a. p  ~P  T
4. Disjunctive syllogism : By this rule if the premises p  q and ~ q are
b. p  ~p  F true then p is true.
c. ~T  F The argument is of the form :
d. ~F  T p q
7. Involution law : ~q
a. ~(~p)  p  p
8. De Morgan's laws : 5. Addition : By this rule if p is true then p  q is true regardless the truth
a. ~ (p  q)  ~p  ~q value of q.
The argument is of the form :
b. ~ (p  q)  ~p  ~q
p
9. Absorption laws :
 p q
a. p  (p  q)  p
6. Simplification : By this rule if p  q is true then p is true.
b p  (p  q)  p The argument is of form :
These laws can easily be verified using truth table. p q p q
Que 4.8. Discuss theory of inference in propositional logic.  p or  q
7. Conjunction : By this rule if p and q are true then p  q is true.
Answer The argument is of the form :
Rules of inference are the laws of logic which are used to reach the given p
conclusion without using truth table. Any conclusion which can be derived q
using these laws is called valid conclusion and hence the given argument is  p q
valid argument.
8. Constructive dilemma : By this rule if (p  q)  (r  s) and p  r are
1. Modus ponens (Law of detachment) : By this rule if an implication true then q  s is true.
p  q is true and the premise p is true then we can always conclude that The argument is of form :
q is also true. ( p  q)  ( r  s)
The argument is of the form : p r
p q  q s
p 9. Destructive dilemma : By this rule if (p  q)  (r  s) and ~ q  s
 q are true.
2. Modus tollens (Law of contraposition) : By this rule if an implication The argument is of the form :
p  q is true and conclusion q is false then the premise p must be false.
The argument is of the form :
4–10 C (CS/IT-Sem-3) Propositional Logic & Predicate Logic Discrete Structures & Theory of Logic 4–11 C (CS/IT-Sem-3)

( p  q)  (r  s) Then from the truth table :


~qs p q pq p  p  q p  (p  q )  q
  pr T T T T T
10. Absorption : By this rule if p  q is true then p  (p  q) is true. T F F F T
The argument is of the form : F T T F T
p q F F T F T
 p  ( p  q)
p  (p  q)  q is a tautology since the last column contains T only.
Que 4.9.  p  q, p q is a valid argument.
What do you mean by valid argument ? Are the following
Numerical :
arguments valid ? If valid, construct a formal proof ; if not, explain Let the propositional variables be :
why. p  Do well in the course.
For students to do well in discrete structure course, it is necessary q  They study hard.
that they study hard. Students who do well in courses do not skip r  Do not skip classes.
classes. Student who study hard do well in courses. Therefore 1. For students to do well in discrete structure course, it is necessary that
students who do well in discrete structure course do not skip class. they study hard : p  q
2. Students who do well in the courses do not skip classes : p  r
Answer 3. Students who study hard do well in courses : q  p
Valid arguments : 4. Therefore, students who do well in discrete structure course do not skip
1. An argument P1, P2, ..., Pn Q is said to be valid if Q is true whenever classes : p  r
all the premises P1, P2, ..., Pn are true. Therefore, we have,
2. For example : Consider the argument : p  q, q p. Given : pq pr q  p Conclusion : p  r
C P P I II III IV
p q p q Proof : Taking III and II together we get
q  p, p  r gives q  r (Using hypothetical syllogism)
T T T V
Now taking I and V
T F F p  q and q  r we get p  r (Using hypothetical syllogism)
Hence, p  r is conclusion, so it is valid.
F T T
Yes, the statement is valid.
F F T
Que 4.10.
where P denotes the premise and C denotes the conclusion.
i. Show that ((p  q)  ~ (~ p  (~ q  ~ r)))  (~ p  ~q)  (~p  r) is a
3. From the truth table we can see in first and third rows both the premises tautology without using truth table.
q and p  q are true, but the conclusion p is false in third row. Therefore, ii. Rewrite the following arguments using quantifiers, variables
this is not a valid argument. and predicate symbols :
4. First and third rows are called critical rows. a. All birds can fly.
5. This method to determine whether the conclusion logically follows b. Some men are genius.
from the given premises by constructing the relevant truth table is c. Some numbers are not rational.
called truth table technique. d. There is a student who likes mathematics but not geography.
6. Also, we can say the argument P1, P2, ..., Pn Q is valid if and only if AKTU 2014-15, Marks 10
the propo sitio n P 1  P 2  ...  P n is true o r we can say if OR
P1  P2  ...  Pn  Q is a tautology. Show that ((p  q)  ~ (~p  (~q  ~r)))  (~p  ~q)  (~ p  r) is a
For example : Consider the argument p  q, p q.
tautology without using truth table. AKTU 2018-19, Marks 07
4–12 C (CS/IT-Sem-3) Propositional Logic & Predicate Logic Discrete Structures & Theory of Logic 4–13 C (CS/IT-Sem-3)

Answer Answer
i. We have Tautology, contradiction and contingency : Refer Q. 4.6, Page 4–7C,
((p q) ~ (~ p  (~ q  r)))  (~ p  ~ q)  (~ p r) Unit-4.
((p  q)  ~ (~ p  ~ (q  r)))  (~ (p  q)  ~ ( p  r)) Proof : ((p  q)  (~ p  r))  (q  r)
(Using De Morgan's Law)
p q r ~P (p  q) (~ p  r) (A  B) (q  r) C  D
 [(p  q)]  (p  (q  r))  ~ ((p  q)  (p  r))
 [(p  q)  (p  q)  (p  r)] ~ (( p  q)  (p  r)) =A =B =C =D
(Using Distributive Law) F F F T F T T F F
 [((p  q)  (p  q)]  (p  r) ~ ((p  q)  (p  r))
F F T T F T T T T
 ((p  q)  (p  r))  ~ ((p  q)  (p  r))
 x  ~ x where x = (p  q)  (p  r) F T F T T T T T T
T F T T T T T T T T
ii. a.  x [B(x)  F(x)] b.  x [M(x)  G(x)]
c. ~[ (x) (N(x)  R(x)] d. x [S(x)  M(x)  ~ G(x)] T F F F T F T F F
T F T F T T T T T
Que 4.11. “If the labour market is perfect then the wages of all
T T F F T F T T T
persons in a particular employment will be equal. But it is always
the case that wages for such persons are not equal therefore the T T T F T T T T T
labour market is not perfect”. Test the validity of this argument So, ((p  q)  (~ p  r))  (q  r) is contingency.
using truth table. AKTU 2014-15, Marks 10
Que 4.13.
Answer i. Find a compound proposition involving the propositional
Let p1 : The labour market is perfect. variables p, q, r and s that is true when exactly three
p2 : Wages of all persons in a particular employment will be equal. propositional variables are true and is false otherwise.
~p2 : Wages for such persons are not equal. ii. Show that the hypothesis “It is not sunny this afternoon and it
~p1 : The labour market is not perfect. is colder than yesterday”, “We will go swimming only if it is
The premises are p1  p2 , ~ p2 and the conclusion is ~ p1. The argument sunny”, “If we do not go swimming, then we will take a canoe
trip.” and “If we take a canoe trip, then we will be home by
p1  p2, ~ p2  ~ p1 is valid if ((p1  p2)  ~ p2)  ~ p1 is a tautology.
Its truth table is, sunset” lead to the conclusion “We will be home by sunset.”
OR
p1 p2 ~p1 ~p2 p1  p2 (p1 p2)  ~p2 (p1p2  ~ p2) ~p1 Show that the premises “It is not sunny this afternoon and it is
colder than yesterday,” “We will go swimming only if it is sunny,”
T T F F T F T “If we do not go swimming, then we will take a canoe trip.” and
T F F T F F T “If we take a canoe trip, then we will be home by sunset” lead to
the conclusion “We will be home by sunset.”
F T T F T F T
AKTU 2018-19, Marks 07
F F T T T T T
Answer
Since ((p1  p2)  ~p2)  ~p1 is a tautology. Hence, this is valid argument.
i. The compound proposition will be : (p  q  r)  s
Que 4.12. What is a tautology, contradiction and contingency ?
ii. Let p be the proposition “It is sunny this afternoon”, q be the proposition
Show that (p  q)  ( p  r)  (q  r) is a tautology, contradiction or “It is colder than yesterday”, r be the proposition “We will go swimming”,
contingency. AKTU 2018-19, Marks 07 s be the proposition ‘‘We will take a canoe trip’’, and t be the proposition
“We will be home by sunset”.
4–14 C (CS/IT-Sem-3) Propositional Logic & Predicate Logic Discrete Structures & Theory of Logic 4–15 C (CS/IT-Sem-3)

Then the hypothesis becomes  p  q, r  p,  r  s, and s  t. The


conclusion is simply t. PART-3
We construct an argument to show that our hypothesis lead to the
conclusion as follows : Predicate Logic : First Order Predicate, Well Formed Formula of
Predicate, Quantifiers, Inference Theory of Predicate Logic.
S. No. Step Reason
1. pq Hypothesis Questions-Answers
2. p Simplification using step 1
Long Answer Type and Medium Answer Type Questions
3. rp Hypothesis
4. r Modus tollens using steps 2 and 3 Que 4.15. Write a short note on
5. rs Hypothesis 1. First order logic
6. s Modus ponens using steps 4 and 5 2. Quantifiers

7. st Hypothesis Answer


1. First order logic :
8. t Modus ponens using steps 6 and 7
i. First order logic is the extension of propositional logic by generalizing
Que 4.14. Show that : (r  ~ q, r  S, S  ~ q, p  q)  ~ p are and quantifying the propositions over given universe of discourse.
ii. In first order logic every individual has the property p (say).
inconsistent. AKTU 2017-18, Marks 07 iii. It is also called first order predicate calculus.
iv. Predicate calculus is generalization of propositional calculus.
Answer
Predicate calculus allows us to manipulate statements about all or
Following the indirect method, we introduce p as an additional premise and show something.
that this additional premise leads to a contradiction. v. Universe of Discourse (UD) : It is the set of all possible values that
{1} (1) p  q Rule P can be substituted in place of predicate variable.
{2} (2) p Rule P (assumed)
{1, 2} (3) q Rule T, (1), (2) and modus ponens 2. Quantifiers : There are following two types of quantifiers :
{4} (4) s  q Rule P i. Universal quantifier : Let p(x) be a propositional function defined
{1, 2, 4} (5) s Rule T, (3), (4) and modus tollens on set A. Consider the expression.
{6} (6) r  s Rule P ( x  A) P(x) or  x P(x) ...(4.15.1)
{1, 2, 4, 6} (7) r Rule T, (5), (6) disjunctive syllogism Here the symbol ‘‘’’ is read as ‘‘for all’’ or ‘‘for every’’ and is called
{8} (8) r  q Rule P universal quantifier. Then the statement (4.15.1) is read as ‘‘For
{8} (9) r  q Rule T, (8) and EQ16 (p  q  p  q) every x  A, P(x) is true.’’
{8} (10) r  q Rule T, (8) and De Morgan’s law ii. Existential quantifier : Let Q(x) be a propositional function defined
on set B. Consider the expression
{1, 2, 4, 6} (11) r  q Rule T, (7), (3) and conjunction
(x  B) Q(x) or x Q(x) ...(4.15.2)
{1, 2, 4, 6, 8} (12) r  q  r  q Rule T, (10), (11) and conjunction.
Here the symbol ‘‘’’ is read as ‘‘for some’’ or ‘‘for at least one’’ or
Since, we know that set of formula is inconsistent if their conjunction implies ‘‘there exists’’ and is called existential quantifier.
contradiction. Hence it leads to a contradiction. So, it is inconsistent. Then the statement (4.15.2) is read as ‘‘For some x  B, Q(x) is
true’’.

Que 4.16. Explain rules of inference in predicate logic.


4–16 C (CS/IT-Sem-3) Propositional Logic & Predicate Logic Discrete Structures & Theory of Logic 4–17 C (CS/IT-Sem-3)

Answer Answer
Rule of inference is a logical form consisting of function which takes premises, a. Symbolic form :
analyzes their syntax and returns a conclusion. Let P(x): x is healthy and Q(x): x do all work
Rules of inference :
i. Universal specification : By this rule if the premise ( x) P (x) is true  x(P(x)  Q(x))
then P(c) is true where c is particular member of UD.
Negation : (  x (P(x)  Q(x))
(x) P ( x)
b. Symbolic form :
 P ( c)
Let P(x) : x is a person
ii. Universal generalization : By this rule if P(c) is true for all c in UD
then (x) P(x) is true. A(x, y) : x admires y
P ( c) The given statement can be written as “There is a person who is not
 (x) P ( x) admired by some person” and it is (x) ( y)[P(x)  P(y)   A(x, y)]
x is not free in any of given premises. Negation : ( x) ( y) [P (x)  P(y)  A(x, y)]
iii. Existential specification : By this rule if (x) P(x) is true then P(x) is c. Symbolic form :
true for some particular member of UD.
Let N(x, y) : x and y are neighbours
(x) P ( x)
H(x, y) : x should help y
 P (c)
P(x, y) : x will help y
c is some member of UD.
iv. Existential generalization : By this rule if P(c) is true for some The statement can be written as “For every person x and every person
particular member c in UD, then ( x) P (x) is true y, if x and y are neighbours, then either x should help y or y will not help
P ( c) x” and it is (  x) (  y)[N(x, y)  (H(x, y)  P(y, x))]
 (x) P ( x) Negation : (  x) (  y) [N(x, y)  (H (x, y) P (y, x))]
c is some member of UD.
v. Universal modus ponens : By this rule if P(x)  Q(x) is true for every Que 4.18. Express the following statements using quantifiers and
x and P(c) is true for some particular member c in UD then Q(c) is true. logical connectives.
( x) P ( x)  Q( x) a. Mathematics book that is published in India has a blue cover.
P (c) b. All animals are mortal. All human being are animal. Therefore,
 Q(c) all human being are mortal.
c. There exists a mathematics book with a cover that is not blue.
vi. Universal modus tollens : By this rule if P(x)  Q(x) is true for every d. He eats crackers only if he drinks milk.
x and ~ Q(c) is true for some particular c in UD then ~ Q(c) is true. e. There are mathematics books that are published outside India.
( x) P ( x)  Q( x)
~ Q(c) f. Not all books have bibliographies. AKTU 2015-16, Marks 10

 ~ P (c) Answer
Que 4.17. Write the symbolic form and negate the following a. P(x) : x is a mathematic book published in India
statements : Q(x) : x is a mathematic book of blue cover
a. Everyone who is healthy can do all kinds of work. x P(x)  Q(x).
b. Some people are not admired by everyone.
c. Everyone should help his neighbours, or his neighbours will b. P(x) : x is an animal
Q(x) : x is mortal
not help him. AKTU 2016-17, Marks 10
x P(x)  Q(x)
4–18 C (CS/IT-Sem-3) Propositional Logic & Predicate Logic Discrete Structures & Theory of Logic 4–19 C (CS/IT-Sem-3)

R(x) : x is a human being


Answer
 x R(x)  P(x).
i. x [S(x)  F(x)]
c. P(x) : x is a mathematics book
ii. ~ [(x) (C(x)  W(x))]
Q(x) : x is not a blue color iii. Sentence is incorrect so cannot be translated into quantified expression.
x, P(x)  Q(x). iv. W(x) : x is water
d. P(x) : x drinks milk H(x) : x is hot
Q(x) : x eats crackers S(x) : x is Shyam
for x, if P(x) then Q(x). P(x) : x will swim in pool
or x, P(x)  Q(x). x [((W(x)  H(x))  (S(x)  P(x))]
e. P(x) : x is a mathematics book v. E(x) : x is even
Q(x) : x is published outside India O(x) : x is odd
x P(x)  Q(x). x (E(x)  O(x))
f. P(x) : x is a book having bibliography ~ x, P(x).

Que 4.19.
VERY IMPORTANT QUESTIONS
i. Express this statement using quantifiers : “Every student in
this class has taken some course in every department in the Following questions are very important. These questions
school of mathematical sciences”. may be asked in your SESSIONALS as well as
ii. If  x yP( x , y) is true, does it necessarily follow that yP( x , y) is UNIVERSITY EXAMINATION.
true ? Justify your answer.

Answer Q. 1.Explain the following terms with suitable example :


i.Conjunction
i.  x p(x)   z Q(y, z) ii.Disjunction
where P(x) is student of class. iii.Conditional
iv. Converse
Q(y, z) is the course from department.
v.Contrapositive
ii. Let P(x, y) be x + y = 3 and x, y belong to some set of integers  xyP ( x, y) is Ans. Refer Q. 4.5.
true means for all x there exists some y for which x + y = 3 is true but for
all y we conclude that P(x, y) will not be true. Q. 2. Show that ((p  q)  ~ (~p  (~q  ~r))) (~p  ~q)  (~ p  r) is
a tautology without using truth table.
Que 4.20. Trans late the following sentences in quantified Ans. Refer Q. 4.10.
expressions of predicate logic.
i. All students need financial aid. Q. 3. “If the labour market is perfect then the wages of all persons
ii. Some cows are not white. in a particular employment will be equal. But it is always
iii. Suresh will get if division if and only if he gets first div. the case that wages for such persons are not equal therefore
iv. If water is hot, then Shyam will swim in pool. the labour market is not perfect”. Test the validity of this
v. All integers are either even or odd integer. argument using truth table.
Ans. Refer Q. 4.11.
AKTU 2017-18, Marks 07
Q. 4. What is a tautology, contradiction and contingency ? Show
that (p  q)  ( p  r)  (q  r) is a tautology, contradiction
or contingency.
4–20 C (CS/IT-Sem-3) Propositional Logic & Predicate Logic Discrete Structures & Theory of Logic 5–1 C (CS/IT-Sem-3)

Ans. Refer Q. 4.12.

5
Q. 5. Show that the premises “It is not sunny this afternoon and
it is colder than yesterday,” “We will go swimming only if it
is sunny,” “If we do not go swimming, then we will take a
canoe trip.” and “If we take a canoe trip, then we will be
home by sunset” lead to the conclusion “We will be home by Trees, Graph and
sunset.” UNIT
Ans. Refer Q. 4.13. Combinatorics
Q. 6. Show that : (r  ~ q, r  S, S  ~ q, p  q)  ~ p are
inconsistent.
Ans. Refer Q. 4.14.

Q. 7. Write the s ymbolic form and negate the following


statements : CONTENTS
a. Everyone who is healthy can do all kinds of work.
b. Some people are not admired by everyone. Part-1 : Trees : Definition, ...................................... 5–2C to 5–4C
c. Everyone should help his neighbours, or his neighbours Binary Tree
will not help him.
Ans. Refer Q. 4.17. Part-2 : Binary Tree Traversal .............................. 5–5C to 5–8C

Q. 8. Express the following statements using quantifiers and Part-3 : Binary Search Tree ................................. 5–8C to 5–12C
logical connectives.
a. Mathematics book that is published in India has a blue Part-4 : Graphs : Definition ................................ 5–12C to 5–15C
cover. and Terminology
b. All animals are mortal. All human being are animal. Representation of Graph
Therefore, all human being are mortal.
c. There exists a mathematics book with a cover that is not Part-5 : Multigraph Bipartite .............................. 5–15C to 5–24C
Graphs, Planar Graph
blue.
Isomorphism and
d. He eats crackers only if he drinks milk.
Homomorphism of Graphs
e. There are mathematics books that are published outside
India. Part-6 : Graph Coloring ....................................... 5–24C to 5–24C
f. Not all books have bibliographies.
Ans. Refer Q. 4.18. Part-7 : Recurrence Relation and ..................... 5–24C to 5–36C
Generating Function :
Q. 9. Translate the following sentences in quantified expressions Recursive Definition of
of predicate logic. Function, Recursive
i. All students need financial aid. Algorithms, Method of Solving
ii. Some cows are not white. Recurrences, Combinatorics :
iii. Suresh will get if division if and only if he gets first div. Introduction, Counting Techniques,
iv. If water is hot, then Shyam will swim in pool. Pigeonhole Principle
v. All integers are either even or odd integer.
Ans. Refer Q. 4.20.


5–2 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–3 C (CS/IT-Sem-3)

iv. Complete binary tree : A binary tree is said to be complete binary


PART-1 tree if all its levels, except the last, have maximum number of possible
nodes (i.e., 2), and if all the nodes at the last level appear as far left as
Trees : Definition, Binary Tree. possible.

Questions-Answers
b c
Long Answer Type and Medium Answer Type Questions
d e
h i

Que 5.1. Explain the following terms : f g j

i. Tree Fig. 5.1.3.


ii. Forest It is represented as Tn where n is number of nodes.
iii. Binary tree v. Full binary tree : A binary tree is said to be extended or full binary tree
iv. Complete binary tree if each node has either 0 or 2 children.
v. Full binary tree
a
Answer
b c
i. Tree :
1. A tree is a connected graph that contains no cycle or circuit. It is a d e
simple graph having no self loop or parallel edges. g
f
2. A tree contains a finite set of elements which are called vertices or
Fig. 5.1.4.
nodes. The vertex can have minimum degree 1 and maximum
degree n.
Que 5.2. Consider the tree given below :
3. The number of vertices in a tree is called order of tree.
4. A tree with only one vertex is called trivial or degenerate or empty
tree. a

b c

d j k

Fig. 5.1.1. e f
l
ii. Forest : A forest is a collection of disjoint tree. It is an undirected, g h
disconnected, acyclic graph. i
Fig. 5.2.1.

i. Which node is root ?


Fig. 5.1.2. ii. Which nodes are leaves ?
iii. Binary tree : Binary tree is the tree in which the degree of every iii. Name parent node of each ?
node is less than or equal to 2. A tree consisting of no nodes is also a iv. List children of each node.
binary tree.
5–4 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–5 C (CS/IT-Sem-3)

v. List the siblings.


vi. Find depth of each node. PART-2
vii. Find level of each node. Binary Tree Traversal.

Answer
i. The node a is the root node. Questions-Answers
ii. The node g, h, i, j and l are leaves.
Long Answer Type and Medium Answer Type Questions
iii. Nodes Parent node
b, c a
d b Que 5.3. Define preorder, inorder, and postorder tree traversal.
j, k c
e, f d Give an example of preorder, postorder, and inorder traversal of a
g, h e binary tree of your choice with at least 12 vertices.
i f OR
l k Explain in detail about the binary tree traversal with an example.
AKTU 2016-17, Marks 10
iv. Nodes Children
a b, c Answer
b d
Tree traversal : A traversal of tree is a process in which each vertex is
c j, k
visited exactly once in a certain manner. For a binary tree we have three
d e, f
e g, h types of traversal :
f i 1. Preorder traversal : Each vertex is visited in the following order :
k l a. Visit the root (N).
v. b and c b. Visit the left child (or subtree) of root (L).
e and f c. Visit the right child (or subtree) of root (R).
g and h 2. Postorder traversal :
a. Visit the left child (subtree) of root.
j and k
b. Visit the right child (subtree) of root.
vi. Nodes Depth c. Visit the root.
3. Inorder traversal :
a 1
b, c 2 a. Visit the left child (subtree) of root.
d, j, k 3 b. Visit the root.
e, f, l 4 c. Visit the right child (subtree) of root.
g, h, i 5 A binary tree with 12 vertices :

vii. Nodes Level A


B C
a 0
D G
b, c 1
E F
d, j, k 2 H I
e, f, l 3
J K L
g, h, i 4
Fig. 5.3.1.
5–6 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–7 C (CS/IT-Sem-3)

Preorder (NLR) : A B D H I E J C F K L G Therefore, the complete binary will look like


Inorder (LNR) : HDIBJEAKFLCG G
Postorder (LRN) : H I D J E B K L F G C A
P
Que 5.4. Construct a tree whose inorder and preorder traversal B
are as follows :
Inorder : Q B A G C P E D R C D
Q A
Preorder : G B Q A P C D E R

Answer
E R
Root is G. Fig. 5.4.4.

G Que 5.5. Define a binary tree. A binary tree has 11 nodes. It’s
inorder and preorder traversals node sequences are :
Fig. 5.4.1.
Preorder : A B D H I E J L C F G
Element to left of G in inorder traversal are Q B A and B comes first in Inorder : H D I B J E K A F C G
preorder traversal. Therefore tree will be
Draw the tree. AKTU 2018-19, Marks 07
G
Answer
Binary tree : Refer Q. 5.1(iii), Page 5–2C, Unit-5.

B Numerical :
Step 1 : In preorder sequence, leftmost element is the root of the tree. By
searching A in ‘Inorder Sequence’ we can find out all the elements on the left
Q A and right sides of ‘A’.

Fig. 5.4.2. A

Now elements on the right of G in inorder traversal are CPEDR and P comes HDIBJEK FCG
first. Therefore tree will be
Step 2 : We recursively follow the above steps and we get
A
G

B C
A
B P
B C D E F G

Q A HDI JEK F G H I J K
Fig. 5.4.3.
Que 5.6. Given the inorder and postorder traversal of a tree T :
Now element to left of P in inorder traversal is C and to the right is EDR
(right subtree) out of DER, D comes first and E and R on its left and right Inorder : HFEABIGDC Postorder : BEHFACDGI
respectively. Determine the tree T and it's Preorder. AKTU 2017-18, Marks 07
5–8 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–9 C (CS/IT-Sem-3)

Answer Answer
The root of tree is I. Binary search tree :
I 1. A binary search tree is a binary tree T in which data is associated with
Now elements on right of I are D, G, C and G comes last of all in postorder the vertices.
traversal. 2. The data are arranged so that, for each vertex v in T, each data item in
I the left subtree of v is less than the data item in v and each data item
G in the right subtree of v is greater than the data item in v.
Now D and C are on right of G and D comes last of G and I postorder 3. The binary tree T in Fig. 5.7.1, is a binary search tree since every
traversal so vertex in T exceeds every number in its left subtree and is less than
every number in its right subtree.
I

G
50

D
40 70
C

Now element left of I are H F E A B in inorder traversal and A comes last of 75


30 45
all in postorder traversal. Therefore tree will be
I 65
G
42
A D Fig. 5.7.1. A binary search tree.
C
Numerical :
Now H F E are on left of A in inorder traversal and B comes last of all and
1. To start, create a vertex and place the first item in the list in this vertex
continuing in same manner. We will get final binary tree as
and assign this as the key of the root.
I
vireo
G
A
D 2. To add warbler, compare it with vireo. Warbler is greater than vireo,
F B C therefore it will be in the right of vireo. i.e.,
H E vireo
Preorder traversal of above binary tree is CAFHEBDGI
warbler
PART-3 3. Similarly by doing the above steps for rest of words we get the final
binary search tree that is given below :
Binary Search Tree.
vireo

Questions-Answers egret warbler

Long Answer Type and Medium Answer Type Questions grosbeak

Que 5.7. What is a binary search tree ? Form a binary search nuthatch

tree for the words vireo, warbler, egret, grosbeak, nuthatch, and
kingfisher
kingfisher. Explain each step.
5–10 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–11 C (CS/IT-Sem-3)

3. Insert 63 :
Que 5.8. Write algorithm for following :
55
i. Searching and inserting a node in BST
ii. Deleting a node in BST
20 63
Answer 4. Insert 10 :
i. Searching and inserting a node in BST : 55
Consider a binary search tree T and we have to insert or search an ITEM in
the tree. 20 63

Step I : Compare ITEM with the root of the tree


10
a. If ITEM < root, proceed to the left child of N.
5. Insert 28 :
b. If ITEM > root, proceed to the right child of N.
55
Step II : Repeat Step I and if
a. We reach a node N such that ITEM = N then search is successful. 20 63
b. We reach an empty subtree, which shows the search is successful.
Insert ITEM in place of empty subtree. 10 28
ii. Deleting a node in BST : 6. Insert 60 :
Consider a binary search tree T and we have to delete an ITEM from the 55
tree.
Step I : Find the location of node which contain ITEM and also keep track of 63
20
its parent too.
Step II : Find the number of children of the node.
10 28 60
a. If node has no children then simply delete the node.
7. Insert 93 :
b. If the node has exactly one child then the node is deleted from tree by
replacing the node from its child. 55
c. If the node has two children then
63
i. Find its inorder successor. 20
ii. Delete the successor from tree using (a) or (b).
iii. Replace node by its successor in tree. 10 28 60 93
Que 5.9. Draw a binary search tree by inserting following 8. Insert 5 :
integers 55, 20, 63, 10, 28, 60, 93, 5, 11, 40, 68, 25.
55
Answer 63
20
1. Insert 55 :
55
10 28 60 93
2. Insert 20 :
55
5
20
5–12 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–13 C (CS/IT-Sem-3)

9. Insert 11 :
Questions-Answers
55

63 Long Answer Type and Medium Answer Type Questions


20

10 28 60 93 Que 5.10. What do you mean by graph ? Also, explain directed and
undirected graph.
5 11
Answer
10. Insert 40 :
A graph is a non-linear data structure consisting of nodes and edges. A graph
55 consists of two sets as follows :
1. Set V of nodes or point or vertices of graph G.
20 63
2. Set E of ordered or unordered pairs of distinct edges of G.
We denote such a graph by G(V, E) and set of vertices as V(G) and set of
edges as E(G).
10 28 60 93
For example :
V4 c V3

5 11 40 e
d b
11. Insert 68 :
V1 V2
55 a
Fig. 5.10.1.
20 63
Order : If G is finite then number of vertices in G denoted by |V (G)| is
called order of G.
10 28 60 93 Size : The number of edges denoted by |E(G)|in a finite graph G is called
size of G.
Directed graph : A graph G(V, E) is said to be directed graph or digraph if
5 11 40 68 each edge e  E is associated with an ordered pair of vertices as shown
12. Insert 25 : below :
c
55

20 63

a b
10 28 60 93 Fig. 5.10.2.
Undirected graph : A graph G(V, E) is said to be undirected if each edge
e  E is associated with an unordered pair of vertices as shown below :
5 11 25 40 68 a b

PART-4
Graphs : Definition and Terminology, Representation of Graph. c d
Fig. 5.10.3.
5–14 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–15 C (CS/IT-Sem-3)

ii. Representation of directed graph :


Que 5.11. Discuss representation of graph.
The incidence matrix I(D) = [bij] of digraph D with n vertices
and m edges is the n × m matrix in which.
Answer
bij = 1 if arc j is directed away from a vertex vi
Graph can be represented in following two ways :
= – 1 if arc j is directed towards vertex vi
1. Matrix representation :
= 0 otherwise.
Matrices are commonly used to represent graphs for computer
processing. Advantages of representing the graph in matrix lies in the Find the incidence matrix to represent the graph shown in
fact that many results of matrix algebra can be readily applied to study Fig. 5.11.2.
the structural properties of graph from an algebraic point of view. v1 e1 v2
a. Adjacency matrix :
i. Representation of undirected graph :
e4 e5 e2
The adjacency matrix of a graph G with n vertices and no
parallel edges is a n × n matrix A = [aij] whose elements are
given by
aij = 1, if there is an edge between ith and jth vertices v4 e3 v3
= 0, if there is no edge between them Fig. 5.11.2.
ii. Representation of directed graph : The incidence matrix of the digraph of Fig. 5.11.2 is
The adjacency matrix of a digraph D, with n vertices is the
 1 0 0 1 1
matrix
 1 1 0 0 0 
A = [aij]n×n in which I(D) =  
 0 1 1 0  1
aij = 1 if arc (vi, vj) is in D  
 0 0 1 1 0
= 0 otherwise
2. Linked representation : In this representation, a list of vertices
For example :
adjacent to each vertex is maintained. This representation is also called
V1 V4 adjacency structure representation. In case of a directed graph, a care
has to be taken, according to the direction of an edge, while placing a
vertex in the adjacent structure representation of another vertex.
V2 V3
Fig. 5.11.1.
v1 v2 v3 v4
PART-5
v1 0 1 1 1 Multigraph, Bipartite Graphs, Planar Graph,
 0 1 0  Isomorphism and Homomorphism of Graphs.
A = v2 1
v3 1 1 0 1
 
v4 1 0 1 0
Questions-Answers
b. Incidence matrix :
i. Representation of undirected graph : Long Answer Type and Medium Answer Type Questions
Consider an undirected graph G = (V, E) which has n vertices
and m edges all labelled. The incidence matrix I(G) = [bij], is
then n × m matrix, where Que 5.12. Write short notes on :
bij = 1 when edge ej is incident with vi a. Simple and multigraph
= 0 otherwise b. Complete graph and regular graph
5–16 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–17 C (CS/IT-Sem-3)

c. Bipartite graph The graphs shown in Fig. 5.12.4 are 2-regular graphs.
d. Planar graph The graph shown in Fig. 5.12.5 is 3-regular graph.
Answer
a. Simple and multigraph :
i. Simple graph : A graph in which there is only one edge between
Fig. 5.12.5.
a pair of vertices is called a simple graph.
c. Bipartite graph :
e
i. Bipartite graph : A graph G = (V, E) is bipartite if the vertex set
V1 V2 V can be partitioned into two subsets (disjoint) V1 and V2 such that
Fig. 5.12.1. every edge in E connects a vertex in V1 and a vertex V2 (so that no
edge in G connects either two vertices in V1 or two vertices in V2).
ii. Multigraph : Any graph which contains some parallel edges is
(V1, V2) is called a bipartition of G.
called a multigraph.
e3 x1 x2 x3 x1 x2 x3 x4
V4 V3 which
x4
redrawn
e4 e2 as :
y1 y2 y3 y1 y2 y3
V1 V2
e1 Fig. 5.12.6. Some bipartite graphs.
Fig. 5.12.2.
ii. Complete bipartite graph : The complete bipartite graph on m
b. Complete graph and regular graph : and n vertices, denoted Km, n is the graph, whose vertex set is
i. Complete graph : A simple graph, in which there is exactly one partitioned into sets V1 with m vertices and V2 with n vertices in
edge between each pair of distinct vertices is called a complete which there is an edge between each pair of vertices 1 and 2
graph. The complete graph of n vertices is denoted by Kn. The where 1 is in V1 and 2 is in V2. The complete bipartite graphs
graphs K1 to K5 are shown below in Fig. 5.12.3. K2,3, K2,4, K 3,3, K3,5, and K2,6

K2,3 K2,4 K3,3


K1 K2 K3 K4 K5
Fig. 5.12.3.
n(n – 1) n
Kn has exactly = C2 edges
2 K3,5 K2,6
ii. Regular graph (n-regular graph) : If every vertex of a simple Fig. 5.12.7. Some complete bipartite graphs.
graph has equal edges then it is called regular graph.
d. Planar graph :
If the degree of each vertex is n then the graph is called n-regular
graph. A graph G is said to be planar if there exists some geometric
representation of G which can be drawn on a plane such that no two of
its edges intersect except only at the common vertex.
i. A graph is said a planar graph, if it cannot be drawn on a plane
without a crossover between its edges crossing.
(a) (a) (c) ii. The graphs shown in Fig. 5.12.8(a) and (b) are planar graphs.
Fig. 5.12.4.
5–18 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–19 C (CS/IT-Sem-3)

(a) (b ) (c )
Fig. 5.14.2.
(a) (b )
Fig. 5.12.8. Some planar graph. Que 5.15. Prove that K3 and K4 are planar graphs. Prove that K5 is

Que 5.13. Define the following with one example : non-planar.

i. Bipartite graph Answer


ii. Complete graph
The complete K3 graph has 3 edges and 3 vertices.
iii. How many edges in K7 and K3, 6
For a graph to be planar 3 – e  6
iv. Planar graph AKTU 2017-18, Marks 10
3 – e = 3 × 3 – 3 = 9 – 3 = 6  6
Answer  K3 is planar graph

i. Refer Q. 5.12(c), Page 5–15C, Unit-5. Similarly complete K4 graph has 4 vertices and 6 edges.

ii. Refer Q. 5.12(b), Page 5–15C, Unit-5. 3 – e = 3 × 4 – 6 = 12 – 6 = 6  6

iii. Number of edge in K7 : Since, Kn is complete graph with n vertices.  K4 is planar graph
The complete K5 graph contains 5 vertices and 10 edges.
7(7  1) 7  6
Number of edge in K7 =  = 21 Now 3 – e = 3 × 5 – 10 = 15 – 10 = 5  6
2 2
Hence K5 is non planar since for a graph to be planar 3v – e  6.
Number of edge in K3, 6 :
Since, Kn, m is a complete bipartite graph with n  V1 and m  V2 Que 5.16. What are Euler and Hamiltonian graph ?
Number of edge in K3, 6 = 3 × 6 = 18 OR
iv. Refer Q. 5.15(d), Page 5–18A, Unit-5. Explain the following terms with example :
i. Homomorphism and Isomorphism graph
Que 5.14. Explain isomorphism and homomorphism of graph. ii. Euler graph and Hamiltonian graph
iii. Planar and Complete bipartite graph
Answer AKTU 2014-15, Marks 10
Isomorphism of graph : Two graphs are isomorphic to each other if :
Answer
i. Both have same number of vertices and edges.
ii. Degree sequence of both graphs are same (degree sequence is the i. Refer Q. 5.14, Page 5–18C, Unit-5.
sequence of degrees of the vertices of a graph arranged in non-increasing ii. Eulerian path : A path of graph G which includes each edge of G
order). exactly once is called Eulerian path.
Eulerian circuit : A circuit of graph G which include each edge of G exactly
Example : once.
Eulerain graph : A graph containing an Eulerian circuit is called Eulerian
graph.
For example : Graphs given below are Eulerian graphs.
V1 V3 A B
Fig. 5.14.1. V2
Homomorphism of graph : Two graphs are said to be homomorphic if one
graph can be obtained from the other by the creation of edges in series (i.e., V5 V4 D C
by insertion of vertices of degree two) or by the merger of edges in series. Fig. 5.16.1.
5–20 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–21 C (CS/IT-Sem-3)

Hamiltonian graph : A Hamiltonian circuit in a graph G is a closed path 4. If we travel along the trail then each time we visit a vertex. We use
that visit every vertex in G exactly once except the end vertices. A graph G is two edges, one in and one out.
called Hamiltonian graph if it contains a Hamiltonian circuit. 5. This is also true for the start vertex because we also end there.
For example : Consider graphs given below : 6. Since an Eulerian trail uses every edge once, the degree of each
D C D C vertex must be a multiple of two and hence there are no vertices of
F odd degree.
7. Now we shall prove that if a non-empty connected graph has no
E vertices of odd degree then it is Eulerian.
A B A B
(a) (b ) 8. Let every vertex of G have even degree.
Fig. 5.16.2.
9. We will now use a proof by mathematical induction on |E(G)|, the
Graph given is Fig. 5.16.2(a) is a Hamiltonian graph since it contains a number of edges of G.
Hamiltonian circuit A – B – C – D – A while graph in Fig 5.15.2(b) is not a
Basis of induction :
Hamiltonian graph.
Let |E(G)| = 0, then G is the graph K1, and G is Eulerian.
Hamiltonian path : The path obtained by removing any one edge from a
Hamiltonian circuit is called Hamiltonian path. Hamiltonian path is subgraph Inductive step :
of Hamiltonian circuit. But converse is not true. 1. Let P(n) be the statement that all connected graphs on n edges of
even degree are Eulerian.
The length of Hamiltonian path in a connected graph of n vertices is
n – 1 if it exists. 2. Assume P(n) is true for all n < |E(G)|.
iii. Refer Q. 5.12, Page 5–15C, Unit-5. 3. Since each vertex has degree at least two, G contains a cycle C.
4. Delete the edges of the cycle C from G.
Que 5.17.
5. The resulting graph, G say, may not be connected.
a. Prove that a connected graph G is Euler graph if and only if
6. However, each of its components will be connected, and will have
every vertex of G is of even degree.
fewer than |E(G)| edges.
b. Which of the following simple graph have a Hamiltonian circuit
7. Also, all vertices of each component will be of even degree, because
or, if not a Hamiltonian path ? AKTU 2016-17, Marks 15 the removal of the cycle either leaves the degree of a vertex
unchanged, or reduces it by two.
a b a b a b g
8. By the induction assumption, each component of G is therefore
Eulerian.
9. To show that G has an Eulerian trail, we start the trail at a vertex,
u say, of the cycle C and traverse the cycle until we meet a vertex,
e c d c
d c e
f c1 say, of one of the components of G .
10. We then traverse that component’s Eulerian trail, finally returning
d
to the cycle C at the same vertex, c1.
G1 G2 G3 11. We then continue along the cycle C, traversing each component of
G  as it meets the cycle.
Fig. 5.17.1.
12. Eventually, this process traverses all the edges of G and arrives
back at u, thus producing an Eulerian trail for G.
Answer
13. Thus, G is Eulerian by the principle of mathematical induction.
a.
b. G1 : The graph G1 shown in Fig. 5.17.1 contains Hamiltonian circuit, i.e.,
1. First of all we shall prove that if a non-empty connected graph is
a – b – c – d – e – a and also a Hamiltonian path, i.e., abcde.
Eulerian then it has no vertices of odd degree.
G2 : The graph G2 shown in Fig. 5.17.1 does not contain Hamiltonian
2. Let G be Eulerian.
circuit since every cycle containing every vertex must contain the edge
3. Then G has an Eulerian trail which begins and ends at u. e twice. But the graph does have a Hamiltonian path a – b – c – d.
5–22 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–23 C (CS/IT-Sem-3)

G3 : The graph G3 shown in Fig. 5.17.1 neither have Hamiltonian circuit 1


nor have Hamiltonian path because any traversal does not cover all the  (n – k)(n – k + 1) by using eq. (5.18.1)
2
vertices.
Que 5.19. What are different ways to represent a graph ? Define
Que 5.18. Prove that a simple graph with n vertices and k
Euler circuit and Euler graph. Give necessary and sufficient
(n  k) ( n  k  1) conditions for Euler circuits and paths. AKTU 2018-19, Marks 07
components can have at most edges.
2
AKTU 2016-17, Marks 10 Answer
Representation of graph : Refer Q. 5.11, Page 5–14C, Unit-5.
Answer
Euler circuit and Euler graph : Refer Q. 5.16, Page 5–19C, Unit-5.
Let the number of vertices in each of the k-components of a graph G be n1,
n2, ...., nk, then we get Necessary and sufficient condition for Euler circuits and paths :
n1 + n2 + ... + nk = n where ni  1 (i = 1, 2, ..., k) 1. A graph has an Euler circuit if and only if the degree of every vertex is
k k even.
 n  1 = n – k
k
Now,  (n
i 1
i  1) =
i 1
i
i 1
2. A graph has an Euler path if and only if there are at most two vertices
with odd degree.
2
 k 
   (ni  1) = n + k – 2nk
2 2 Que 5.20. Define and explain any two the following :
i 1
1. BFS and DFS in trees
k k
2. Euler graph
or  (n
i 1
i  1)  2  (ni  1)(n j  1) =
2

i 1 j 1
n2 + k2 – 2nk
i j
3. Adjacency matrix of a graph AKTU 2017-18, Marks 07
k

or  (n
i 1
i  1)2 + 2(non-negative terms) = n2 + k2 – 2nk Answer
1. Breadth First Search (BFS) : Breadth First Search (BFS) is an
[ ni – 1  0, nj – 1  0]
algorithm for traversing or searching tree or graph data structures. It
k
or  (n
i 1
i  1)2  n2 + k2 – 2nk starts at the tree root and explores the neighbour nodes first, before
moving to the next level neighbours.
k k k Algorithmic steps :
or  n   1  2 n
i 1
2
i
i 1 i 1
i  n2 + k2 – 2nk Step 1 : Push the root node in the queue.
Step 2 : Loop until the queue is empty.
k Step 3 : Remove the node from the queue.
or n
i 1
2
i  k  2n  n2 + k2 – 2nk Step 4 : If the removed node has unvisited child nodes, mark them as
k
visited and insert the unvisited children in the queue.
or n 2
i  n  n2 + k2 – 2nk – k + n Depth First Search (DFS) :
i 1 Depth First Search (DFS) is an algorithm for traversing or searching
= n(n – k + 1) – k (n – k + 1) tree or graph data structures. One starts at the root (selecting some
= (n – k)(n – k + 1) ...(5.18.1) arbitrary node as the root in the case of a graph) and explores as far as
We know that the maximum number of edges in the ith component of possible along each branch before backtracking.
Algorithmic steps :
ni ni (ni  1)
G= C2 = Step 1 : Push the root node in the stack.
2 Step 2 : Loop until stack is empty.
Therefore, the maximum number of edges in G is : Step 3 : Pick the node of the stack.

 n   n   n 
1 1 1 Step 4 : If the node has unvisited child nodes, get the unvisited child
2
 ni (ni  1) = 2 2
i i =
2
2
i n node, mark it as traversed and push it on stack.
5–24 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–25 C (CS/IT-Sem-3)

Step 5 : If the node does not have any unvisited child nodes, pop the recurrence relation. Recurrence relations are also called difference equations
node from the stack. because they can be written in terms of the difference between the
2. Refer Q. 5.16, Page 5–19C, Unit-5. consecutive terms of a sequence.
3. Refer Q. 5.11, Page 5–14C, Unit-5. For example : ar = 4ar – 1 r1
ar = ar – 1 – 2ar – 2 r2
PART-6 are recurrence relations.
Graph Coloring. Order of recurrence relation : The difference between the highest and
lowest subscripts of ar or f(x) or yn is called the order of recurrence relation.
For example :
Questions-Answers 1. The equation 13ar + 12ar – 1 = 0 is of order 1 (i.e., r – (r – 1) = 1).
2. The equation 8 f(x) + 2 f(x + 1) + f(x + 2) = k(x) is of order 2
Long Answer Type and Medium Answer Type Questions (i.e., (x + 2) – x = 2).
Degree of recurrence relation : The highest power of ar or f(x) or yn is
called degree of recurrence relation.
Que 5.21. Write a short note on graph coloring.
For example :
1. The equation y3k + 2 + 2y2k + 1 – yk = 0 has the degree 3 as the highest
Answer
power of yk is 3.
1. Suppose that G (V, E) is a graph with no multiple edges, a vertex colouring
2. The equation a4r + 2a3r – 1 + 3a2r – 2 + 4ar – 3 = 0 has the degree 4, as the
of G is an assignment of colours.
highest power of ar is 4.
2. A graph G is m-colourable if there exists a colouring of G which uses m
colours. Que 5.23. What do you mean generating function ? Solve the
3. Colouring the vertices such a way such that no two adjacent vertices recurrence relation :
have same colour is called proper colouring otherwise it is called an = 2 an–1 – an–2, n  2 given a0 = 3, a1 = – 2
improper colouring. using generating function.

Answer
PART-7
Generating function : The generating function for the sequence a0, a1, ...
Recurrence Relation and Generating Function : Recursive ak, ... of real numbers is infinite series given by
Definition of Function, Recursive Algorithms, Method of 

Solving Recurrences, Combinatorics : Introduction, G(x) = a0 + a1x + a2x2 + ...... + akxk + ...... = a x
k0
k
k

Counting Techniques, Pigeonhole Principle.


x is considered just a symbol called indeterminate and it is not variable, which
is replaced by numbers belonging to same domain.
The given recurrence relation is,
Questions-Answers
an = 2an–1 – an–2, n  2 ...(5.23.1)
Long Answer Type and Medium Answer Type Questions Multiply by xn and take summation from n = 2 to  , we get
  

a x
n 2
n
n
= 2  an 1 x   an  2 x
n2
n n

n 2
...(5.23.2)

Que 5.22. Write a short note on recurrence relation.
We know, G(x) = a
n 0
n x n  a0  a1 x  a2 x 2  a3 x3  ... ...(5.23.3)

Answer From eq. (5.23.2), we have


For a sequence of numbers or numeric function (a0, a1, a2,... ar, ....) an (a2x2 + a3 x3+ ...) = 2 (a1x2 + a2 x3 + ...) – (a0 x2 + a1x3 + ....)
equation relating ar, for any r, to one or more of the ais, i < r is called (a2x2 + a3 x3+ ...) = 2x (a1x + a2 x2 + ...) – x2 (a0 + a1 x + ....)
5–26 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–27 C (CS/IT-Sem-3)

Using eq. (5.23.3), we get


t2
G(x) – a0 – a1x = 2x (G(x) – a0) – x2 G(x) A = (1 – 5t)
(1 – 5t)(1 – 3t)(1 – 2t) t  1/5
G(x) – 3 + 2x = 2x (G(x) – 3) – x2 G(x)
G(x)[1 – 2x + x2] = 3 – 8x t2
=
3  8x 3  8x 3  8x 3 8x (1 – 3t)(1 – 2t) t  1/5
G(x) =   = 
x  2 x  1 ( x  1)
2 2
(1  x) 2
(1  x) 2
(1  x )2 1 / 25 1
 an= 3(n + 1) – 8n = 3 – 5n = =
(1 – 3 / 5)(1 – 2 / 5) 6
Que 5.24. Solve the recurrence relation yn + 2 – 5yn + 1 + 6yn = 5n t2
B = (1 – 3t)
(1 – 5t)(1 – 3t)(1 – 2t) t  1/3
subject to the condition y0 = 0, y1 = 2. AKTU 2016-17, Marks 10
t2 1/9
Answer = =
(1 – 5t)(1 – 2t) t  1/3  3 – 5   3 – 2 
  
 3  3 
Let G(t) = a t
n 0
n
n
be generating function of sequence {an}.
= –
1
2
Multiplying given equation by tn and summing from
n = 0 to , we have t2
C = (1 – 2t)
   
(1 – 5t)(1 – 3t)(1 – 2t) t  1/2

n 0
an  2 t n – 5 
n 0
an  1 t n  6 
n 0
an t n  5
n 0
n
tn
=
t2
=
1/ 4
(1 – 5t)(1 – 3t) t  1/2 (2 – 5) (2 – 3)
G(t) – a0 – a1 t  G (t) – a0  1 
– 5   6 G (t )  2 2
t 2
 t  1 – 5t
1
Put a0 = 0 and a1 = 2 =
3
t2 Again,
G(t) – 2t – 5t G(t) + 6t2 G(t) =
1 – 5t 2t D E
= 
t 2 (1 – 3t)(1 – 2t) (1 – 3t) (1 – 2t)
G(t) – 5t G(t) + 6t2 G(t) = + 2t
1 – 5t 2t
D = (1 – 3t)
(1 – 3t)(1 – 2t) t  1/3
t2
G(t) (1 – 5t + 6t2) = + 2t
1 – 5t 2t 2/3
= = 2
t 2 (1 – 2t) t  1/3 (3 – 2)
(6t2 – 5t + 1) G(t) = + 2t 3
1 – 5t
2t
t2 2t E = (1 – 2t)
G(t) =  (1 – 3t)(1 – 2t) t  1/ 2
(1 – 5t)(3t – 1)(2t – 1) (3t – 1)(2t – 1)
t2 2t 2/2
= 
2t = = –2
(1 – 3t) t  1/ 2 2–3
(1 – 5t)(1 – 3t)(1 – 2t) (1 – 3t)(1 – 2t)
Let 2
1/ 6 1/ 2 1/3 2 2
t2 A B C G(t) = –   –
=   (1 – 5t) (1 – 3t) (1 – 2t) (1 – 3t) (1 – 2t)
(1 – 5t)(1 – 3t)(1 – 2t) (1 – 5t) (1 – 3t) (1 – 2t)
5–28 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–29 C (CS/IT-Sem-3)

1/6 3/2 5/3 3 – 18 x = A (2 x – 1) + B (5 x – 1)


=  –
1 – 5t (1 – 3t) 1 – 2t 1
put x=
    2
a  (5t)  (3t) 
1 3 5
tn = n
 n
– (2t)n 5  3
n
6 2 3 n 0 3 – 9 = B   1  – 6 = B B = – 4
n 0 n 0 n 0 2 2
1 3 5 1
 an = (5)n  (3) n – (2)n put x=
6 2 3 5
Que 5.25. Solve the recurrence relation by the method of 18 2  3 3
3– = A   1     A  1  A = 1
5  5  5 5
generating function :
ar – 7 ar–1 + 10ar–2 = 0, r  2. Given a0 = 3 and a1 = 3.  G(x) =
1

4
=
4

1
5 x  1 2x  1 1  2x 1  5x
AKTU 2014-15, Marks 10
 ar = 4.2r – 5r
OR
Solve the recurrence relation using generating function : Que 5.26. Solve the recurrence relation ar+2 – 5ar+1 + 6 ar = (r + 1)2.
an – 7an – 1 + 10an – 2 = 0 with a0 = 3, a1 = 3.
AKTU 2014-15, Marks 10
AKTU 2015-16, Marks 10
Answer
Answer
ar+2 – 5 ar+1 + 6 ar = (r + 1)2 = r2 + 2r + 1 ...(5.26.1)
ar – 7ar–1 + 10 ar–2 = 0, r  2
Now the characteristic equation is :
Multiply by xr and take sum from 2 to .
x2 – 5 x + 6 = 0
  
(x – 3) (x – 2) = 0  x = 3, 2
 ar xr  7  ar –1 xr  10  ar 2 xr  0
r2 r2 r2 The homogeneous solution is :
(a2 x2 + a3 x3 + a4 x4 + ....) – 7 (a1 x2 + a2 x3 + ....) ar(h) = C12r + C2 3r
+ 10 (a0 x2 + a1 x3 + ....) = 0 Let the particular solution be :
We know that ar(p) = A0 + A1r + A2r2
 From eq. (5.26.1)
G(x) =  ar xr  a0  a1 x  .... A0 + A1 (r + 2) + A2 (r + 2)2 – 5 {A0 + A1 (r + 1)} + A2 (r + 1)2}
r0
+ 6A0 + 6A1r + 6A2 r2
G(x) – a0 – a1 x – 7 x (G(x) – a0) + 10 x2 G(x) = 0
= r2 +2r+1
G(x) [1 – 7 x + 10 x2] = a0 + a1 x – 7 a0 x
(A0 + 2A1 + 4A2 –5A0 – 5A1 – 5A2 + 6A0) + r (A1 + 4A2 – 5A1 – 10A2 + 6A1)
= 3 + 3x – 21 x = 3 – 18 x
+ r2 ( A2 – 5A2 + 6A2) = r2 + 2r + 1
3  18 x 3  18 x
G(x) =  Comparing both sides, we get,
10 x  7 x  1 10 x  5 x  2 x  1
2 2

2A0 – 3A1 – A2 = 1 ...(5.26.2)


3  18 x 3  18 x
=  2A1 – 6A2 = 2 ...(5.26.3)
5 x (2 x  1)  1 (2 x  1) (5 x – 1)(2 x  1)
Now, 2A2 = 1  A2 = 1/2
3  18 x A B From eq. (5.26.3), 2A1 – 3 = 2
= 
(5 x  1) (2 x 1) 5 x 1 2 x 1 A1 =
5
2
5–30 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–31 C (CS/IT-Sem-3)

From eq. (5.26.2) r = 0 a0 = B1 + B2 B1 + B2 = 8 ...(5.27.4)


15 1 r = 1 a1 = 2B1 + 4B2 2B1 + 4B2 = 1 ...(5.27.5)
2A0 –  =1
2 2 31  15
Solving equations (5.27.4) and (5.27.5), we get B1 = B2 =
9 2 2
2A0 – 8 = 1  A0 = Complete solution is, ar = ar(h) + ar(p)
2
31 r 15 r   10    2   r
9 5 r2 ar = 2  4  r 2     r 4
 ar(p) =  r
2 2 2 2 2  17   17  
9 5 r2
The final solution is, ar = ar(h) + ar(p) = C1 2r + C2 3r + + r Que 5.28. Solve the recurrence relation : ar + 4ar – 2 + 4ar – 2 = r2.
2 2 2
Que 5.27. Solve ar – 6ar – 1 + 8ar – 2 = r.4r, given a0 = 8, and a1 = 1. AKTU 2017-18, Marks 07

AKTU 2017-18, Marks 07 Answer


ar + 4ar – 1 + 4ar – 2 = r2
Answer
The characteristic equation is,
ar – 6ar – 1 + 8ar – 2 = r4r x2 + 4x + 4 = 0
The characteristic equation is, x2 – 6x + 8 = 0, x2 – 2x – 4x + 8 = 0 (x + 2)2 = 0
(x – 2) (x – 4) = 0, x = 2, 4 x = –2, – 2
The solution of the associated non-homogeneous recurrence relation is, The homogeneous solution is, a(h) = (A0 + A1r) (– 2)r
ar(h) = B1(2)r + B2(4)r ...(5.27.1) The particular solution be, a(p) = (A0 + A1r) r2
Let particular solution of given equation is, ar(p) = r2(A0 + A1r)4r Put ar, ar – 1 and ar – 2 from a(p) in the given equation, we get
Substituting in the given equation, we get r2A0 + A1r3 + 4A0(r – 1)2 + 4A1(r – 1)3 + 4A0(r – 2)2 + 4A1(r – 2)3 = r2
 r2(A0 + A1r)4r – 6(r – 1)2 (A0 + A1(r – 1))4r – 1
+ 8(r – 2)2 (A0 + A1(r – 2)4r – 2 = r4r A0(r2 + 4r2 – 8r + 4 + 4r2 – 16r + 16) +
6 A1(r3 + 4r3 – 4 – 12r2 + 12r + 4r3 – 32 – 24r2 + 48r) = r2
 r 2A 0 + A 1r 3 – [(A0r2 – 2A0r + A0) + (A1r3 – A1 – 3A1r2 + 3A1r)2]
4 A0(9r2 – 24r + 20) + A1(9r3 – 48r2 + 60r – 36) = r2
8 Comparing the coefficient of same power of r, we get
+ 2 [(A0r2 – 4rA0 + 4A0) + (A1r3 – 8A1 – 6A1r\2 + 12A1r)] = r
4 9A0 – 48A1 = 1 ...(5.28.1)
3 3 3 3 20A0 – 36A1 = 0 ...(5.28.2)
 rA0 + A1r3 – A r2 + 3A0r – A – A r3 + A
2 0 2 0 2 1 2 1 3 5
9 9 1
Solving equation (5.28.1) and (5.28.2) A0 = A1 
+ A 1r 2 – A 1r + A r2 – 2A0r + 2A0 53 159
2 2 2 0 The complete solution is,
1
A r3 – 4A1 – 3A1r2 – 6A1r = r   3    5  
2 1
ar = ar(p) + ar(h) = (A0 + A1r) (– 2)r +     r  r2
 53   159  
1 5 3 3
 2A0r – A0r2 – A0 – A1 + A 1r 2 + A r=r Que 5.29.
2 2 2 2 1 Suppose that a valid codeword is an n-digit number in
Comparing both sides, we get decimal notation containing an even number of 0’s. Let an denote
3 the number of valid codewords of length n satisfying the recurrence
2A0 + A =1 ...(5.27.2)
2 1 relation an = 8an – 1 + 10n – 1 and the initial condition a1 = 9. Use
A0 + 5A1 = 0 ...(5.27.3) generating functions to find an explicit formula for an.
2  10
Solving equation (5.27.2) and (5.27.3), we get A1 = A0 = AKTU 2018-19, Marks 07
17 17
To find the value of B1 and B2 put r = 0 and r = 1 in equation (5.27.1)
5–32 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–33 C (CS/IT-Sem-3)

4. The number of combinations of n different thing taken r ( n) at a time


Answer is denoted by C(n, r) or nCr.
 The selection of two letters from three letters a, b, c are ab bc ca and thus,
Let G(x) = 
n 0
an xn be the generating function of the sequence a0, a1, a2 .... the number of combinations of 3 letters taken 2 at a time is C(3, 2) = 3
Difference between a permutation and combination :
we sum both sides of the last equations starting with n = 1. To find that
 
S. No. Permutation Combination
G(x) – 1 = n 1
an x n  
n 1
(8 an–1 x n  10 n–1 x n )
1. Both selection and arrangement Only selection is made.
are made.
 
= 8 
n 1
an–1 x n  10
n 1
n –1 n
x 2. Ordering of the selected object Ordering of the selected object is
is essential. not essential.
 
= 8x a
n 1
n –1 x
n –1
x 10
n 1
n –1 n –1
x 3. Multiple permutations can be
derive from combination.
Single combination is derive from
single permutation.
 
= 8x 
n 0
an x n  x  10
n 0
n
xn 4. nP
r =
n!
(n  r)!
nC
r =
n!
r !(n  r )!
= 8xG(x) + x/(1 – 10x)
Therefore, we have Que 5.31. Suppose that a cookie shop has four different kinds of
G(x) – 1 = 8xG(x) + x/(1 – 10x)
Expanding the right hand side of the equation into partial fractions gives cookies. How many different ways can six cookies be chosen ?
1 1 1  AKTU 2016-17, Marks 15
G(x) = 
2  1  8 x 1  10 x 

This is equivalent to Answer
As the order in which each cookie is chosen does not matter and each kind of
1 
 
G(x) = 
 8 x 
2  n 0
n n
 10 n x n 

cookies can be chosen as many as 6 times, the number of ways these cookies
can be chosen is the number of 6-combination with repetition allowed from
n 0
 a set with 4 distinct elements.

1 n The number of ways to choose six cookies in the bakery shop is the number
= (8  10n ) x n
n 0
2 of 6 combinations of a set with four elements.
C(4 + 6 – 1, 6) = C(9, 6)
1 n
an = (8  10n ) Since C(9, 6) = C(9, 3) = (9 · 8 · 7) / (1 · 2 · 3) = 84
2 Therefore, there are 84 different ways to choose the six cookies.
Que 5.30. Define permutation and combination. Also, write Que 5.32. Write short notes on the following :
difference between them.
i. Recursive algorithms ii. Pigeonhole principle
Answer
Answer
1. Permutation refers to different ways of arranging a set of object in a
i. Recursive algorithm :
sequential order.
A function is called recursively defined if the function refers to itself,
2. The number of permutations of n different things taken r ( n) at a
and satisfies the following step :
time is denoted by p(n, r) or nPr.
a. There must be certain arguments for which the function does not
3. Combination refers to several ways of choosing items from a large set
refer to itself, these arguments are called initial values (Base values).
of object.
5–34 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–35 C (CS/IT-Sem-3)

b. These base values are used to define the other values of the function Number of integers divisible by (2 and 5) = 25
by using the function recursively. Number of integers divisible by (2 and 7) = 17
Example : ar = 3 ar–1, r  1, a0 = 1 Number of integers divisible by (3 and 5) = 16
then a1 = 3a0 = 3 Number of integers divisible by (3 and 7) = 11
a2 = 3a1 = 3 (3a0) = 32 a0 = 32 Number of integers divisible by (5 and 7) = 7
and so on. Number of integers divisible by (2, 3 and 5) = 8
ar = 3r, r  0
Number of integers divisible by (2, 3, and 7) = 5
ii. Pigeonhole principle :
Number of integers divisible by (2, 5, and 7) = 3
The pigeonhole principle is sometime useful in counting methods.
Number of integers divisible by (3, 5 and 7) = 2
If n pigeons are assigned to m pigeonholes then at least one pigeonhole ––––
contains two or more pigeons (m < n). 135
––––
Proof :  Number of integers between 1 and 250 that are divisible by any of the
1. Let m pigeonholes be numbered with the numbers 1 through m. integer (2, 3, 5 and 7) = 293 – 135 = 158.
2. Beginning with the pigeon 1, each pigeon is assigned in order to the Que 5.34. How many different rooms are needed to assign 500
pigeonholes with the same number.
3. Since m < n i.e., the number of pigeonhole is less than the number of classes, if there are 45 different time periods during in the university
pigeons, n-m pigeons are left without having assigned a pigeonhole. time table that are available ?
4. Thus, at least one pigeonhole will be assigned to a more than one pigeon. Answer
5. We note that the pigeonhole principle tells us nothing about how to Using pigeonhole principle :
locate the pigeonhole that contains two or more pigeons.
 n  1  500  1 
6. It only asserts the existence of a pigeon hole containing two or more Here n = 500, m = 45 =   1    1
pigeons.  m   45 
At least 12 rooms are needed.
7. To apply the principle one has to decide which objects will play the role
of pigeon and which objects will play the role of pigeonholes. Que 5.35. A total of 1232 student have taken a course in Spanish,

Que 5.33. Find the number of integers between 1 and 250 that are 879 have taken a course in French, and 114 have taken a course in
Russian. Further 103 have taken courses in both Spanish and
divisible by any of the integers 2, 3, 5, and 7. French, 23 have taken courses in both Spanish and Russian, and 14
have taken courses in both French and Russian. If 2092 students
Answer
have taken least one of Spanish, French and Russian, how many
1, 2, 3, -------------- 250 students have taken a course in all three languages ?
Number of integers between 1 and 250 that are divisible by 2 :
Quotient of last number  2 – quotient of first number  2 AKTU 2018-19, Marks 07
(250  2 ) – (1  2) = 125 – 0 = 125
Answer
Number of integers between 1 and 250 that are divisible by 3
(250  3) – (1  3) = 83 – 0 = 83 Let S be the set of students who have taken a course in Spanish, F be the set
Number of integers between 1 and 250 that are divisible by 5 of students who have taken a course in French, and R be the set of students
(250  5) – (1  5) = 50 – 0 = 50 who have taken a course in Russian. Then, we have
Number of integers between 1 and 250 that are divisible by 7 |S| = 1232, |F| = 879, |R| = 114, |S  F| = 103, |S  R| = 23,
(250  7) – (1  7) = 35 – 0 = 5 |S R| = 14, and |SF R| = 23.
 Total number of integers divisible by only 2, 3, 5, 7, individually are Using the equation
125 + 83 + 50 + 35 = 293 |SF R| = |S|+ |F|+ |R| – |S  F| – |S  R| – |S  R| + |S
Number of integers divisible by (2 and 3) = 41 F R|,
5–36 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic 5–37 C (CS/IT-Sem-3)

2092 = 1232 + 879 + 114 – 103 – 23 – 14 +|SF R|, Q. 4.Define the following with one example :
|SF R| = 7. i.Bipartite graph
ii.Complete graph
|S  F| = 103 iii.How many edges in K7 and K3, 6
|S  F  R| = ?
iv. Planar graph
Ans. Refer Q. 5.13.

Q. 5.Explain the following terms with example :


i.Homomorphism and Isomorphism graph
ii.Euler graph and Hamiltonian graph
iii.Planar and Complete bipartite graph
Ans. Refer Q. 5.16.

Q. 6.
|S| = 1232 a. Prove that a connected graph G is Euler graph if and only if
|F| = 879 every vertex of G is of even degree.
b. Which of the following simple graph have a Hamiltonian
|S R| = 23
circuit or, if not a Hamiltonian path ?
|F  R| = 14
a b a b a b g
|R| = 114 |S  F R| = 2092
Fig. 5.35.1.

c d c f
e d c e

VERY IMPORTANT QUESTIONS


d
Following questions are very important. These questions G1 G2 G3
may be asked in your SESSIONALS as well as Fig. 1.
UNIVERSITY EXAMINATION.
Ans. Refer Q. 5.17.

Q. 7. Prove that a simple graph with n vertices and k components


Q. 1. Explain in detail about the binary tree traversal with an
example. (n  k) ( n  k  1)
can have at most edges.
Ans. Refer Q. 5.3. 2
Ans. Refer Q. 5.18.
Q. 2. Define a binary tree. A binary tree has 11 nodes. It’s inorder
and preorder traversals node sequences are : Q. 8. What are different ways to represent a graph ? Define Euler
Preorder : A B D H I E J L C F G circuit and Euler graph. Give necessary and sufficient
Inorder : H D I B J E K A F C G conditions for Euler circuits and paths.
Draw the tree.
Ans. Refer Q. 5.19.
Ans. Refer Q. 5.5.
Q. 9.Define and explain any two the following :
Q. 3. Given the inorder and postorder traversal of a tree T : 1.BFS and DFS in trees
Inorder : HFEABIGDC Postorder : BEHFACDGI 2.Euler graph
Determine the tree T and it's Preorder. 3.Adjacency matrix of a graph
Ans. Refer Q. 5.6. Ans. Refer Q. 5.20.
5–38 C (CS/IT-Sem-3) Trees, Graph and Combinatorics Discrete Structures & Theory of Logic SQ–1 C (CS/IT-Sem-3)

Q. 10. Solve the recurrence relation yn + 2 – 5yn + 1 + 6yn = 5n subject

1
to the condition y0 = 0, y1 = 2.
Ans. Refer Q. 5.24.
Set Theory, Functions
Q. 11. Solve the recurrence relation using generating function :
an – 7an – 1 + 10an – 2 = 0 with a0 = 3, a1 = 3. and Natural Numbers
Ans. Refer Q. 5.25.
(2 Marks Questions)
Q. 12. Solve the recurrence relation ar+2 – 5ar+1 + 6 ar = (r + 1)2.
Ans. Refer Q. 5.26.

Q. 13. Solve ar – 6ar – 1 + 8ar – 2 = r.4r, given a0 = 8, and a1 = 1. 1.1. What do you understand by partition of a set ?
Ans. Refer Q. 5.27. Ans. A partition of a set A is a collection of non-empty subsets A1,
A2, ......, An called blocks, such that each element of A is in exactly
Q. 14. Solve the recurrence relation : ar + 4ar – 2 + 4ar – 2 = r . 2 one of the blocks. i.e.,
Ans. Refer Q. 5.28. i. A is the union of all subsets A1  A2 ..... An = A.
ii. The subsets are pairwise disjoint, Ai  Aj =  for i  j.
Q. 15. Suppose that a valid codeword is an n-digit number in
decimal notation containing an even number of 0’s. Let an 1.2. Define transitive closure with suitable example.
denote the number of valid codewords of length n satisfying Ans. The relation obtained by adding the least number of ordered pairs
the recurrence relation an = 8an – 1 + 10n – 1 and the initial to ensure transitivity is called the transitive closure of the relation.
condition a1 = 9. Use generating functions to find an explicit The transitive closure of R is denoted by R+.
formula for an.
Ans. Refer Q. 5.29. 1.3. Let R be a relation on the set of natural numbers N, as
R = {(x, y) : x, y  N, 3x + y = 19}. Find the domain and range of
Q. 16. Suppose that a cookie shop has four different kinds of R. Verify whether R is reflexive. AKTU 2016-17, Marks 02
cookies. How many different ways can six cookies be
chosen ? Ans. By definition of relation,
R = {(1, 16), (2, 13), (3, 10), (4, 7), (5, 4), (6, 1)}
Ans. Refer Q. 5.31.
 Domain = {1, 2, 3, 4, 5, 6}
Q. 17. A total of 1232 student have taken a course in Spanish, 879  Range = {16, 13, 10, 7, 4, 1}
have taken a course in French, and 114 have taken a course R is not reflexive since (1, 1)  R.
in Russian. Further 103 have taken courses in both Spanish
and French, 23 have taken courses in both Spanish and 1.4. Show that the relation R on the set Z of integers given by
Russian, and 14 have taken courses in both French and R = {(a, b) : 3 divides a – b}, is an equivalence relation.
Russian. If 2092 students have taken least one of Spanish, AKTU 2016-17, Marks 02
French and Russian, how many students have taken a
course in all three languages ? Ans. Reflexive : a – a = 0 is divisible by 3
 (a, a)  R  a  Z
Ans. Refer Q. 5.35.
 R is reflexive.
Symmetric : Let (a, b)  R  a – b is divisible by 3
  – (a – b) is divisible by 3
 b – a is divisible by 3
 (b, a)  R
 R is symmetric.
Transitive : Let (a, b)  R and (b, c)  R
a – b is divisible by 3 and b – c is divisible by 3
SQ–2 C (CS/IT-Sem-3) 2 Marks Questions Discrete Structures & Theory of Logic SQ–3 C (CS/IT-Sem-3)

Then a – b + b – c is divisible by 3 Ans.


a – c is divisible by 3 i. We know that there are 52 weeks in a leap year.
 (a, c)  R  The cardinality of A is 52.
 R is transitive. ii. The positive divisors of 24 are 1, 2, 3, 4, 6, 8, 12, 24.
Hence, R is equivalence relation.  |B|= 8
iii. The set C has only one element.
1.5. Mention some properties of cartesian product.  |C| = 1
Ans. For the four sets A, B, C and D iv. The set D has only one element.
i. (A  B) × (C  D) = (A × C)  (B × D)  |D| = 1
ii. (A – B) × C = (A × C) – (B × C)
iii. (A  B) × C = (A × C)  (B × C) 1.11. If the function f : R  R defined by f(x) = x2, find f–1 (4) and
iv. A × (B C) = (A × B)  (A × C) f–1(– 4).
Ans. f–1(4) = {x  R : f (x) = 4}
1.6. Discuss countable and uncountable sets. = {x  R : x2 = 4}
Ans. A set which is either empty, finite or countably infinite is called = {x  R : x = ± 2} = {–2, 2}
countable otherwise uncountable. Thus, A is countable if there f–1(– 4) = {x  R : f (x) = – 4}
exists a one-to-one function F from N onto A. = {x  R : x2 = – 4}
= {x  R : x =  2 1 } =  since  2 1
1.7. Write a short note on composition of relation.
are imaginary numbers
Ans. The composite of, say R and S denoted by RoS, is the relation
consisting of ordered pairs (a, c) when a  A and c  C, and for
1.12. Show that if set A has 3 elements, then we can have 26
which there exists an element b  B such that (a, b)  R and
(b, c)  S. symmetric relations on A. AKTU 2015-16, Marks 02
Ans. Number of elements in set = 3
1.8. How many symmetric and reflexive binary relations are
Number of symmetric relations if number of elements is
possible on a set S with cardinality n ? n = 2n(n + 1)/2
Ans. There are 2n(n + 1)/2 symmetric binary relations and 2n(n – 1) reflexive Here, n=3
binary relations are possible on a set S with cardinality.  Number of symmetric relations
= 23(3 + 1)/2
1.9. Let A = {a, {a}}. Determine whether the following statements = 23(4)/2
are true or false :
= 26
i. {a, {a}}  P(A) Hence proved.
ii. {a, {a}}  P(A)
iii. {{{a}}}  P(A) 1.13. If f : A  B is one-to-one onto mapping, then prove that
iv. {{{a}}}  P(A)
f –1 : B  A will be one-to-one onto mapping.
Ans.
i. False : {a, {a}} is not an element of A. AKTU 2015-16, Marks 02
ii. True : {a,{a}} is a subset of A. Ans. Proof : Here f : A  B is one-to-one and onto.
iii. False : {{{a}}} is not an element of A. a1, a2  A and b1, b2  B so that
iv. False : {{{a}}} is a subset of A. b1 = f(a1), b2 = f (a2) and a1 = f–1(b1), a2 = f–1 (b2)
As f is one-to-one
1.10. Find out the cardinality of the following sets : f(a1) = f(a2)  a1 = a2
A = {x : x is weeks in a leap year} b1 = b2 f–1(b1) = f–1(b2)
B = {x : x is a positive divisor of 24 and not equal to zero} i.e., f (b1) = f–1(b2)  b1 = b2
–1
C = {{{}}}  f is one-to-one function.
–1
D = {{, {}}} As f is onto.
SQ–4 C (CS/IT-Sem-3) 2 Marks Questions Discrete Structures & Theory of Logic SQ–5 C (CS/IT-Sem-3)

Every element of B is associated with a unique element of A i.e., f(x1) = f(x2) implies x1 = x2  x1, x2,  X
for any a  A is pre-image of some b  B where b = f(a)  a = f–1(b)
A B
i.e., for b  B, there exists f–1 image a  A. f
Hence, f–1 is onto.

1.14. Define multiset and power set. Determine the power set
A = {1, 2}. AKTU 2015-16, Marks 02
Fig. 1.18.1. One-to-one.
Ans. Multiset : Multisets are sets where an element can occur as a
member more than once. 2. Onto function (Surjection or surjective function) : Let
For example : A = { p, p, p, q, q, q, r, r, r, r} f : X  Y then f is called onto function iff for every element y  Y
B = { p, p, q, q, q, r} there is an element x  X with f(x) = y or f is onto if Range (f) = Y.
are multisets. X Y
Power set : A power set is a set of all subsets of the set.
The power set of A = {1, 2} is {{}, {1}, {2}}. f

1.15. Define cardinality.


Ans. Cardinality of a set is defined as the total number of elements in a
finite set.
Fig. 1.18.2. Onto.
1.16. Define ordered pair.
Ans. An ordered pair is a pair of objects whose components occur in a 3. One-to-one onto function (Bijective function or bijection) :
special order. It is written by listing the two components in the A function which is both one-to-one and onto is called one-to-one
specified order, separating them by a comma and enclosing the pair onto function or bijective function.
in parenthesis. In the ordered pair (a, b), a is called the first X Y
component and b, the second component. f
1 a
1.17. Find the power set of each of these sets, where a and b are 2 b
distinct elements. 3 c
i. {a}
ii. {a, b} Fig. 1.18.3. One-to-one onto.
iii. {, {}}
iv. {a, {a}} AKTU 2018-19, Marks 02 1.19. Let A = (2, 4, 5, 7, 8) = B, aRb if and only if a + b <= 12. Find
Ans. relation matrix. AKTU 2017-18, Marks 02
i. Power set of {a} = {{}, {a}}
ii. Power set of {a, b} = {{}, {a}, {b}, {a, b}} Ans. R = {(2, 4), (2, 5), (2, 7), (2, 8) (4, 2), (4, 5), (4, 7), (4, 8) (5, 2), (5, 4),
iii. Power set of {, {}} = {} (5, 7), (7, 2), (7, 4), (7, 5), (8, 2), (8, 4), (2, 2), (4, 4), (5, 5)}
iv. Power set of {a, {a}} = {{}, {a}, {{a}}, {a, {a}}} 2 4 8 5 7
2 1 1 1 1 1
1.18. Define injective, surjective and bijective function. 4 1 1 1 
1 1
AKTU 2018-19, Marks 02 mij = 5 1 1 0 1 1
 
Ans. 7 1 1 1 0 0
1. One-to-one function (Injective function or injection) : Let 8 1 1 0 0 0 
f : X  Y then f is called one-to-one function if for distinct elements
of X there are distinct image in Y i.e., f is one-to-one iff
SQ–6 C (CS/IT-Sem-3) 2 Marks Questions Discrete Structures & Theory of Logic SQ–7 C (CS/IT-Sem-3)

1.20. Define union and intersection of multiset and find for

2
A = [1, 1, 4, 2, 2, 3], B = [1, 2, 2, 6, 3, 3]
AKTU 2017-18, Marks 02
Ans. Union : Let A and B be two multisets. Then, A  B, is the multiset
where the multiplicity of an element in the maximum of its
multiplicities in A and B.
Algebraic Structures
Intersection : The intersection of A and B, A  B, is the multiset
where the multiplicity of an element is the minimum of its
(2 Marks Questions)
multiplicities in A and B.
Numerical :
A = {1, 1, 4, 2, 2, 3}, B = {1, 2, 2, 6, 3, 3} 2.1. List the properties of cosets.
Union : A  B = {1, 2, 3, 4, 6} Ans. Let H be a subgroup of G and ‘a’ and ‘b’ belong to G. Then,
Intersection : A  B = {1, 2, 2, 3} i. a  aH
ii. aH = H iff a  H
iii. aH = bH
 iv. aH = bH iff a–1 b  H

2.2. List types of permutation group.


Ans. Types of permutation group are :
i. Identity permutation
ii. Inverse permutation
iii. Cyclic permutation
iv. Even and odd permutation

2.3. If a and b are any two elements of group G then prove


(a * b)– 1 = (b– 1 * a– 1). AKTU 2015-16, Marks 02
Ans. Consider (a * b) * (b – 1
* a – 1)
= a * (b * b – 1) * a – 1
= a * e * a– 1
= a * a–1= e
Also (b * a ) * (a * b) = b – 1 * (a – 1 * a) * b
– 1 – 1

= b–1 * e * b
= b–1 * b = e
Therefore (a * b) – 1 = b – 1 * a – 1 for any a, b  G

2.4. What do you mean by integral domain ?


Ans. A ring (R, +, ·) is called an integral domain if,
i. It is commutative.
ii. It has multiplicative identity element.
iii. It is without zero divisors.

2.5. Define ring and give an example of a ring with zero divisors.
AKTU 2016-17, Marks 02
OR
SQ–8 C (CS/IT-Sem-3) 2 Marks Questions Discrete Structures & Theory of Logic SQ–9 C (CS/IT-Sem-3)

2.8. Prove that if a, b  R then (a + b)2 = a2 + ab + ba + b2.


Define ring and field. AKTU 2018-19, Marks 02
Ans. We have
OR (a + b)2 = (a + b) (a + b)
Define rings and write its properties. = a (a + b) + b (a + b) [by right distributive law]
AKTU 2017-18, Marks 02 = (aa + ab) + (ba + bb) [by left distributive law]
= a2 + ab + ba + b2.
Ans. Ring : A non-empty set R is a ring if it is equipped with two binary
operations called addition and multiplication and denoted by '+' 2.9. In an integral domain D, show that if ab = ac with a  0
and '.' respectively i.e., for all a, b  R we have a + b R and a.b  R then b = c.
and it satisfies the following properties : Ans. Since ab = ac we have
i. Addition is associative i.e., ab – ac = 0 and so a (b – c) = 0
(a + b) + c = a + (b + c)  a, b, c  R Since a  0, we must have b – c = 0, since D has no zero divisors.
ii. Addition is commutative i.e., Hence b = c.
a + b = b + a  a, b  R
2.10. Prove that left inverse of an element is also its right inverse
iii. There exists an element 0  R such that
i.e., a–1 * a = e = a * a–1
0 + a = a = a + 0,  a  R Ans. Now a–1 * (a * a–1) = (a–1 * a)* a–1 (Associativity)
iv. To each element a in R there exists an element – a in R such that = e* a–1
a + (– a) = 0 = a–1 * e
v. Multiplication is associative i.e., Thus, a * (a * a ) = a–1 * e
–1 –1

a.(b.c) = (a.b).c,  a b, c  R a * a–1= e


vi. Multiplication is distributive with respect to addition i.e., for all Thus, the left inverse of an element in a group is also its right
a, b, c R, inverse.
Example of ring with zero divisors : R = {a set of 2 × 2
matrices}. 2.11. Define Lagrange’s theorem. What is the use of the theorem ?
Field : A ring R with at least two elements is called a field if it has Ans. Lagrange’s theorem :
following properties : Statement : The order of each subgroup of a finite group is a
i. R is commutative divisor of the order of the group.
ii. R has unity Use of theorem :
iii. R is such that each non-zero element possesses multiplicative i. It can be used to find the subgroup of any order for the symmetric
inverse. group.
For example : The rings of real numbers and complex numbers ii. It tells that the number of subgroups of the cyclic group of order p,
are also fields. when p is prime then there is only one subgroup and that is {}.

2.6. Prove that if a2 = a, then a = e, a being an element of a group.


Ans. Let a be an element of a group G such that a2 = a. 
To prove that a = e.
a2 = a  a.a = a  (aa) a–1 = aa–1
 a(aa–1) = e ( aa–1 = e)
 ae = e  a = e ( ae = a)
2.7. If H is a subgroup of G such that x2  H for every x  G, then
prove that H is a normal subgroup of G.
Ans. For any g  G, h  H; (gh)2  H and g–2 H.
Since H is a subgroup, h–1 g–2  H and so (gh)2 h–1 g–2  H. This
gives that gh gh h–1 g–2 H, i.e., ghg–1  H. Hence, H is a normal
subgroup of G.
SQ–10 C (CS/IT-Sem-3) 2 Marks Questions Discrete Structures & Theory of Logic SQ–11 C (CS/IT-Sem-3)

Maxterm : A maxterm of ‘n’ variables is a sum of ‘n’ literals in

3
which each variable appears exactly once in either true or
complemented form, but not both.
Lattices and Boolean 3.6. Show that the relation  is a partial ordering on the set of
Algebra integers, Z.
Ans. Since :
(2 Marks Questions) 1. a  a for every a,  is reflexive.
2. a  b and b  a imply a = b,  is antisymmetric.
3. a  b and b  c imply a  c,  is transitive.
It follows that  is a partial ordering on the set of integers and
3.1. Explain maximal and minimal element. (Z, ) is a poset.
Ans. Maximal element : An element ‘a’ in the poset is called a maximal
element of P if a  x for no ‘x’ in P, that is, if no element of P strictly 3.7. Consider A = {x  R : 1 < x < 2} with  as the partial order.
succeeds ‘a’. Find
Minimal element : An element ‘b’ in P is called a minimal element i. All the upper and lower bounds of A.
of P if x  b for no ‘x’ in P. ii. Greatest lower bound and least upper bound of A.
Ans.
3.2. What do you mean by sublattice ? i. Every real number  2 is an upper bound of A and every real
Ans. A non-empty subset L of a lattice L is called a sublattice of L if number  1 is a lower bound of A.
a, b  L so that a b, a  b  L i.e., the algebra (L, , ) is a ii. 1 is a greatest lower bound and 2 is the least upper bound of A.
sublattice of (L, , ) iff L is closed under both operations and.
3.8. Determine
3.3. Write the following in DNF (x + y) (x + y). i. All maximal and minimal elements
AKTU 2015-16, Marks 02 ii. Greatest and least element
iii. Upper and lower bounds of ‘a’ and ‘b’, ‘c’ and ‘d’
Ans. Given : (x + y) (x + y) c d
The complete CNF in two variables (x, y)
= (x + y) (x + y) (x + y) (x + y) f
Hence, f (x, y) = (x + y) (x + y)
 [f (x, y)] = [(x + y) (x + y)]
= xy + xy e
which is the required DNF. b
a
3.4. Explain lattice homomorphism and lattice isomorphism. Fig. 3.8.1.
Ans. Lattice homomorphism : Let (L, *, ) and (S, , ) be two lattices. Ans.
A mapping g : L  S is called a lattice homomorphism from the i. Maximal elements = c, d, Minimal element = a, b
lattice (L, *, ) to (S, , ) if for any a, b  L ii. Greatest and least elements do not exist.
g(a * b) = g(a)  g(b) and (g  b) = g(a)  g(b). iii. Upper bound for a,b are e, f, c, d.
Lattice isomorphism : If a homomorphism g : L  S of two Upper bound for c,d are does not exist.
lattices (L, *, ) and (S, ,) is bijective i.e., one-to-one onto, then Lower bound for a,b are does not exist.
g is called an isomorphism. Lower bound for c,d are f, e, a, b.

3.5. Define minterm and maxterm. 3.9. Let (A, ) be a distributive lattice. Show that if a  x = a  y
Ans. Minterm : A minterm of ‘n’ variables is a product of ‘n’ literals in and a  x = a  y for some a then x = y.
which each variable appears exactly once in either true or Ans. We have x = x (x a) = x (y a) ( Given condition)
complemented form, but not both. = (x y)  (x a)
SQ–12 C (CS/IT-Sem-3) 2 Marks Questions Discrete Structures & Theory of Logic SQ–13 C (CS/IT-Sem-3)

= (x y)  (y a) ( Distributive property)  a  b and b  c


= y (x a)  a c  (a, c)  R
x= x (y a)
x= y  R is transitive.
Hence, R is partial order relation.
3.10. Prove that (A + B) (A + C) = A + BC
Ans. L.H.S = (A + B) (A + C) 3.14. Distinguish between bounded lattice and complemented
= AA + AC + BA + BC AKTU 2016-17, Marks 02
lattice.
= A + AC + BA + BC ( AA = 1)
= A (1 + C) + BA + BC Ans. Bounded lattice : A lattice which has both elements 0 and 1 is
= A + AB + BC ( 1 + C =1) called a bounded lattice.
= A (1 + B) +BC = A + BC ( 1 + B =1) Complemented lattice : A lattice L is called complemented lattice
= R.H.S. if it is bounded and if every element in L has complement.

3.11. For a given function, F = xy  xy , find complement of F. 3.15. Draw the Hasse diagram of D30. AKTU 2018-19, Marks 02
Ans. F = xy  xy
Ans.
F = xy (A + A = A)
Take the complement of both sides, 30

F = x y 6 15
10
Using De Morgan’s first law, we get,
3
F = xy 2 5
F = xy 1
Fig. 3.15.1.
3.12. Obtain an equivalent expression for [(x. y) (z + xy)].
Ans. Applying general form of De-Morgan’s theorem, we get
3.16. Define the terms : DNF and CNF.
[(x.y) (z + xy)] = (x.y) + (z + xy)= x + y [z + (x + y)] Ans. Disjunction Normal Form (DNF) : A logical expression is said
= x + y + zx + zy = x + x .z + y + yz = x + y + z to be in Disjunction Normal Form if it is the sum of elementary
[Applying x + xy = x and x + xy = x + y] product, i.e., join of elementary product.
Conjunctive Normal Form (CNF) : A logical expression is said
3.13. Show that the “greater than or equal” relation (>=) is a to be in Conjunctive Normal Form if it is the product of elementary
partial ordering on the set of integers. sums.
Example : p q, (p  q)  (~ p  q)
AKTU 2016-17, Marks 02
Ans. Reflexive :
a  a  a  Z (set of integer)

(a, a)  A
 R is reflexive.
Antisymmetric : Let (a, b)  R and (b, a)  R
 a  b and b  a
 a=b
 R is antisymmetric.
Transitive : Let (a, b)  R and (b, c)  R
SQ–14 C (CS/IT-Sem-3) 2 Marks Questions Discrete Structures & Theory of Logic SQ–15 C (CS/IT-Sem-3)

statement is “If a steel rod is not stretched then it has not been

4
heated”.

Propositional Logic 4.5. Give truth table for converse, contrapositive and inverse.
Ans. The truth table of the four propositions are as follows :
and Predicate Logic
Conditional Converse Inverse Contrapositive
(2 Marks Questions) p q pq qp ~p ~q ~q~p
T T T T T T
4.1. What is compound proposition ? T F F T T F
Ans. A proposition obtained from the combinations of two or more
propositions by means of logical operators or connectives of two F T T F F T
or more propositions or by negating a single proposition is referred F F T T T T
to as composite or compound proposition.

4.2. Show the implications without constructing the truth 4.6. Show that contrapositive are logically equivalent; that is
~q~ppq
table (P  Q)  Q  P  Q. AKTU 2016-17, Marks 02 Ans. The truth table of ~ q  ~ p and p  q are shown below and the
Ans. (P  Q)  Q  P  Q logical equivalence is established by the last two columns of the
Take L.H.S table, which are identical.
(P  Q)  Q = (~P  Q)  Q
p q ~p ~q ~q~p pq
= (~(~P  Q))  Q
= (P ~ Q)  Q T T F F T T
= (P  Q)  (~ Q  Q)
T F F T F F
= (P  Q)  T = P  Q
It is equivalent. F T T F T T

4.3. Prove that (P  Q)  (P  Q) is logically equivalent to P  Q. F F T T T T

AKTU 2015-16, Marks 02


4.7. Give truth table for NOR and XOR.
Ans. (P  Q)  (P  Q) = P  Q Ans.
Truth table for NOR Truth table for XOR
P Q PQ PQ (P  Q)  (P  Q) PQ
p q p  q p q p q
T T T T T T
T T F T T F
T F T F F F
T F F T F T
F T T F F F
F T F F T T
F F F F T T F F T F F F
4.4. The converse of a statement is : If a steel rod is stretched, 4.8. Verify that the proposition p  (q  ~p) is a contradiction.
then it has been heated. Write the inverse of the statement.
AKTU 2015-16, Marks 02
Ans. The statement corresponding to the given converse is “If a steel
rod is stretched, then it has been heated”. Now the inverse of this
SQ–16 C (CS/IT-Sem-3) 2 Marks Questions Discrete Structures & Theory of Logic SQ–17 C (CS/IT-Sem-3)

Ans. 4.11. Show that  (p  q) and  p  q are logically equivalent.


p q ~p q~p p  (q  ~ p) AKTU 2018-19, Marks 02
T T F F F Ans. To prove : (p + q) = p.q
To prove the theorem we will show that
T F F F F (p + q) + p.q = 1
Consider (p + q) + p.q = {(p + q) + p}.{(p + q) + q}
F T T T F
by Distributive law
F F T F F = {(q + p) + p}.{(p + q) + q}
by Commutative law
= {q + (p + p)}.{p + (q + q)}
4.9. Show that [((p  q)  r)  (~ p)]  (q  r) is tautology or by Associative law
contradiction. AKTU 2015-16, Marks 02 = (q + 1).(p + 1) by Complement law
= 1.1 by Dominance law
Ans. =1 ...(4.11.1)
p q r p q ~p q r((p q)  r)((pq) r)  (~p)[((p q)  r) Also consider
(~p)]  (q r) (p + q).pq = pq.(p + q) by Commutative law
= pq.p + pq.q by Distributive law
T T T T F T T F T = p.(pq) + p.(q q) by Commutative law
T T F T F F F F T = (p. p).q + p(q. q) by Associative law
= 0. q + p.0 by Complement law
T F T T F F T F T = q.0 + p.0 by Commutative law
= 0+0 by Dominance law
T F F T F F F F T
=0 ...(4.11.2)
F T T T T T T T T From (4.11.1) and (4.11.2), we get,
pq is complement of (p + q) i.e., (p + q) = p q.
F T F T T F F F T
F F T F T F T T F 4.12. Find the contrapositive of “If he has courage, then he will

F F F F T F T T F win”. AKTU 2017-18, Marks 02


Ans. If he will not win then he does not have courage.
Question is incorrect. Since the result of the question is
contingency.

4.10. What are the contrapositive, converse, and the inverse of
the conditional statement : “The home team wins whenever
it is raining” ? AKTU 2018-19, Marks 02
Ans. Given : The home team wins whenever it is raining.
q(conclusion) : The home team wins.
p(hypothesis) : It is raining.
Contrapositive : ~ q  ~ p is “if the home team does not win
then it is not raining”.
Converse : q  p is “if the home team wins then it is raining”.
Inverse : ~ p  ~ q is “if it is not raining then the home team does
not win”.
SQ–18 C (CS/IT-Sem-3) 2 Marks Questions Discrete Structures & Theory of Logic SQ–19 C (CS/IT-Sem-3)

item in V and each data item in the right subtree of V is greater

5
than the data item in V.

Trees, Graphs and 5.5. Give various representation of binary tree.


Ans. Various representation of binary tree are :
Combinatorics i. Storage representation
ii. Sequential representation
(2 Marks Questions) iii. Linked representation

5.6. Let G be a graph with ten vertices. If four vertices has degree
four and six vertices has degree five, then find the number
5.1. Explain trivial tree and non-trivial tree.
Ans. A tree with only one vertex is called a trivial tree. A tree with of edges of G. AKTU 2016-17, Marks 02
more than one vertex is called non-trivial tree. Ans. We know that

5.2. Describe the terms rank and nullity.  deg (v ) = 2e


i
i
Ans. If ‘n’ be the number of vertices, ‘e’ be the number of edges and ‘k’ 4 + 4 + 4 + 4 + 5 + 5 + 5 + 5 + 5 + 5 = 2e
be (n  k, k = 1 for connected graph) the number of components of 16 + 30 = 2e
a graph G, then rank and nullity is defined as : 2e = 46
Rank, r = n – k e = 23
Nullity = e – n + k
5.7. State the applications of binary search tree.
5.3. Define binary tree traversal with example. AKTU 2016-17, Marks 02
Ans. A traversal of tree is a process in which each vertex is visited
exactly once in a certain manner. Ans. One of the most common applications is to efficiently store data in
Binary tree traversal is of three types : sorted form in order to access and search stored elements quickly.
1. Preorder traversal For example, std :: map or std :: set in C++ Standard Library.
2. Postorder traversal Binary tree as data structure is useful for various implementations
3. Inorder traversal of expression parsers and expression solvers.
For example : 5.8. Define multigraph. Explain with example in brief.
A AKTU 2016-17, Marks 02
C Ans. A multigraphs G(V, E) consists of a set of vertices V and a set of
B
edges E such that edge set E may contain multiple edges and self
loops.
D E F Example :
a. Undirected multigraph :
Fig. 5.3.1. e2 v2
Preorder (NLR) : ABDECF v1 e6
Postorder (LRN) : DEBFCA
Inorder (LNR) : DBEAFC
e5
e1
e3
5.4. Define binary search trees.
Ans. A binary search tree is a binary tree T in which data is associated
with the vertices. The data are arranged so that, for each vertex V e4
v4 v3
in T, each data item in the left subtree of V is less than the data
Fig. 5.8.1.
SQ–20 C (CS/IT-Sem-3) 2 Marks Questions Discrete Structures & Theory of Logic SQ–21 C (CS/IT-Sem-3)

b. Directed multigraph : k-edge coloring : A proper edge coloring with k different colors is
e7 called a (proper) k-edge coloring.
v1 e3 v2

e1 e2 e4 e5 5.12. A tree has two vertices of degree 2, one vertex of degree 3


and three vertices of degree 4. How many vertices of degree
v4 e6 v3 1 does it have ?
Fig. 5.8.2. Ans. Let x be the required number. Now, total number of vertices
= 2+1+3+x=6+x
Hence the number of edges is 6 + x – 1 = 5 + x
5.9. Find the recurrence relation from yn = A2n + B(–3)n. [In a tree |E|= | V – 1|]
AKTU 2016-17, Marks 02 The total degree of the tree = 2 × 2 + 1 × 3 + 3 × 4 + 1 × x = 19 + x
A2n 3)n 19  x
Ans. Given : yn = + B (– So, the number of edges is [2e =  deg (v1)]
Therefore, yn + 1 = A(2)n + 1 + B (– 3)n + 1 2
= 2A (2)n – 3B (– 3)n 19  x
and yn + 2 = A(2)n + 2 + B (– 3)n + 2 Now, = 5+x
2
= 4A (2)n + 9B (– 3)n 19 + x = 10 + 2x
Eliminating A and B from these equations, we get or x=9
yn 1 1 Thus, there are 9 vertices of degree one in the tree.
yn1 2 – 3 = 0
5.13. State and prove pigeonhole principle.
yn 2 4 9
= yn + 2 – yn + 1 – 6yn = 0 which is the AKTU 2015-16, Marks 02
required recurrence relation. Ans. Pigeonhole principle : If n pigeons are assigned to m pigeonholes
then at least one pigeon hole contains two or more pigeons (m < n).
5.10. Find the minimum number of students in a class to show Proof :
that five of them are born in same month. 1. Let m pigeonholes be numbered with the numbers 1 through m.
Ans. Using pigeonhole principle : 2. Beginning with the pigeon 1, each pigeon is assigned in order to the
Five of them are born in same month, so n = ?, m = 12. pigeonholes with the same number.
3. Since m < n i.e., the number of pigeonhole is less than the number
 n  1
5=  1 of pigeons, n – m pigeons are left without having assigned a pigeon
 m  hole.
n1 4. Thus, at least one pigeonhole will be assigned to a more than one
4= pigeon.
12
48 = n – 1
n = 49 5.14. Draw the digraph G corresponding to adjacency matrix.
 49 students are there to show that at least 5 of them are born in  0 0 1 1
same month.  
0 0 1 0
A= 
 1 1 0 1
5.11. Explain edge coloring and k-egde coloring.  
AKTU 2017-18, Marks 02  1 1 1 0
Ans. Since the given matrix is square matrix of order four, the graph G
Ans. Edge coloring : An edge coloring of a graph G may also be thought has 4 vertices v1, v2, v3 and v4. Draw an edge from vi to vj where
of as equivalent to a vertex coloring of the line graph L(G), the aij = 1. The required di graph is shown in Fig. 5.14.1.
graph that has a vertex for every edge of G and an edge for every
pair of adjacent edges in G.
SQ–22 C (CS/IT-Sem-3) 2 Marks Questions Discrete Structures & Theory of Logic SQ–23 C (CS/IT-Sem-3)

v4 v2 3. Number of bit strings of length eight 25 = 32 that start with a 1 bit


and end with bits 00 : 25 = 32
Hence, the number is 128 + 64 – 32 = 160.

5.19. Define Eulerian path, circuit and graph.

v3 AKTU 2017-18, Marks 02


v1
Ans. Eulerian path : A path of graph G which includes each edge of G
Fig. 5.14.1. exactly once is called Eulerian path.
Eulerian circuit : A circuit of graph G which include each edge of
5.15. A connected plane graph has 10 vertices each of degree 3. G exactly once.
Into how many regions, does a representation of this Eulerain graph : A graph containing an Eulerian circuit is called
planar graph split the plane ? Eulerian graph.
Ans. Here n = 10 and degree of each vertex is 3.
 deg (v) = 3 × 10 = 30 5.20. Define chromatic number and isomorphic graph.
But  deg (v) = 2e  30 = 2e  e  15 AKTU 2017-18, Marks 02
By Euler’s formula, we have n – e + r = 2
10 – 15 + r = 2  r = 7. Ans. Chromatic number : The minimum number of colours required
for the proper colouring of a graph so that no two adjacent vertices
5.16. How many permutations of the letters of the word have the same colour, is called chromatic number of a graph.
BANANA ? Isomorphic graph : If two graphs are isomorphic to each other
then :
Ans. There are 6 letters in the word BANANA of which three are alike
of one kind (3A’s), two are alike of second kind (2N’s) and the rest i. Both have same number of vertices and edges.
one letter is different. ii. Degree sequence of both graphs are same (degree sequence is the
sequence of degrees of the vertices of a graph arranged in non-
6!
Hence, the required number of permutations =  60 . increasing order).
3!2!
5.21. Define walk.
5.17. How many 4 digit numbers can be formed by using the Ans. In a graph G, a finite alternating sequence of vertices and edges
digits 2, 4, 6, 8 when repetition of digits is allowed ? 1, e1, 2, e2 ... starting and ending with vertices such that each
AKTU 2015-16, Marks 02 edge in sequence is incident with the vertices following and
preceding, it is called walk.
Ans. When repetition is allowed :
The thousands place can be filled by 4 ways. 5.22. Define non-planar graph.
The hundreds place can be filled by 4 ways.
Ans. A graph G is said to be non-planar graph if it cannot be drawn in
The tens place can be filled by 4 ways. a plane so that no edges cross.
The units place can be filled by 4 ways.
 Total number of 4 digit number = 4 × 4 × 4 × 4 = 256

5.18. How many bit strings of length eight either start with a ‘1’ 
bit or end with the two bit ‘00’ ?
AKTU 2018-19, Marks 02
Ans.
1. Number of bit strings of length eight that start with a 1 bit :
27 = 128.
2. Number of bit strings of length eight that end with bits 00 : 26 = 64.
Discrete Structures & Theory of Logic SP–1 C (CS/IT-Sem-3) SP–2 C (CS/IT-Sem-3) Solved Paper (2014-15)

B. Tech. d. Write and prove the Lagrange’s theorem. If a group


G = {...., – 3, 2, – 1, 0, 1, 2, 3,.....} having the addition as binary
(SEM. III) ODD SEMESTER operation. If H is a subgroup of group G where x2  H such
THEORY EXAMINATION, 2014-15 that x  G. What is H and its left coset w.r.t 1 ?
DISCRETE STRUCTURE AND e. Consider a ring (R, +, ) defined by a · a = a, determine
GRAPH THEORY whether the ring is commutative or not.

Time : 3 Hours Max. Marks : 100 f. Show that every group of order 3 is cyclic.

3. Attempt any two parts : (10 × 2 = 20)


1. Attempt any four parts : (5 × 4 = 20) a. The directed graph G for a relation R on set A = {1, 2, 3, 4} is
a. Show that R = {(a, b)|a  b (mod m)} is an equivalence shown below :
relation on Z. Show that if x 1  y 1 and x 2  y 2 then
(x1 + x2)  (y1 + y2).
1 2
b. Prove for any two sets A and B that, (A  B)' = A' B'.

c. Let R be binary relation on the set of all strings of 0’s and


1’s such that R = {(a, b)|a and b are strings that have the 3 4
same number of 0’s}. Is R is an equivalence relation and a
partial ordering relation ? Fig. 1.
i. Verify that (A, R) is a poset and find its Hasse diagram.
d. If f : A  B, g : B  C are invertible functions, then show ii. Is this a lattice ?
that gof : A  C is invertible and (gof)–1 = f–1 og–1. iii. How many more edges are needed in the Fig. 1 to extend (A,
R) to a total order ?
e. Prove by the principle of mathematical induction, that iv. What are the maximal and minimal elements ?
the sum of finite number of terms of a geometric
progression, b. If the lattice is represented by the Hasse diagram given
a + ar + ar2 + ... arn–1 = a(rn – 1)/(r – 1) if r  1. below :
i. Find all the complements of ‘e’.
f. Let A {1, 2, 3,...........,13}. Consider the equivalence relation ii. Prove that the given lattice is bounded complemented
on A × A defined by (a, b) R (c, d) if a + d = b + c. Find lattice.
equivalence classes of (5,8).
b
2. Attempt any four parts : (5 × 4 = 20)
a c
a. Prove that (Z6, (+6)) is an abelian group of order 6, where
Z6 = {0, 1, 2, 3, 4, 5}.

b. Let G be a group and let a, b  G be any elements. Then f d


i. (a–1)–1 = a e
ii. (a * b)–1 = b–1 * a–1.
Fig. 2.
c. Prove that the intersection of two subgroups of a group is
also subgroup. c. Consider the Boolean function
a. f(x1, x2, x3, x4) = x1 + (x2. (x'1 + x4) + x3. (x'2 + x'4))
i. Simplify f algebraically.
Discrete Structures & Theory of Logic SP–3 C (CS/IT-Sem-3) SP–4 C (CS/IT-Sem-3) Solved Paper (2014-15)

ii. Draw the logic circuit of the f and the reduction of the f.
b. Write the expressions E1 = (x + xy) + (x/y) and E2 = x + SOLUTION OF PAPER (2014-15)
((xy + y)/y), into
i. Prefix notation ii. Postfix notation 1. Attempt any four parts : (5 × 4 = 20)
a. Show that R = {(a, b)|a  b (mod m)} is an equivalence
4. Attempt any two parts : (10 × 2 = 20) relation on Z. Show that if x 1  y 1 and x 2  y 2 then
a. i. Show that ((p  q)  ~ (~ p  (~ q  ~ r)))  (~ p  ~q )  (~p  r) (x1 + x2)  (y1 + y2).
is a tautology without using truth table. Ans. R ={(a, b) | a  b (mod m)}
ii. Rewrite the following arguments using quantifiers, For an equivalence relation it has to be reflexive, symmetric and
variables and predicate symbols : transitive.
a. All birds can fly. Reflexive : For reflexive  a   we have (a, a)  R i.e.,
b. Some men are genius. a  a (mod m)
c. Some numbers are not rational.  a – a is divisible by m i.e., 0 is divisible by m
d. There is a student who likes mathematics but not Therefore aRa,  a  Z, it is reflexive.
geography. Symmetric : Let (a, b)  Z and we have
(a, b)  R i.e., a  b (mod m)
b. “If the labour market is perfect then the wages of all persons  a – b is divisible by m
in a particular employment will be equal. But it is always  a – b = km, k is an integer
the case that wages for such persons are not equal  (b – a) = (– k) m
therefore the labour market is not perfect”. Test the validity  (b – a) = p m, p is also an integer
of this argument using truth table.  b – a is also divisible by m
 b  a (mod m )  (b, a)  R
c. Explain the following terms with suitable example : It is symmetric.
i. Conjunction Transitive : Let (a, b)  R and (b, c)  R then
ii. Disjunction (a , b)  R  a – b is divisible by m
iii. Conditional  a – b = t m, t is an integer ...(1)
iv. Converse (b, c)  R  b – c is divisible by m
v. Contrapositive  b – c = s m, s is an integer ...(2)
From eq. (1) and (2)
5. Attempt any two parts : (10 × 2 = 20) a – b + b – c = (t + s) m
a. Solve the recurrence relation by the method of generating a – c = lm, l is also an integer
function a – c is divisible by m
ar – 7 ar–1 + 10ar–2 = 0, r  2 a  c (mod m), yes it is transitive.
Given a0 = 3 and a1 = 3. R is an equivalence relation.
To show : (x1 + x2)  (y1 + y2) :
b. Solve the recurrence relation It is given x1  y1 and x2  y2
ar+2 – 5ar+1 + 6 ar = (r + 1)2 i.e., x1 – y1 divisible by m
x2 – y2 divisible by m
c. Explain the following terms with example : Adding above equation :
i. Homomorphism and Isomorphism graph (x1 – y1) + (x2 – y2) is divisible by m
ii. Euler graph and Hamiltonian graph  (x1 + x2) – (y1 + y2) is divisible by m
iii. Planar and Complete bipartite graph i.e., (x1 + x2)  (y1 + y2)

b. Prove for any two sets A and B that, (A  B)' = A' B'.
 Ans.
Let x  (A B)
 xAB
Discrete Structures & Theory of Logic SP–5 C (CS/IT-Sem-3) SP–6 C (CS/IT-Sem-3) Solved Paper (2014-15)

 x  A and x  B = g [f (x)] = (g  f) (x)


 x  A and x  B This shows that every element z  C has pre-image under g f. So,
 x  A B g  f is onto.
 (A  B) A B ...(1) Thus, g  f is one-to-one onto function and hence (g  f)–1 exists.
Now, let x  A  B By the definition of the composite functions, g  f : A  C. So,
 x  A and x  B (g  f)–1 : C  A.
 x  A and x  B Also g–1 : C  B and f–1 : B  A.
 x  (A  B) Then by the definition of composite functions, f–1 g–1 : C  A.
x  (A  B) Therefore, the domain of (g  f)–1 = the domain of f–1 g–1.
(AB)  (A B) ...(2) Now(g  f)–1 (z) = x  (g  f) (x) = z
From eq. (1) and (2), (A B) = A B  g (f (x)) = z
 g (y) = z where y = f (x)
c. Let R be binary relation on the set of all strings of 0’s and y = g–1 (z)
1’s such that R = {(a, b)|a and b are strings that have the  f–1 (y) = f–1 (g–1 (z)) = (f–1  g–1) (z)
same number of 0’s}. Is R is an equivalence relation and a  x = (f–1  g–1) (z) [f–1 (y) = x]
partial ordering relation ? Thus, (g  f)–1 (z) = (f–1  g–1) (z).
Ans. For equivalence relation : So, (g  f)–1 = f–1  g–1.
Reflexive : a R a  (a, a)  R a  R
where a is a string of 0’s and 1’s. e. Prove by the principle of mathematical induction, that
Always a is related to a because both a has same number of 0’s. the sum of finite number of terms of a geometric
It is reflexive. progression,
Symmetric : Let (a, b)  R a + ar + ar2 + ... arn–1 = a(rn – 1)/(r – 1) if r  1.
then a and b both have same number of 0’s which indicates that Ans. Basis : True for n = 1 i.e.,
again both b and a will also have same number of zeros. Hence (b, L.H.S = a
a)  R. It is symmetric. a (r  1)
Transitive : Let (a, b)  R, (b, c)  R R.H.S = =a
r1
(a, b)  R  a and b have same number of zeros.
Therefore, L.H.S. = R.H.S.
(b, c)  R  b and c have same number of zeros.
Induction : Let it be true for n = k i.e.,
Therefore a and c also have same number of zeros, hence (a, c)  R.
It is transitive. a (r k  1)
a + ar + ar2 + .... + ark–1 = ...(1)
 R is an equivalence relation. r 1
For partial order, it has to be reflexive, antisymmetric and transitive. Now we will show that it is true for n = k + 1 using eq. (1)
Since, symmetricity and antisymmetricity cannot hold together. i.e., a + ar + ar2 +.... + ark-1 + ark
Therefore, it is not partial order relation. Using eq. (1), we get

d. If f : A  B, g : B  C are invertible functions, then show a (r k  1)


+ ark
that g f : A  C is invertible and (g f)–1 = f–1 g–1. r 1
Ans. If f: A  B and g : B  C be one-to-one onto functions, then g  f is ar k  a  ar k1  ar k a ( r k  1  1)
also one-onto and (g  f)–1 = f–1  g–1 = =
r 1 r 1
Proof. Since f is one-to-one, f (x1) = f (x2)  x1 = x2 for x1, x2  R
Again since g is one-to-one, g (y1) = g (y2)  y1 = y2 for y1, y2  R which is R.H.S. for n = k + 1, hence it is true for n = k + 1.
By mathematical induction, it is true for all n.
Now g  f is one-to-one, since (g  f) (x1) = (g  f) (x2)  g [f(x1)] = g
[f (x2)]
f. Let A {1, 2, 3,...........,13}. Consider the equivalence relation
 f (x1) = f(x2 ) [g is one-to-one]
 x1 = x2 [f is one-to-one] on A × A defined by (a, b) R (c, d) if a + d = b + c. Find
equivalence classes of (5,8).
Since g is onto, for z  C, there exists y  B such that g (y) = z. Also
f being onto there exists x  A such that f (x) = y. Hence z = g (y) Ans. A = {1, 2, 3, ...., 13}
Discrete Structures & Theory of Logic SP–7 C (CS/IT-Sem-3) SP–8 C (CS/IT-Sem-3) Solved Paper (2014-15)

[(5, 8)] = [(a, b) : (a, b) R (5, 8), (a, b)  A × A] Then we have a * a – 1 = e, where a – 1  G.
= [(a, b) : a + 8 = b + 5] Also (a – 1) – 1 * a – 1 = e
= [(a, b) : a + 3 = b] Therefore, (a – 1) – 1 * a – 1 = a * a – 1.
[5, 8] = {(1, 4), (2, 5), (3, 6), (4, 7) Thus, by right cancellation law, we have (a – 1) – 1 = a.
(5, 8), (6, 9), (7, 10), (8, 11) ii. Let a and b  G and G is a group for *, then a * b G (closure)
(9, 12), (10, 13)} Therefore, (a * b) – 1 * (a * b) = e. ....(1)
Let a – 1 and b – 1 be the inverses of a and b respectively, then a – 1,
2. Attempt any four parts : (5 × 4 = 20) b – 1  G.
a. Prove that (Z6, (+6)) is an abelian group of order 6, where Therefore, (b – 1 * a – 1) * (a * b) = b – 1 * (a – 1 * a) * b (associativity)
Z6 = {0, 1, 2, 3, 4, 5}. = b–1 * e * b = b–1 * b = e ...(2)
Ans. The composition table is : From eq. (1) and (2) we have,
+6 0 1 2 3 4 5 (a * b) – 1 * (a * b) = (b – 1 * a – 1)* (a * b)
(a * b) – 1 = b – 1 * a –1 (by right cancellation law)
0 0 1 2 3 4 5
1 1 2 3 4 5 0
c. Prove that the intersection of two subgroups of a group is
2 2 3 4 5 0 1 also subgroup.
3 3 4 5 0 1 2
Ans. Let H1 and H2 be any two subgroups of G. Since at least the identity
4 4 5 0 1 2 3 element e is common to both H1 and H2.
5 5 0 1 2 3 4
 H1  H2 
Since 2 +6 1 = 3 In order to prove that H1  H2 is a subgroup, it is sufficient to prove
4 +6 5 = 3 that
From the table we get the following observations : a  H1  H2, b H1  H2 ab–1 H1  H2
Closure : Since all the entries in the table belong to the given set Now a H1  H2  a H1 and a H2
Z6. Therefore, Z6 is closed with respect to addition modulo 6. b H1  H2 b H1 and b  H2
Associativity : The composition ‘+6’ is associative. If a, b, c are any But H1, H2 are subgroups. Therefore,
three elements of Z6, a  H1, b  H1 ab–1  H1
a +6 (b +6 c) =a +6 (b + c) [ b +6 c = b + c (mod 6)] a H2 , bH2 ab–1  H2
= least non-negative remainder when a + (b + c) is divided by 6. Finally, ab–1  H1, ab–1  H2  ab–1  H1  H2
= least non-negative remainder when (a + b) + c is divided by 6. Thus, we have shown that
= (a + b) +6 c = (a +6 b) +6 c. a  H1 H2, b  H1  H2  ab–1  H1  H2.
Identity : We have 0  Z6. If a is any element of Z6, then from the Hence, H1  H2 is a subgroup of G.
composition table we see that
0 +6 a = a = a +6 0 d. Write and prove the Lagrange’s theorem. If a group
Therefore, 0 is the identity element. G = {...., – 3, 2, – 1, 0, 1, 2, 3,.....} having the addition as binary
Inverse : From the table we see that the inverse of 0, 1, 2, 3, 4, 5 operation. If H is a subgroup of group G where x2  H such
are 0, 5, 4, 3, 2, 1 respectively. For example 4 +6 2 = 0 = 2 +6 4 implies that x  G. What is H and its left coset w.r.t 1 ?
4 is the inverse of 2. Ans. Lagrange’s theorem :
Commutative : The composition is commutative as the elements If G is a finite group and H is a subgroup of G then o(H) divides
are symmetrically arranged about the main diagonal. The number o(G). Moreover, the number of distinct left (right) cosets of H in G
of elements in the set Z6 is 6. is o(G)/o(H).
 (Z6, +6) is a finite abelian group of order 6. Proof : Let H be subgroup of order m of a finite group G of order n.
Let H {h1, h2, ..., hm}
b. Let G be a group and let a, b  G be any elements. Then Let a  G. Then aH is a left coset of H in G and aH = {ah1, ah2, ...,
i. (a–1)–1 = a ahm} has m distinct elements as ahi = ahj  hi = hj by cancellation
ii. (a * b)–1 = b–1 * a–1. law in G.
Ans. Thus, every left coset of H in G has m distinct elements.
i. Let e be the identity element for * in G.
Discrete Structures & Theory of Logic SP–9 C (CS/IT-Sem-3) SP–10 C (CS/IT-Sem-3) Solved Paper (2014-15)

Since G is a finite group, the number of distinct left cosets will also 5. Since a is not the identity element, therefore o(a) is definitely  2.
be finite. Let it be k. Then the union of these k-left cosets of H in G Let o(a) = m. If H is the cyclic subgroup of G generated by a then
is equal to G. o (H = o (a) = m).
i.e., if a1H, a2H, ..., akH are right cosets of H in G then 6. By Lagrange’s theorem m must be a divisor of p. But p is prime and
G = a1H a2H  ... akH. m  2. Hence, m = p.
 o(G) = o(a1H) + o(a2H) + ... + o(akH) 7.  H = G. Since H is cyclic therefore G is cyclic and a is a generator
(Since two distinct left cosets are mutually disjoint.) of G.
 n = m + m + ... + m (k times)
n 3. Attempt any two parts : (10 × 2 = 20)
 n = mk  k = a. The directed graph G for a relation R on set A = {1, 2, 3, 4} is
m
shown below :
o(G )
 k= .
o( H )
Thus order of each subgroup of a finite group G is a divisor of the 1 2
order of the group.
Numerical :
H = {x2 : x  G} = {0, 1, 4, 9, 16, 25 ....}
Left coset of H will be 1 + H = {1, 2, 5, 10, 17, 26, ....} 3 4

e. Consider a ring (R, +, ) defined by a · a = a, determine


Fig. 1.
whether the ring is commutative or not.
i. Verify that (A, R) is a poset and find its Hasse diagram.
Ans. Let a, b R (a + b)2 = (a + b) ii. Is this a lattice ?
 (a + b) (a + b) = (a + b)
iii. How many more edges are needed in the Fig. 1 to extend (A,
(a + b)a + (a + b)b = (a + b) R) to a total order ?
(a2 + ba) + (ab + b2) = (a + b) iv. What are the maximal and minimal elements ?
(a + ba) + (ab + b) = (a + b) (  a2 = a and b2 = b) Ans.
i. The relation R corresponding to the given directed graph is,
(a + b) + (ba + ab) = (a + b) + 0
R = {(1, 1), (2, 2), (3, 3), (4, 4), (3, 1), (3, 4), (1, 4), (3, 2)}
 ba + ab = 0 R is a partial order relation if it is reflexive, antisymmetric and
a + b = 0 a + b = a + a [being every element of its own additive transitive.
inverse] Reflexive : Since aRa,  a  A . Hence, it is reflexive.
 b=a Antisymmetric : Since aRb and bRa then we get a = b otherwise
 ab = ba aRb or bRa.
 R is commutative ring. Hence, it is antisymmetric.
Transitive: For every aRb and bRc we get aRc. Hence, it is
f. Show that every group of order 3 is cyclic. transitive.
Ans. Therefore, we can say that (A, R) is poset. Its Hasse diagram is :
1. Suppose G is a finite group whose order is a prime number p, then 1
to prove that G is a cyclic group. 2
2. An integer p is said to be a prime number if p  0, p  1, and if the
only divisors of p are ± 1, ± p.
3. Some G is a group of prime order, therefore G must contain at least
4
2 element. Note that 2 is the least positive prime integer.
4. Therefore, there must exist an element a  G such that a  the 3
identity element e. Fig. 2.
Discrete Structures & Theory of Logic SP–11 C (CS/IT-Sem-3) SP–12 C (CS/IT-Sem-3) Solved Paper (2014-15)

ii. Since there is no lub of 1 and 2 and same for 2 and 4. The given c. Consider the Boolean function
poset is not a lattice. a. f(x1, x2, x3, x4) = x1 + (x2. (x'1 + x4) + x3. (x'2 + x'4))
 1 2 3 4 i. Simplify f algebraically.
ii. Draw the logic circuit of the f and the reduction of the f.
1 1  1 1
b. Write the expressions E1 = (x + xy) + (x/y) and E2 = x +
2  2 2  ((xy + y)/y), into
3 1 2 3 1 i. Prefix notation ii. Postfix notation
4 1  1 4 Ans.
iii. Only one edge (4, 2) is included to make it total order. a. i. f(x1, x2, x3, x4) = x1 + (x2.(x1 + x4) + x3.(x2+ x4)
iv. Maximals are {1, 2} and minimals are {3, 4}. = x1 + x2.x1 + x2.x4 + x3.x2 + x3.x4
= x1 + x2 + x2.x4 + x3.x2 + x3.x4
b. If the lattice is represented by the Hasse diagram given
= x1 + x2.(1 + x4) + x3.x2 + x3.x4
below :
i. Find all the complements of ‘e’. = x1 + x2 + x3.x2 + x3.x4
ii. Prove that the given lattice is bounded complemented = x1 + x2 + x3 + x3.x4
lattice. = x1 + x2 + x3.(1 + x4)
b
= x1 + x2 + x3
a c ii. Logic circuit :
x1 x1 + x2 + x3
x2
x3
f d
Fig. 4.
e
Fig. 3. Reduction of f :
Ans. f (x1, x2, x3, x4) = x1 + (x2.(x1 + x4) + x3.(x2 + x4)
i. In a given lattice, greatest element is b and least element is e. An = x1 + (x2.x1 + x2.x4) + (x3.x2 + x3.x4)
element x in lattice is called a complement of element y if
y x = b and y  x = e = x1 + x2.x1 + x2.x4 + x3.x2 + x3.x4
For element e, b. E1 = (x + x * y) + (x/y)
eb=b , e b=e Binary tree is :
So, complement of e is b
ii. Proof : +
For bounded complemented lattice, every element in lattice has a
+ /
complement and lattice is bounded. Since, given lattice have greatest
and least element. So, the given lattice is bounded.
x * x y
Now the complement of all elements is given below :
Complement of a = {c, d}
Complement of b = {e} x y
Complement of c = {a, f}
Complement of d = {a, f} Fig. 5.
Complement of e = {b} Prefix : ++ x * x y / xy
Complement of f = {c, d} Postfix : xx y * + xy / +
Since, complement of every element exists and lattice is bounded. E2 = x + ((x * y + y)/y)
So, the given lattice is bounded complemented lattice.
Hence proved.
Discrete Structures & Theory of Logic SP–13 C (CS/IT-Sem-3) SP–14 C (CS/IT-Sem-3) Solved Paper (2014-15)

Binary tree is : Ans. Let p1 : The labour market is perfect.


p2 : Wages of all persons in a particular employment will be equal.
+ ~p2 : Wages for such persons are not equal.
/ ~p1 : The labour market is not perfect.
x The premises are p1  p2 , ~ p2 and the conclusion is ~ p1. The argument
y
+ p1  p2, ~ p2  ~ p1 is valid if ((p1  p2)  ~ p2)  ~ p1 is a tautology.
Its truth table is,
* y
p1 p2 ~p1 ~p2 p1  p2 (p1 p2)  ~p2 (p1p2  ~ p2) ~p1
y
x
T T F F T F T
Fig. 6.
T F F T F F T
Prefix : + x / + * x y y y
Postfix : x x y * y + y / + F T T F T F T

4. Attempt any two parts : (10 × 2 = 20) F F T T T T T


a. i. Show that ((p  q)  ~ (~ p  (~ q  ~ r)))  (~ p  ~q )  (~p  r)
Since ((p1  p2 )  ~p2)  ~p1 is a tautology. Hence, this is valid
is a tautology without using truth table.
argument.
ii. Rewrite the following arguments using quantifiers,
variables and predicate symbols :
c. Explain the following terms with suitable example :
a. All birds can fly.
i. Conjunction
b. Some men are genius.
ii. Disjunction
c. Some numbers are not rational.
iii. Conditional
d. There is a student who likes mathematics but not
iv. Converse
geography.
v. Contrapositive
Ans.
Ans.
i. We have
i. Conjunction : If p and q are two statements, then conjunction of
((p q) ~ (~ p  (~ q  r)))  (~ p  ~ q)  (~ p r)
p and q is the compound statement denoted by p  q and read as
((p  q)  ~ (~ p  ~ (q  r)))  (~ (p  q)  ~ ( p  r))
“p and q”. Its truth table is,
(Using De Morgan's Law)
 [(p  q)]  (p  (q  r))  ~ ((p  q)  (p  r)) p q pq
 [(p  q)  (p  q)  (p  r)] ~ (( p  q)  (p  r))
(Using Distributive Law) T T T
 [((p  q)  (p  q)]  (p  r) ~ ((p  q)  (p  r)) T F F
 ((p  q)  (p  r))  ~ ((p  q)  (p  r)) F T F
 x  ~ x where x = (p  q)  (p  r)
T F F F
ii. Example :
a.  x [B(x)  F(x)] p : Ram is healthy.
b.  x [M(x)  G(x)] q : He has blue eyes.
c. ~[ (x) (N(x)  R(x)] p  q : Ram is healthy and he has blue eyes.
d. x [S(x)  M(x)  ~ G(x)] ii. Disjunction : If p and q are two statements, the disjunction of
b. “If the labour market is perfect then the wages of all persons p and q is the compound statement denoted by p  q and it is read as
in a particular employment will be equal. But it is always “p or q”. Its truth table is,
the case that wages for such persons are not equal
therefore the labour market is not perfect”. Test the validity
of this argument using truth table.
Discrete Structures & Theory of Logic SP–15 C (CS/IT-Sem-3) SP–16 C (CS/IT-Sem-3) Solved Paper (2014-15)

p q pq 5. Attempt any two parts : (10 × 2 = 20)


a. Solve the recurrence relation by the method of generating
T T T function
T F T ar – 7 ar – 1 + 10ar – 2 = 0, r  2
Given a0 = 3 and a1 = 3.
F T T
Ans. ar – 7ar – 1 + 10 ar – 2 = 0, r  2
F F F Multiply by xr and take sum from 2 to .
  
Example :  ar xr  7  ar –1 xr  10  ar 2 xr  0
p : Ram will go to Delhi. r2 r2 r2
q : Ram will go to Calcutta. (a2 + a3 + a4 + ....) – 7 (a1 x2 + a2 x3 + ....)
x2 x3 x4
p  q : Ram will go to Delhi or Calcutta. + 10 (a0 x2 + a1 x3 + ....) = 0
iii. Conditional : If p and q are propositions. The compound proposition We know that
if p then q denoted by p  q or p  q and is called conditional 
proposition or implication. It is read as “If p then q” and its truth G(x) =  ar xr  a0  a1 x  ....
table is, r0
G(x) – a0 – a1 x – 7 x (G(x) – a0) + 10 x2 G(x) = 0
p q pq
G(x) [1 – 7 x + 10 x2] = a0 + a1 x – 7 a0 x
T T T = 3 + 3x – 21 x = 3 – 18 x
T F F 3  18 x 3  18 x
G(x) = 
F T T 10 x 2  7 x  1 10 x 2  5 x  2 x  1
3  18 x 3  18 x
F F T = 
5 x (2 x  1)  1 (2 x  1) (5 x – 1)(2 x  1)
Example :
Now,
p : Ram works hard.
q : He will get good marks. 3  18 x A B
= 
p  q : If Ram works hard then he will get good marks. (5 x  1) (2 x 1) 5 x 1 2 x 1
For converse and contrapositive : 3 – 18 x = A (2 x – 1) + B (5 x – 1)
Let p : It rains.
1
q : The crops will grow. put x=
iv. Converse : If p  q is an implication then its converse is given by 2
q  p states that S : If the crops grow, then there has been rain. 5  3
3 – 9 = B   1  – 6 = B B = – 4
v. Contrapositive : If p  q is an implication then its contrapositive 2 2
is given by q  p states that, 1
t : If the crops do not grow then there has been no rain. put x=
5
Inverse :
If p  q is implication the inverse of p  q is ~ p  ~ q. 18 2  3 3
3– = A   1     A  1  A = 1
Consider the statement 5  5  5 5
p : It rains. 1 4 4 1
 G(x) =  = 
q : The crops will grow 5 x  1 2x  1 1  2x 1  5x
The implication p  q states that,  ar = 4.2r – 5r
r : If it rains then the crops will grow.
The inverse of the implication p  q, namely ~ p  ~ q states that. b. Solve the recurrence relation
u : If it does not rain then the crops will not grow. ar+2 – 5ar+1 + 6 ar = (r + 1)2
Ans. r+2 – 5 ar+1 + 6 ar = (r + 1)2 = r2 + 2r + 1
a ...(1)
Now the characteristic equation is :
Discrete Structures & Theory of Logic SP–17 C (CS/IT-Sem-3) SP–18 C (CS/IT-Sem-3) Solved Paper (2014-15)

x2 – 5 x + 6 = 0
(x – 3) (x – 2) = 0  x = 3, 2
The homogeneous solution is : (a) (b ) (c )
ar(h) = C12r + C2 3r Fig. 7.
Isomorphism of graph : Two graphs are isomorphic to each
Let the particular solution be :
other if :
ar(p) = A0 + A1r + A2r2 i. Both have same number of vertices and edges.
From eq. (1) ii. Degree sequence of both graphs are same (degree sequence is the
A0 + A1 (r + 2) + A2 (r + 2)2 – 5 {A0 + A1 (r + 1)} + A2 (r + 1)2} sequence of degrees of the vertices of a graph arranged in non-
increasing order).
+ 6A0 + 6A1r + 6A2 r2 Example :
= r2 + 2 r + 1
(A0 + 2A1 + 4A2 –5A0 – 5A1 – 5A2 + 6A0) + r (A1 + 4A2 – 5A1 – 10A2 +
6A1)
+ r2 ( A2 – 5A2 + 6A2) = r2 + 2r + 1
Fig. 8.
Comparing both sides, we get, ii. Eulerian path : A path of graph G which includes each edge of G
2A0 – 3A1 – A2 = 1 ...(2) exactly once is called Eulerian path.
2A1 – 6A2 = 2 ...(3) Eulerian circuit : A circuit of graph G which include each edge of
G exactly once.
2A2 = 1  A2 = 1/2 Eulerain graph : A graph containing an Eulerian circuit is called
From eq. (3), 2A1 – 3 = 2 Eulerian graph.
5 For example : Graphs given below are Eulerian graphs.
A1 = V1 V3 A B
2 V2
From eq. (2)
15 1 V5 V4 D
2A0 –  =1 C
2 2 Fig. 9.
9 Hamiltonian graph : A Hamiltonian circuit in a graph G is a
2A0 – 8 = 1  A0 = closed path that visit every vertex in G exactly once except the end
2
vertices. A graph G is called Hamiltonian graph if it contains a
9 5 r2
 ar(p) =  r Hamiltonian circuit.
2 2 2 For example : Consider graphs given below :
The final solution is,
D C D C
9 5 r2
ar = ar(h) + ar(p) = C1 2r + C2 3r + + r F
2 2 2
E
A B A B
c. Explain the following terms with example : (a) (b )
i. Homomorphism and Isomorphism graph Fig. 10.
ii. Euler graph and Hamiltonian graph Graph given is Fig. 10(a) is a Hamiltonian graph since it contains a
iii. Planar and Complete bipartite graph Hamiltonian circuit A – B – C – D – A while graph in Fig 10(b) is not
Ans. a Hamiltonian graph.
i. Homomorphism of graph : Two graphs are said to be Hamiltonian path : The path obtained by removing any one edge
homomorphic if one graph can be obtained from the other by the from a Hamiltonian circuit is called Hamiltonian path. Hamiltonian
creation of edges in series (i.e., by insertion of vertices of degree path is subgraph of Hamiltonian circuit. But converse is not true.
two) or by the merger of edges in series.
Discrete Structures & Theory of Logic SP–19 C (CS/IT-Sem-3) Discrete Structures & Theory of Logic SP–1 C (CS/IT-Sem-3)

The length of Hamiltonian path in a connected graph of n vertices B.Tech.


is n – 1 if it exists.
iii. Planar graph : (SEM. III) ODD SEMESTER
A graph G is said to be planar if there exists some geometric
representation of G which can be drawn on a plane such that no THEORY EXAMINATION, 2015-16
two of its edges intersect except only at the common vertex.
i. A graph is said a planar graph, if it cannot be drawn on a plane DISCRETE STRUCTURE AND
without a crossover between its edges crossing. GRAPH THEORY
ii. The graphs shown in Fig. 11(a) and (b) are planar graphs.
Time : 3 Hours Max. Marks : 100

Note : Attempt all parts. All parts carry equal marks. Write answer of
each part in short. (2 × 10 = 20)
(a) (b )
Fig. 11. Some planar graph.
SECTION – A
Complete bipartite graph : The complete bipartite graph on m
and n vertices, denoted Km, n is the graph, whose vertex set is
1. a. Define multiset and power set. Determine the power set
partitioned into sets V1 with m vertices and V2 with n vertices in
A = {1, 2}.
which there is an edge between each pair of vertices 1 and 2
where 1 is in V1 and 2 is in V2. The complete bipartite graphs
b. Show that [((p  q)  r)  (~ p)]  (q  r) is tautology or
K2,3, K2,4, K 3,3, K3,5, and K2,6
contradiction.

c. State and prove pigeonhole principle.


K2,3 K2,4 K3,3
d. Show that if set A has 3 elements, then we can have 26
symmetric relation on A.

e. Prove that (P  Q)  (P  Q) is logically equivalent to P  Q.


K3,5 K2,6
Fig. 12. Some complete bipartite graphs. f. How many 4 digit numbers can be formed by using the
digits 2, 4, 6, 8 when repetition of digits is allowed ?

g. The converse of a statement is : If a steel rod is stretched,


 then it has been heated. Write the inverse of the statement.

h. If a and b are any two elements of group G then prove


(a * b) – 1 = (b – 1 * a – 1).

i. If f : A  B is one-one onto mapping, then prove that


f –1 : B  A will be one-one onto mapping.

j. Write the following in DNF (x + y) (x + y).


SP–2 C (CS/IT-Sem-3) Solved Paper (2015-16) Discrete Structures & Theory of Logic SP–3 C (CS/IT-Sem-3)

SECTION – B SECTION – C

2. Prove that n3 + 2n is divisible by 3 using principle of 10. Let L be a bounded distributed lattice, prove if a complement
mathematical induction, where n is natural number. exists, it is unique. Is D12 a complemented lattice ? Draw
the Hasse diagram of [P (a, b, c), <], (Note : ‘<’ stands for
3. Solve the recurrence relation using generating function : subset). Find greatest element, least element, minimal
an – 7an – 1 + 10an – 2 = 0 with a0 = 3, a1 = 3. element and maximal element.

4. Express the following statements using quantifiers and 11. Determine whether each of these functions is a bijective
logical connectives. from R to R.
a. Mathematics book that is published in India has a blue a. f(x) = x2 + 1
cover. b. f(x) = x3
b. All animals are mortal. All human being are animal. c. f(x) = (x2 + 1)/(x2 + 2)
Therefore, all human being are mortal.
c. There exists a mathematics book with a cover that is not 12. a. Prove that inverse of each element in a group is unique.
blue. b. Show that G = [(1, 2, 4, 5, 7, 8), ×9] is cyclic. How many
d. He eats crackers only if he drinks milk. generators are there ? What are they ?
e. There are mathematics books that are published outside
India.
f. Not all books have bibliographies. 
5. Draw the Hasse diagram of [P (a, b, c), ] (Note : ‘’ stands
for subset). Find greatest element, least element, minimal
element and maximal element.

6. Simplify the following boolean expressions using k-map :


a. Y = ((AB) + A + AB)
b. A B C D + A B C D + A B CD + A B CD = A B

7. Let G be the set of all non-zero real number and let


a*b = ab/2. Show that (G*) be an abelian group.

8. The following relation on A = {1, 2, 3, 4}. Determine whether


the following :
a. R = {(1, 3), (3, 1), (1, 1), (1, 2), (3, 3), (4, 4)}.
b. R = AXA
Is an equivalence relation or not.

9. If the permutation of the elements of {1, 2, 3, 4, 5} are given


by a = (1 2 3) (4 5), b = (1) (2) (3) (4 5), c = (1 5 2 4) (3). Find the
value of x, if ax = b. And also prove that the set Z4 = (0, 1, 2, 3)
is a commutative ring with respect to the binary modulo
operation +4 and *4.
SP–4 C (CS/IT-Sem-3) Solved Paper (2015-16) Discrete Structures & Theory of Logic SP–5 C (CS/IT-Sem-3)

3. Since m < n i.e., the number of pigeonhole is less than the number
SOLUTION OF PAPER (2015-16) of pigeons, n – m pigeons are left without having assigned a pigeon
hole.
Note : Attempt all parts. All parts carry equal marks. Write answer of 4. Thus, at least one pigeonhole will be assigned to a more than one
each part in short. (2 × 10 = 20) pigeon.

SECTION – A d. Show that if set A has 3 elements, then we can have 26


symmetric relation on A.
1. a. Define multiset and power set. Determine the power set Ans. Number of elements in set = 3
A = {1, 2}. Number of symmetric relations if number of elements is
Ans. Multiset : Multisets are sets where an element can occur as a n = 2n(n + 1)/2
member more than once. Here, n=3
For example : A = { p, p, p, q, q, q, r, r, r, r}  Number of symmetric relations
B = { p, p, q, q, q, r} = 23(3 + 1)/2
are multisets. = 23(4)/2
Power set : A power set is a set of all subsets of the set. = 26
The power set of A = {1, 2} is {{}, {1}, {2}}. Hence proved.

b. Show that [((p  q)  r)  (~ p)]  (q  r) is tautology or e. Prove that (P  Q)  (P  Q) is logically equivalent to P  Q.


contradiction. Ans. (P  Q)  (P  Q) = P  Q
Ans.
P Q PQ PQ (P  Q)  (P  Q) PQ
p q r p q ~p q r((p q)  r)((pq) r)  (~p)[((p q)  r)
(~p)]  (q r) T T T T T T

T T T T F T T F T T F T F F F

T T F T F F F F T F T T F F F

T F T T F F T F T F F F F T T

T F F T F F F F T
f. How many 4 digit numbers can be formed by using the
F T T T T T T T T digits 2, 4, 6, 8 when repetition of digits is allowed ?
F T F T T F F F T Ans. When repetition is allowed :
The thousands place can be filled by 4 ways.
F F T F T F T T F The hundreds place can be filled by 4 ways.
The tens place can be filled by 4 ways.
F F F F T F T T F The units place can be filled by 4 ways.
 Total number of 4 digit number = 4 × 4 × 4 × 4 = 256
Question is incorrect. Since the result of the question is
contingency. g. The converse of a statement is : If a steel rod is stretched,
then it has been heated. Write the inverse of the statement.
c. State and prove pigeonhole principle.
Ans. The statement corresponding to the given converse is “If a steel
Ans. Pigeonhole principle : If n pigeons are assigned to m pigeonholes rod is stretched, then it has been heated”. Now the inverse of this
then at least one pigeon hole contains two or more pigeons (m < n). statement is “If a steel rod is not stretched then it has not been
Proof : heated”.
1. Let m pigeonholes be numbered with the numbers 1 through m.
2. Beginning with the pigeon 1, each pigeon is assigned in order to the
pigeonholes with the same number.
SP–6 C (CS/IT-Sem-3) Solved Paper (2015-16) Discrete Structures & Theory of Logic SP–7 C (CS/IT-Sem-3)

h. If a and b are any two elements of group G then prove Step III : Inductive step : We have to show that S(k + 1) is true
(a * b) – 1 = (b – 1 * a – 1). i.e., (k + 1)3 + 2(k + 1) is divisible by 3
Ans. Consider (a * b) * (b – 1 * a – 1) Consider (k + 1)3 + 2(k + 1)
= a * (b * b – 1) * a – 1 = k3 + 1 + 3k2 + 3k + 2k + 2
= a * e * a– 1 = (k3 + 2k) + 3(k2 + k + 1)
= a * a–1= e = 3s + 3l where l = k2 + k + 1  N
Also (b * a ) * (a * b) = b – 1 * (a – 1 * a) * b
– 1 – 1 = 3(s + l)
= b–1 * e * b Therefore, S(k + 1) is true
= b–1 * b = e Hence by principle of mathematical induction S(n) is true for all
Therefore (a * b) 1 = b – 1 * a – 1 for any a, b  G
– n  N.

i. If f : A  B is one-one onto mapping, then prove that 3. Solve the recurrence relation using generating function :
an – 7an – 1 + 10an – 2 = 0 with a0 = 3, a1 = 3.
f –1 : B  A will be one-one onto mapping.
Ans. n – 7an – 1 + 10 an – 2 = 0,
a
Ans. Proof : Here f : A  B is one-to-one and onto.
a1, a2  A and b1, b2  B so that Let in assume n  2
b1 = f(a1), b2 = f (a2) and a1 = f–1(b1), a2 = f–1 (b2) Multiply by xn and take sum from 2 to .
As f is one-to-one   
f(a1) = f(a2)  a1 = a2  an xn  7  an –1 xn  10  an2 xn  0
b1 = b2 f–1(b1) = f–1(b2) n 2 n2 n 2
i.e., f (b1) = f–1(b2)  b1 = b2
–1
(a2 x2 + a3 x3 + a4 x4 + ....) – 7 (a1 x2 + a2 x3 + ....)
 f is one-to-one function.
–1
+ 10 (a0 x2 + a1 x3 + ....) = 0
As f is onto.
Every element of B is associated with a unique element of A i.e., We know that

for any a  A is pre-image of some b  B where b = f(a)  a = f–1(b)
i.e., for b  B, there exists f–1 image a  A.
G(x) =  an xn  a0  a1 x  ....
n0
Hence, f–1 is onto. G(x) – a0 – a1 x – 7 x (G(x) – a0) + 10 x2 G(x) = 0
G(x) [1 – 7 x + 10 x2] = a0 + a1 x – 7 a0 x
j. Write the following in DNF (x + y) (x + y). = 3 + 3x – 21 x = 3 – 18 x
Ans. Given : (x + y) (x + y)
3  18 x 3  18 x
The complete CNF in two variables (x, y) G(x) = 
= (x + y) (x + y) (x + y) (x + y) 10 x  7 x  1 10 x  5 x  2 x  1
2 2

Hence, f (x, y) = (x + y) (x + y) 3  18 x 3  18 x


 [f (x, y)] = [(x + y) (x + y)] = 
5 x (2 x  1)  1 (2 x  1) (5 x – 1)(2 x  1)
= xy + xy
Now,
which is the required DNF.
3  18 x A B
= 
SECTION – B (5 x  1) (2 x 1) 5 x  1 2 x  1
3 – 18 x = A (2 x – 1) + B (5 x – 1)
2. Prove that n3 + 2n is divisible by 3 using principle of 1
mathematical induction, where n is natural number. put x=
2
Ans. Let S(n) : n3 + 2n is divisible by 3. 5  3
Step I : Inductive base : For n = 1 3 – 9 = B   1  – 6 = B B = – 4
2 2
(1)3 + 2.1 = 3 which is divisible by 3
Thus, S(1) is true. 1
put x=
Step II : Inductive hypothesis : Let S(k) is true i.e., k3 + 2k is 5
divisible by 3 holds true. 18 2  3 3
3– = A   1     A  1  A = 1
or k3 + 2k = 3s for s  N 5 5  5 5
SP–8 C (CS/IT-Sem-3) Solved Paper (2015-16) Discrete Structures & Theory of Logic SP–9 C (CS/IT-Sem-3)

1 4 4 1 a  a2  I 
 G(x) =  =   ...(2)
5 x  1 2x  1 1  2x 1  5x a  a2  0 
 an = 4.2n – 5n Consider a1 = a1  0
= a1  (a  a2) [from (2)]
4. Express the following statements using quantifiers and = (a1  a)  (a1  a2) [Distributive property]
logical connectives.
= (a  a1)  (a1  a2) [Commutative property]
a. Mathematics book that is published in India has a blue
cover. = I  (a1  a2) [from (1)]
b. All animals are mortal. All human being are animal. = a1  a2 ...(3)
Therefore, all human being are mortal. Now Consider a2 = a2  0
c. There exists a mathematics book with a cover that is not = a2  (a  a1) [from (2)]
blue.
= (a2  a)  (a2  a1) [Distributive property]
d. He eats crackers only if he drinks milk.
e. There are mathematics books that are published outside = (a  a2)  (a1  a2) [Commutative property]
India. = I  (a1  a2) [from (1)]
f. Not all books have bibliographies. = a1  a2 ...(4)
Ans. Hence, from (3) and (4),
a. P(x) : x is a mathematic book published in India
a1 = a2
Q(x) : x is a mathematic book of blue cover
So, for bounded distributive lattice complement is unique.
x P(x)  Q(x).
Hasse diagram of [P(a, b, c), ] is shown in Fig. 1.
b. P(x) : x is an animal
Q(x) : x is mortal {a, b, c}
x P(x)  Q(x)
R(x) : x is a human being
 x R(x)  P(x).
{a, b} {a, c} {b, c}
c. P(x) : x is a mathematics book
Q(x) : x is not a blue color
x, P(x)  Q(x).
d. P(x) : x drinks milk {c}
{a} {b}
Q(x) : x eats crackers
for x, if P(x) then Q(x).
or x, P(x)  Q(x).
e. P(x) : x is a mathematics book 
Q(x) : x is published outside India Fig. 1.
x P(x)  Q(x).
Greatest element is {a, b, c} and maximal element is {a, b, c}.
f. P(x) : x is a book having bibliography ~ x, P(x). The least element is  and minimal element is .

5. Draw the Hasse diagram of [P (a, b, c), ] (Note : ‘’ stands 6. Simplify the following boolean expressions using k-map :
for subset). Find greatest element, least element, minimal a. Y = ((AB) + A + AB)
element and maximal element. b. A B C D + A B C D + A B CD + A B CD = A B
Ans. Let a1 and a2 be two complements of an element a  L. Ans.
Then by definition of complement a. Y = ((AB) + A + AB)
a  a1  I  = ((AB)) (A + (AB))
 ...(1) = (AB) ((A) (AB))
a  a1  0 
SP–10 C (CS/IT-Sem-3) Solved Paper (2015-16) Discrete Structures & Theory of Logic SP–11 C (CS/IT-Sem-3)

= AB (A (A + B))  ab = 4
= AB (AA + AB) 4
 b=
= AB(0 + AB) = AB AB a
= ABB
4
=0  The inverse of a is ,  a  G.
Here, we find that the expression is not in minterm. For getting a
v. Commutative : Let a, b  G
minterm, we simplify and find that its value is already zero. Hence,
no need to use K-map for further simplification. ab
a*b=
b. A B C D + A B C D + A B CD + A B CD = A B 2
= A BCD + ABCD + ABCD + ABCD ba ab
and b*a= 
CD AB 2 2
 * is commutative.
ABCD 1 Thus, (G, *) is an abelian group.
ABCD 1
8. The following relation on A = {1, 2, 3, 4}. Determine whether
ABCD 1
the following :
ABCD 1 a. R = {(1, 3), (3, 1), (1, 1), (1, 2), (3, 3), (4, 4)}.
Fig. 2. b. R = A × A
Is an equivalence relation or not.
On simplification by K-map, we get AB corresponding to all the
Ans.
four one’s.
a. R = {(1, 3), (3, 1), (1, 1), (1, 2), (3, 3), (4, 4)}
Reflexive : (a, a)  R  a  A
7. Let G be the set of all non-zero real number and let
 (1, 1)  R, (2, 2)  R
a*b = ab/2. Show that (G*) be an abelian group.
 R is not reflexive.
Ans. Symmetric : Let (a, b)  R then (b, a)  R.
i. Closure property : Let a, b  G.
 (1, 3)  R so (3, 1)  R
a*b=
ab
 G as ab  0  (1, 2)  R but (2, 1)  R
2  R is not symmetric.
 * is closure in G. Transitive : Let (a, b)  R and (b, c)  R then (a, c)  R
ii. Associativity : Let a, b, c  G  (1, 3)  R and (3, 1)  R so (1, 1)  R
 bc  a(bc) abc  (2, 1)  R and (1, 3)  R but (2, 3)  R
Considera * (b * c) = a *      R is not transitive.
2 4 4
Since, R is not reflexive, not symmetric, and not transitive so R is
 ab (ab) c abc
(a * b) * c =   * c =
 2  not an equivalence relation.
4 4 b. R = A × A
 * is associative in G. Since, A × A contains all possible elements of set A. So, R is reflexive,
iii. Existence of the identity : Let a  G and  e such that symmetric and transitive. Hence R is an equivalence relation.
ae
a*e= =a
2 9. If the permutation of the elements of {1, 2, 3, 4, 5} are given
 ae = 2a by a = (1 2 3) (4 5), b = (1) (2) (3) (4 5), c = (1 5 2 4) (3). Find the
 e=2 value of x, if ax = b. And also prove that the set Z4 = (0, 1, 2, 3)
 2 is the identity element in G. is a commutative ring with respect to the binary modulo
iv. Existence of the inverse : Let a  G and b  G such that a * b = operation +4 and *4.
e=2 Ans. ax = b  (123) (45) x = (1) (2) (3) (4, 5)

ab
=2  1 2 3 4 5  1 2 3 4 5  1 2 3 4 5
     x
2  2 3 1 4 5  1 2 3 5 4  1 2 3 5 4
SP–12 C (CS/IT-Sem-3) Solved Paper (2015-16) Discrete Structures & Theory of Logic SP–13 C (CS/IT-Sem-3)

 1 2 3 4 5  1 2 3 4 5 = least positive remainder when ab + ac is divided by 4


 2 3 1 5 4 x =  1 2 3 5 4 = ab +4ac
= a ×4b +4a ×4c
1
 1 2 3 4 5  1 2 3 4 5 For a ×4b = a × b (mod 4)
x= 
 2 3 1 5 4  1 2 3 5 4 Since (Z4, +4) is an abelian group, (Z4, ×4) is a semigroup and the
operation is distributive over addition. The (Z4, +4, ×4) is a ring. Now
 2 3 1 5 4  1 2 3 4 5 (Z4, ×4 ) is commutative with respect to ×4 . Therefore, it is a
= 
 1 2 3 4 5  1 2 3 5 4 commutative ring.

 1 2 3 4 5  1 2 3 4 5 SECTION – C
= 
 3 1 2 5 4  1 2 3 5 4
10. Let L be a bounded distributed lattice, prove if a complement
 1 2 3 4 5 exists, it is unique. Is D12 a complemented lattice ? Draw
x=
 3 1 2 4 5 the Hasse diagram of [P (a, b, c), <], (Note : ‘<’ stands for
subset). Find greatest element, least element, minimal
4 0 1 2 3 4 0 1 2 3 element and maximal element.
0 0 1 2 3 0 0 0 0 0 Ans. Let a1 and a2 be two complements of an element a  L.
Then by definition of complement
1 1 2 3 0 1 0 1 2 3
a  a1  I 
2 2 3 0 1 2 0 2 0 2  ...(1)
a  a1  0 
3 3 0 1 2 3 0 3 2 1
We find from these tables : a  a2  I 
 ...(2)
i. All the entries in both the tables belong to Z4. Hence, Z4 is closed a  a2  0 
with respect to both operations. Consider a1 = a1  0
ii. Commutative law : The entries of 1st, 2nd, 3rd, 4th rows are identical = a1  (a  a2) [from (2)]
with the corresponding elements of the 1st, 2nd, 3rd, 4th columns = (a1  a)  (a1  a2) [Distributive property]
respectively in both the tables. Hence, Z4 is commutative with respect = (a  a1)  (a1  a2) [Commutative property]
to both operations.
= I  (a1  a2) [from (1)]
iii. Associative law : The associative law for addition and multiplication
= a1  a2 ...(3)
a +4 (b +4 c) = (a +4 b) +4 c for all a, b, c Z4
Now Consider a2 = a2  0
a ×4 (b ×4 c) = (a ×4 b) ×4 c, for all a, b, c Z4
= a2  (a  a1) [from (2)]
can easily be verified.
= (a2  a)  (a2  a1) [Distributive property]
iv. Existence of identity : 0 is the additive identity and 1 is
multiplicative identity for Z4. = (a  a2)  (a1  a2) [Commutative property]
v. Existence of inverse : The additive inverses of 0, 1, 2, 3 are 0, 3, 2, = I  (a1  a2) [from (1)]
1 respectively. = a1  a2 ...(4)
Multiplicative inverse of non-zero element 1, 2, 3 are 1, 2, 3 Hence, from (3) and (4),
respectively. a1 = a2
vi. Distributive law : Multiplication is distributive over addition i.e., So, for bounded distributive lattice complement is unique.
a ×4(b +4c) = a ×4b + a ×4c Hasse diagram of [P(a, b, c), ] is shown in Fig. 3.
(b +4c) ×4a = b ×4a + c ×4a
For, a ×4(b +4c) = a ×4(b + c) for b +4 c = b + c (mod 4)
= least positive remainder when a × (b + c) is
divided by 4
SP–14 C (CS/IT-Sem-3) Solved Paper (2015-16) Discrete Structures & Theory of Logic SP–15 C (CS/IT-Sem-3)

{a, b, c} If x1 = 1, x2 = – 1 then f(x1) = f(x2)


but x1  x2
 f is not one-to-one.
Hence, f is not bijective.
{a, b} {a, c} {b, c}
12. a. Prove that inverse of each element in a group is unique.
b. Show that G = [(1, 2, 4, 5, 7, 8), ×9] is cyclic. How many
generators are there ? What are they ?
{a} {b} {c} Ans.
a. Let (if possible) b and c be two inverses of element a  G.
Then by definition of group :
b*a= a*b=e
 and a*c= c*a=e
Fig. 3. where e is the identity element of G
Greatest element is {a, b, c} and maximal element is {a, b, c}. Now b = e * b = (c * a) * b
The least element is  and minimal element is . = c * (a * b)
= c*c
11. Determine whether each of these functions is a bijective =c
from R to R. b=c
a. f(x) = x2 + 1 Therefore, inverse of an element is unique in (G, *).
b. f(x) = x3 b. Composition table for X9 is
c. f(x) = (x2 + 1)/(x2 + 2)
Ans.
X9 1 2 4 5 7 8
x2
a. f(x) = + 1 1 2 3 4 5 7 8
Let x1, x2  R such that 2 2 4 8 1 5 7
f(x1) = f(x2 ) 4 4 8 7 2 1 5
x 12 + 1 = x 22 + 1 5 5 1 2 7 8 4
x12 = x22 7 7 5 1 8 4 2
x1 = ± x2 8 8 7 5 4 2 1
Therefore, if x2 = 1 then x1 = ± 1 1 is identity element of group G
So, f is not one-to-one. 21 = 2  2 mod 9
Hence, f is not bijective. 22 = 4  4 mod 9
b. Let x1, x2  R such that f(x1) = f(x2) 23 = 8  8 mod 9
x13 = x23 24 = 16  7 mod 9
x1 = x2 25 = 32  5 mod 9
 f is one-to-one. 26 = 64  1 mod 9
Let y  R such that Therefore, 2 is generator of G. Hence G is cyclic.
y = x3 Similarly, 5 is also generator of G.
x = (y)1/3 Hence there are two generators 2 and 5.
For  y  R  a unique x  R such that y = f (x)
 f is onto.
Hence, f is bijective.
c. Let x1, x2  R such that f(x1) = f(x2)

x12  1 x2  1
 = 22
x1  2
2
x2  2
Discrete Structures & Theory of Logic SP–1 C (CS/IT-Sem-3) SP–2 C (CS/IT-Sem-3) Solved Paper (2016-17)

B.Tech. Section-B

(SEM. III) ODD SEMESTER Note : Attempt any five questions from this section. (10 × 5 = 50)

THEORY EXAMINATION, 2016-17 2. Write the s ymbolic form and negate the following
DISCRETE STRUCTURES AND statements :
• Everyone who is healthy can do all kinds of work.
GRAPH THEORY • Some people are not admired by everyone.
• Everyone should help his neighbours, or his neighbours
Time : 3 Hours Max. Marks : 100 will not help him.

3. In a lattice if a  b  c, then show that


a. a  b = b  c
Section-A
b. (a  b)  (b  c) = (a  b)  (a  c) = b
Note : Attempt all parts. All parts carry equal marks. Write answer of
4. State and prove Lagrange’s theorem for group. Is the
each part in short. (2 × 10 = 20)
converse true ?
1. a. Let R be a relation on the set of natural numbers N, as
5. Prove that a simple graph with n vertices and k components
R = {(x, y) : x, y  N, 3x + y = 19}. Find the domain and range of
R. Verify whether R is reflexive. (n  k) ( n  k  1)
can have at most edges.
2
b. Show that the relation R on the set Z of integers given by
R = {(a, b) : 3 divides a – b}, is an equivalence relation.
1 1 1 n
6. Prove by induction : + + ... + = .
c. Show the implications without constructing the truth table 1.2 2.3 n ( n + 1) ( n + 1)
(P  Q)  Q  P  Q.
7. Solve the recurrence relation yn + 2 – 5yn + 1 + 6yn = 5n subject
d. Show that the “greater than or equal” relation (>=) is a
to the condition y0 = 0, y1 = 2.
partial ordering on the set of integers.
8. a. Prove that every finite subset of a lattice has an LUB and a
e. Distinguish between bounded lattice and complemented
GLB.
lattice.
b. Give an example of a lattice which is a modular but not a
distributive.
f. Find the recurrence relation from yn = A2n + B(–3)n.
9. Explain in detail about the binary tree traversal with an
g. Define ring and give an example of a ring with zero divisors.
example.
h. State the applications of binary search tree.
Section-C
i. Define multigraph. Explain with example in brief.
Note : Attempt any two questions from this section. (15 × 2 = 30)
10. a. Prove that a connected graph G is Euler graph if and only if
j. Let G be a graph with ten vertices. If four vertices has degree
every vertex of G is of even degree.
four and six vertices has degree five, then find the number
b. Which of the following simple graph have a Hamiltonian
of edges of G.
circuit or, if not a Hamiltonian path ?
Discrete Structures & Theory of Logic SP–3 C (CS/IT-Sem-3) SP–4 C (CS/IT-Sem-3) Solved Paper (2016-17)

a b a b a b g SOLUTION OF PAPER (2016-17)

Section-A

c f Note : Attempt all parts. All parts carry equal marks. Write answer of
e c d d c e each part in short. (2 × 10 = 20)

d 1. a. Let R be a relation on the set of natural numbers N, as


G1 G2 G3 R = {(x, y) : x, y  N, 3x + y = 19}. Find the domain and range of
Fig. 1. R. Verify whether R is reflexive.
Ans. By definition of relation,
11. a. Find the Boolean algebra expression for the following R = {(1, 16), (2, 13), (3, 10), (4, 7), (5, 4), (6, 1)}
system.  Domain = {1, 2, 3, 4, 5, 6}
 Range = {16, 13, 10, 7, 4, 1}
A R is not reflexive since (1, 1)  R.
B
C
b. Show that the relation R on the set Z of integers given by
R = {(a, b) : 3 divides a – b}, is an equivalence relation.
Ans. Reflexive : a – a = 0 is divisible by 3
 (a, a)  R  a  Z
 R is reflexive.
Symmetric : Let (a, b)  R  a – b is divisible by 3
Fig. 2.
 – (a – b) is divisible by 3
 b – a is divisible by 3
b. Suppose that a cookie shop has four different kinds of
 (b, a)  R
cookies. How many different way can six cookies be chosen ?
 R is symmetric.
Transitive : Let (a, b)  R and (b, c)  R
12. a. Prove that every cyclic group is an abelian group.
a – b is divisible by 3 and b – c is divisible by 3
b. Obtain all distinct left cosets of {(0), (3)} in the group (Z6, +6)
Then a – b + b – c is divisible by 3
and find their union.
a – c is divisible by 3
c. Find the left cosets of {[0], [3]} in the group (Z6, +6).
 (a, c)  R
 R is transitive.
 Hence, R is equivalence relation.

c. Show the implications without constructing the truth table


(P  Q)  Q  P  Q.
Ans. (P  Q)  Q  P  Q
Take L.H.S
(P  Q)  Q = (~P  Q)  Q
= (~(~P  Q))  Q
= (P ~ Q)  Q
= (P  Q)  (~ Q  Q)
= (P  Q)  T = P  Q
It is equivalent.
Discrete Structures & Theory of Logic SP–5 C (CS/IT-Sem-3) SP–6 C (CS/IT-Sem-3) Solved Paper (2016-17)

d. Show that the “greater than or equal” relation (>=) is a iii. There exists an element 0  R such that
partial ordering on the set of integers. 0 + a = a = a + 0,  a  R
Ans. Reflexive : iv. To each element a in R there exists an element – a in R such that
a  a  a  Z (set of integer) a + (– a) = 0
(a, a)  A v. Multiplication is associative i.e.,
 R is reflexive.
a.(b.c) = (a.b).c,  a b, c  R
Antisymmetric : Let (a, b)  R and (b, a)  R
 a  b and b  a vi. Multiplication is distributive with respect to addition i.e., for all
 a=b a, b, c R,
 R is antisymmetric. Example of ring with zero divisors : R = {a set of 2 × 2
Transitive : Let (a, b)  R and (b, c)  R matrices}.
 a  b and b  c Field : A ring R with at least two elements is called a field if it has
 a c  (a, c)  R following properties :
 R is transitive. i. R is commutative
Hence, R is partial order relation. ii. R has unity
iii. R is such that each non-zero element possesses multiplicative
e. Distinguish between bounded lattice and complemented inverse.
lattice. For example : The rings of real numbers and complex numbers
are also fields.
Ans. Bounded lattice : A lattice which has both elements 0 and 1 is
called a bounded lattice.
Complemented lattice : A lattice L is called complemented lattice h. State the applications of binary search tree.
if it is bounded and if every element in L has complement. Ans. One of the most common applications is to efficiently store data in
sorted form in order to access and search stored elements quickly.
f. Find the recurrence relation from yn = A2n + B(–3)n. For example, std :: map or std :: set in C++ Standard Library.
Binary tree as data structure is useful for various implementations
Ans. Given : yn = A2n + B (– 3)n
Therefore, yn + 1 = A(2)n + 1 + B (– 3)n + 1 of expression parsers and expression solvers.
= 2A (2)n – 3B (– 3)n
and yn + 2 = A(2)n + 2 + B (– 3)n + 2 i. Define multigraph. Explain with example in brief.
= 4A (2)n + 9B (– 3)n Ans. A multigraphs G(V, E) consists of a set of vertices V and a set of
Eliminating A and B from these equations, we get edges E such that edge set E may contain multiple edges and self
loops.
yn 1 1 Example :
yn1 2 – 3 = 0 a. Undirected multigraph :
yn 2 4 9 e2
v1 v2
= yn + 2 – yn + 1 – 6yn = 0 which is the e6
required recurrence relation.
e5
g. Define ring and give an example of a ring with zero divisors. e1
e3
Ans. Ring : A non-empty set R is a ring if it is equipped with two binary
operations called addition and multiplication and denoted by '+'
and '.' respectively i.e., for all a, b  R we have a + b R and a.b  R e4
v4 v3
and it satisfies the following properties :
i. Addition is associative i.e.,
Fig. 1.
(a + b) + c = a + (b + c)  a, b, c  R
ii. Addition is commutative i.e.,
a + b = b + a  a, b  R
Discrete Structures & Theory of Logic SP–7 C (CS/IT-Sem-3) SP–8 C (CS/IT-Sem-3) Solved Paper (2016-17)

b. Directed multigraph : will not help x” and it is (  x) (  y)[N(x, y)  (H(x, y)  P(y, x))]
e7
v1 e3 v2 Negation : (  x) (  y) [N(x, y)  (H (x, y) P (y, x))]

e1 e2 e4 e5 3. In a lattice if a  b  c, then show that


v4 a. a  b = b  c
e6 v3
b. (a  b)  (b  c) = (a  b)  (a  c) = b
Fig. 2. Ans.
a. Given : a  b  c
j. Let G be a graph with ten vertices. If four vertices has degree Now a  b = least upper bound of a, b
four and six vertices has degree five, then find the number = least {all upper bounds of a, b}
of edges of G. = least {b, c, ...} [using a  b  c]
Ans. We know that =b ...(1)
 deg (vi ) = 2e and b  c = greatest lower bound of b, c
i = maximum {all lower bounds of b, c}
4 + 4 + 4 + 4 + 5 + 5 + 5 + 5 + 5 + 5 = 2e = maximum {b, a, ...} [using a  b  c]
16 + 30 = 2e =b ...(2)
2e = 46 Eq. (1) and (2) gives, a b = b c
e = 23 b. (a  b)  (b c)  (a  b)  (a  c) = b
Consider, (a  b) (b  c)
Section-B
= b  b [using a  b  c and definition of  and ]
Note : Attempt any five questions from this section. (10 × 5 = 50) =b ...(3)
and(a  b)  (a c) = bc
2. Write the s ymbolic form and negate the following =b ...(4)
statements : From eq. (3) and (4), (a  b)  (b  c) = (a  b)  (a  c) = b.
• Everyone who is healthy can do all kinds of work.
• Some people are not admired by everyone. 4. State and prove Lagrange’s theorem for group. Is the
• Everyone should help his neighbours, or his neighbours converse true ?
will not help him. Ans. Lagrange’s theorem :
Ans. Statement : The order of each subgroup of a finite group is a
a. Symbolic form : divisor of the order of the group.
Let P(x): x is healthy and Q(x): x do all work Proof : Let G be a group of finite order n. Let H be a subgroup of G
 x(P(x)  Q(x)) and let O(H) = m. Suppose h1, h2.... ..., hm are the m members of H.
Negation : (  x (P(x)  Q(x)) Let a  G, then Ha is the right coset of H in G and we have
b. Symbolic form : Ha = {h1 a, h2 a,....hm a}
Let P(x) : x is a person Ha has m distinct members, since = hi a = hj a  hi = hj
A(x, y) : x admires y Therefore, each right coset of H in G has m distinct members. Any
The given statement can be written as “There is a person who is not two distinct right cosets of H in G are disjoint i.e., they have no
admired by some person” and it is (x) ( y)[P(x)  P(y)   A(x, y)] element in common. Since G is a finite group, the number of distinct
Negation : ( x) ( y) [P (x)  P(y)  A(x, y)] right cosets of H in G will be finite, say, equal to k. The union of
c. Symbolic form : these k distinct right cosets of H in G is equal to G.
Let N(x, y) : x and y are neighbours Thus, if Ha1, Ha2,...., Hak are the k distinct right cosets of H in G.
H(x, y) : x should help y Then G = Ha1  Ha2  Ha3  ....  Hak
P(x, y) : x will help y  the number of elements in G = the number of elements in
Ha1 + ...... + the number of elements in Ha2 +......+ the number of
The statement can be written as “For every person x and every elements in Hak
person y, if x and y are neighbours, then either x should help y or y
Discrete Structures & Theory of Logic SP–9 C (CS/IT-Sem-3) SP–10 C (CS/IT-Sem-3) Solved Paper (2016-17)

 O(G) = km = n(n – k + 1) – k (n – k + 1)
 n = km = (n – k)(n – k + 1) ...(1)
n We know that the maximum number of edges in the ith component
 k= of
m
 m is a divisor of n. ni (ni  1)
ni
 O(H) is a divisor of O(G). G= C2 =
2
Proof of converse : If G be a finite group of order n and n  G,
then Therefore, the maximum number of edges in G is :
an = e
Let o (a) = m which implies am = e.
1
2
 ni (ni  1) =
1
2
 
ni2   ni =
1
2

 ni2  n  
Now, the subset H of G consisting of all the integral power of a is a 1
subgroup of G and the order of H is m.  (n – k)(n – k + 1) by using eq. (1)
2
Then, by the Lagrange’s theorem, m is divisor of n.
Let n = mk, then
an = amk = (am)k = ek = e 1 1 1 n
6. Prove by induction : + + ... + = .
 Yes, the converse is true. 1.2 2.3 n ( n + 1) ( n + 1)
Ans. Let the given statement be denoted by S(n).
5. Prove that a simple graph with n vertices and k components 1. Inductive base : For n = 1
(n  k) ( n  k  1) 1 1 1
can have at most edges. = 
2 1.2 11 2
Ans. Let the number of vertices in each of the k-components of a graph Hence S (1) is true.
G be n1, n2, ...., nk, then we get 2. Inductive hypothesis : Assume that S (k) is true i.e.,
n1 + n2 + ... + nk = n where ni  1 (i = 1, 2, ..., k)
1 1 1 k
k k   .....  =
 n  1 = n – k k(k  1) k  1
k
Now,  (n
i 1
i  1) =
i 1
i
i 1
1.2 2.3
3. Inductive step : We wish to show that the statement is true for
2 n = k + 1 i.e.,
 k

   (ni  1) = n + k – 2nk
2 2
1 1 1 k1
i 1   .....  =
k k
1.2 2.3 (k  1)(k  2) k2
or  (n
i 1
i  1)2  2  (ni  1)(n j  1) = n2 + k2 – 2nk
i 1 j 1 Now,
1

1
 ..... 
1

1
i j 1.2 2.3 k(k  1) ( k  1)(k  2)
k
k2  2k  1
or  (n
i 1
i  1)2 + 2(non-negative terms) = n2 + k2 – 2nk =
k

1

k  1 ( k  1)(k  2) ( k  1)(k  2)
[ ni – 1  0, nj – 1  0] k1
k =
k2
or  (n
i 1
i  1) n2 + k2 – 2nk
2

Thus, S(k + 1) is true whenever S(k) is true. By principle of


k k k mathematical induction, S(n) is true for all positive integer n.
or  n   1  2 n
i 1
2
i
i 1 i 1
i  n2 + k2 – 2nk
7. Solve the recurrence relation yn + 2 – 5yn + 1 + 6yn = 5n subject
k
to the condition y0 = 0, y1 = 2.
or n
i 1
2
i  k  2n  n2 + k2 – 2nk
Ans.
k 
or  ni2  n  n2 + k2 – 2nk – k + n
i 1
Let G(t) = a t
n 0
n
n
be generating function of sequence {an}.
Discrete Structures & Theory of Logic SP–11 C (CS/IT-Sem-3) SP–12 C (CS/IT-Sem-3) Solved Paper (2016-17)

Multiplying given equation by tn and summing from t2


n = 0 to , we have C = (1 – 2t)
(1 – 5t)(1 – 3t)(1 – 2t) t  1/2
   


n 0
an  2 t n – 5 
n 0
an  1 t n  6 
n 0
an t n  5
n 0
n
tn
=
t2
=
1/ 4
(1 – 5t)(1 – 3t) t  1/2 (2 – 5) (2 – 3)

G(t) – a0 – a1 t  G (t) – a0  1 2 2
– 5   6 G (t ) 
t2  t  1 – 5t 1
Put a0 = 0 and a1 = 2 =
3
t2 Again,
G(t) – 2t – 5t G(t) + 6t2 G(t) = 2t D E
1 – 5t = 
(1 – 3t)(1 – 2t) (1 – 3t) (1 – 2t)
t2
G(t) – 5t G(t) + 6t2 G(t) = + 2t 2t
1 – 5t D = (1 – 3t)
(1 – 3t)(1 – 2t) t  1/3
t2
G(t) (1 – 5t + 6t2) = + 2t
1 – 5t 2t 2/3
= = 2
(1 – 2t) t  1/3 (3 – 2)
t2
(6t2 – 5t + 1) G(t) = + 2t 3
1 – 5t
2t
t2 2t E = (1 – 2t)
G(t) =  (1 – 3t)(1 – 2t) t  1/ 2
(1 – 5t)(3t – 1)(2t – 1) (3t – 1)(2t – 1)
2t 2/2
t2 2t = = –2
=  (1 – 3t) t  1/ 2 2–3
(1 – 5t)(1 – 3t)(1 – 2t) (1 – 3t)(1 – 2t) 2
Let
1/ 6 1/ 2 1/3 2 2
t2 A B C G(t) = –   –
=   (1 – 5t) (1 – 3t) (1 – 2t) (1 – 3t) (1 – 2t)
(1 – 5t)(1 – 3t)(1 – 2t) (1 – 5t) (1 – 3t) (1 – 2t)
1/6 3/2 5/3
=  –
t2 1 – 5t (1 – 3t) 1 – 2t
A = (1 – 5t)
(1 – 5t)(1 – 3t)(1 – 2t) t  1/5    

   
1 3 5
an t n = (5t)n  (3t) n – (2t)n
t2 n 0
6 n 0
2 n 0
3 n 0
=
(1 – 3t)(1 – 2t) t  1/5 1 n 3 n 5 n
 an = (5)  (3) – (2)
1 / 25 1 6 2 3
= =
(1 – 3 / 5)(1 – 2 / 5) 6
8. a. Prove that every finite subset of a lattice has an LUB and a
t2 GLB.
B = (1 – 3t)
(1 – 5t)(1 – 3t)(1 – 2t) t  1/3 b. Give an example of a lattice which is a modular but not a
distributive.
t2 1/9 Ans.
= =
(1 – 5t)(1 – 2t) t  1/3  3 – 5   3 – 2  a.
 3   3  1. The theorem is true if the subset has 1 element, the element being
1 its own glb and lub.
= – 2. It is also true if the subset has 2 elements.
2
Discrete Structures & Theory of Logic SP–13 C (CS/IT-Sem-3) SP–14 C (CS/IT-Sem-3) Solved Paper (2016-17)

3. Suppose the theorem holds for all subsets containing 1, 2, ..., k A binary tree with 12 vertices :
elements, so that a subset a1, a2, ..., ak of L has a glb and a lub.
A
4. If L contains more than k elements, consider the subset
B C
{a1, a2, ..., ak + 1} of L.
D G
5. Let w = lub (a1, a2, ..., ak). E F
6. Let t = lub (w, ak + 1). H I
7. If s is any upper bound of a1, a2, ..., ak + 1, then s is  each of a1, a2, ..., J K L
ak and therefore s  w. Fig. 3.
8. Also, s  ak + 1 and therefore s is an upper bound of w and ak + 1. Preorder (NLR) : A B D H I E J C F K L G
9. Hence s  t. Inorder (LNR) : HDIBJEAKFLCG
10. That is, since t  each a1, t is the lub of a1, a2, ..., ak + 1. Postorder (LRN) : H I D J E B K L F G C A
11. The theorem follows for the lub by finite induction. Section-C
12. If L is finite and contains m elements, the induction process stops
when k + 1 = m. Note : Attempt any two questions from this section. (15 × 2 = 30)
b. 10. a. Prove that a connected graph G is Euler graph if and only if
1. The diamond is modular, but not distributive. every vertex of G is of even degree.
2. Obviously the pentagon cannot be embedded in it. b. Which of the following simple graph have a Hamiltonian
3. The diamond is not distributive : circuit or, if not a Hamiltonian path ?
y  (x  z) = y (y  x)  (y  z) = 1 a b a b a b g
4. The distributive lattices are closed under sublattices and every
sublattice of a distributive lattice is itself a distributive lattice.
5. If the diamond can be embedded in a lattice, then that lattice has a
non-distributive sublattice, hence it is not distributive.
c d c f
e d c e
9. Explain in detail about the binary tree traversal with an
example.
d
Ans. Tree traversal : A traversal of tree is a process in which each
vertex is visited exactly once in a certain manner. For a binary tree G1 G2 G3
we have three types of traversal : Fig. 4.
1. Preorder traversal : Each vertex is visited in the following order : Ans.
a. Visit the root (N). a.
b. Visit the left child (or subtree) of root (L). 1. First of all we shall prove that if a non-empty connected graph is
c. Visit the right child (or subtree) of root (R). Eulerian then it has no vertices of odd degree.
2. Postorder traversal : 2. Let G be Eulerian.
a. Visit the left child (subtree) of root. 3. Then G has an Eulerian trail which begins and ends at u.
b. Visit the right child (subtree) of root. 4. If we travel along the trail then each time we visit a vertex. We use
c. Visit the root. two edges, one in and one out.
3. Inorder traversal : 5. This is also true for the start vertex because we also end there.
a. Visit the left child (subtree) of root. 6. Since an Eulerian trail uses every edge once, the degree of each
b. Visit the root. vertex must be a multiple of two and hence there are no vertices of
c. Visit the right child (subtree) of root. odd degree.
7. Now we shall prove that if a non-empty connected graph has no
vertices of odd degree then it is Eulerian.
8. Let every vertex of G have even degree.
9. We will now use a proof by mathematical induction on |E(G)|, the
number of edges of G.
Discrete Structures & Theory of Logic SP–15 C (CS/IT-Sem-3) SP–16 C (CS/IT-Sem-3) Solved Paper (2016-17)

Basis of induction : Ans.


Let |E(G)| = 0, then G is the graph K1, and G is Eulerian. A ABC
Inductive step : B
C ABC + A(B + C)
1. Let P(n) be the statement that all connected graphs on n edges of A.(B + C)
even degree are Eulerian. B
2. Assume P(n) is true for all n < |E(G)|. B + C
3. Since each vertex has degree at least two, G contains a cycle C.
C
4. Delete the edges of the cycle C from G.
5. The resulting graph, G say, may not be connected.
Fig. 6.
6. However, each of its components will be connected, and will have
fewer than |E(G)| edges.
7. Also, all vertices of each component will be of even degree, because b. Suppose that a cookie shop has four different kinds of
cookies. How many different way can six cookies be chosen ?
the removal of the cycle either leaves the degree of a vertex
unchanged, or reduces it by two. Ans. As the order in which each cookie is chosen does not matter and
each kind of cookies can be chosen as many as 6 times, the number
8. By the induction assumption, each component of G is therefore
Eulerian. of ways these cookies can be chosen is the number of 6-combination
with repetition allowed from a set with 4 distinct elements.
9. To show that G has an Eulerian trail, we start the trail at a vertex,
u say, of the cycle C and traverse the cycle until we meet a vertex, The number of ways to choose six cookies in the bakery shop is the
number of 6 combinations of a set with four elements.
c1 say, of one of the components of G .
10. We then traverse that component’s Eulerian trail, finally returning C(4 + 6 – 1, 6) = C(9, 6)
Since C(9, 6) = C(9, 3) = (9 · 8 · 7) / (1 · 2 · 3) = 84
to the cycle C at the same vertex, c1.
11. We then continue along the cycle C, traversing each component of Therefore, there are 84 different ways to choose the six cookies.
G  as it meets the cycle.
12. a. Prove that every cyclic group is an abelian group.
12. Eventually, this process traverses all the edges of G and arrives
b. Obtain all distinct left cosets of {(0), (3)} in the group (Z6, +6)
back at u, thus producing an Eulerian trail for G.
and find their union.
13. Thus, G is Eulerian by the principle of mathematical induction.
c. Find the left cosets of {[0], [3]} in the group (Z6, +6).
b. G1 : The graph G1 shown in Fig. 4 contains Hamiltonian circuit, i.e.,
a – b – c – d – e – a and also a Hamiltonian path, i.e., abcde. Ans.
a. Let G be a cyclic group and let a be a generator of G so that
G2 : The graph G2 shown in Fig. 4 does not contain Hamiltonian
G = <a> = {an : n  Z}
circuit since every cycle containing every vertex must contain the
If g1 and g2 are any two elements of G, there exist integers r and s
edge e twice. But the graph does have a Hamiltonian path a – b – c
such that g1 = ar and g2 = as. Then
– d.
g1 g2 = ar as = ar+s = as+r = as . ar = g2g1
G3 : The graph G3 shown in Fig. 4 neither have Hamiltonian circuit
So, G is abelian.
nor have Hamiltonian path because any traversal does not cover all
b.  [0] + H = [3] + H, [1] + [4] + H and [2] + H = [5] + H are the three
the vertices.
distinct left cosets of H in (Z6 , + 6 ).
We would have the following left cosets :
11. a. Find the Boolean algebra expression for the following
g1H = {g1 h, h  H}
system.
g2H = {g2 h, h  H}
A gnH = {gn h, h  H}
B
C The union of all these sets will include all the g s, since for each set
gk = {gk h, h  H}
we have ge gk = {gk h, h  H}
where e is the identity.
Then if we make the union of all these sets we will have at least all
the elements of g. The other elements are merely gh for some h.
Fig. 5.
Discrete Structures & Theory of Logic SP–17 C (CS/IT-Sem-3) Discrete Structures & Theory of Logic SP–1 C (CS/IT-Sem-3)

But since ghG they would be repeated elements in the union. So, B.Tech.
the union of all left cosets of H in G is G, i.e.,
Z6 = {[0], [1], [2], [3], [4], [5]} (SEM. III) ODD SEMESTER
c. Let Z6 = {[0], [1], [2], [3], [4], [5]} be a group.
H = {[0], [3]} be a subgroup of (Z6, +6).
THEORY EXAMINATION, 2017-18
The left cosets of H are, DISCRETE STRUCTURES &
[0] + H = {[0], [3]}
[1] + H = {[1], [4]}
THEORY OF LOGIC
[2] + H = {[2], [5]}
[3] + H = {[3], [0]} Time : 3 Hours Max. Marks : 70
[4] + H = {[4], [1]}
[5] + H = {[5], [2]} Note : 1. Attempt all Sections. If require any missing data; then choose
suitably.
 2. Any special paper specific instructions.

SECTION – A

1. Attempt all questions in brief. (2 × 7 = 14)


a. Define Eulerian path, circuit and graph.

b. Let A = (2, 4, 5, 7, 8) = B, aRb if and only if a + b <= 12. Find


relation matrix.

c. Explain edge colouring and k-edge colouring.

d. Define chromatic number and isomorphic graph.

e. Define union and intersection of multiset and find for


A = [1, 1, 4, 2, 2, 3], B = [1, 2, 2, 6, 3, 3]

f. Find the contrapositive of “If he has courage, then he will


win”.

g. Define rings and write its properties.

SECTION-B

2. Attempt any three of the following : (7 × 3 = 21)


a. Prove by mathematical induction
3 + 33 + 333 + ............ 3333 = (10n + 1 – 9n – 10)/27

b. Define the following with one example :


i. Bipartite graph ii. Complete graph
iii. How many edges in K7 and K3, 6 iv. Planar graph

c. For any positive integer D36, then find whether (D36, ‘|’) is
lattice or not ?
SP–2 C (CS/IT-Sem-3) Solved Paper (2017-18) Discrete Structures & Theory of Logic SP–3 C (CS/IT-Sem-3)

d. Let X = {1, 2, 3 ...... 7} and R = {(x, y)|(x – y) is divisible by 3}. Is


R equivalence relation. Draw the digraph of R. SOLUTION OF PAPER (2017-18)

e. Simplify the following Boolean function using K-map : Note : 1. Attempt all Sections. If require any missing data; then choose
F(x, y, z) = (0, 2, 3, 7) suitably.
2. Any special paper specific instructions.
SECTION-C
3. Attempt any one part of the following : (7 × 1 = 7) SECTION – A
a. Solve ar – 6ar – 1 + 8ar – 2 = r.4r, given a0 = 8, and a1 = 1.
1. Attempt all questions in brief. (2 × 7 = 14)
b. Show that : (r  ~ q, r  S, S  ~ q, p  q)  ~ p are a. Define Eulerian path, circuit and graph.
inconsistent. Ans. Eulerian path : A path of graph G which includes each edge of G
exactly once is called Eulerian path.
4. Attempt any one part of the following : (7 × 1 = 7) Eulerian circuit : A circuit of graph G which include each edge of
a. Write the properties of group. Show that the set (1, 2, 3, 4, 5) G exactly once.
is not group under addition and multiplication modulo 6. Eulerain graph : A graph containing an Eulerian circuit is called
Eulerian graph.
b. Prove by mathematical induction
n4 – 4n2 is divisible by 3 for all n > = 2. b. Let A = (2, 4, 5, 7, 8) = B, aRb if and only if a + b <= 12. Find
5. Attempt any one part of the following : (7 × 1 = 7) relation matrix.
a. Explain modular lattice, distribute lattice and bounded Ans. R = {(2, 4), (2, 5), (2, 7), (2, 8) (4, 2), (4, 5), (4, 7), (4, 8) (5, 2), (5, 4),
lattice with example and diagram. (5, 7), (7, 2), (7, 4), (7, 5), (8, 2), (8, 4), (2, 2), (4, 4), (5, 5)}
2 4 5 7 8
b. Draw the Hasse diagram of (A, ), where 2 1 1 1 1 1 
A = {3, 4, 12, 24, 48, 72} and relation  be such that a  b if a
4 1 1 1 1 1 
divides b.
mij = 5 1 1 1 1 0 
6. Attempt any one part of the following : (7 × 1 = 7)  
7 1 1 1 0 0 
a. Given the inorder and postorder traversal of a tree T :
Inorder : HFEABIGDC Postorder : BEHFACDGI 8 1 1 0 0 0 
Determine the tree T and it's Preorder.
c. Explain edge colouring and k-edge colouring.
b. Translate the following sentences in quantified expressions Ans. Edge coloring : An edge coloring of a graph G may also be thought
of predicate logic. of as equivalent to a vertex coloring of the line graph L(G), the
i. All students need financial aid. ii. Some cows are not white. graph that has a vertex for every edge of G and an edge for every
iii. Suresh will get if division if and only if he gets first div. pair of adjacent edges in G.
iv. If water is hot, then Shyam will swim in pool. k-edge coloring : A proper edge coloring with k different colors is
v. All integers are either even or odd integer. called a (proper) k-edge coloring.

7. Attempt any one part of the following : (7 × 1 = 7) d. Define chromatic number and isomorphic graph.
a. Define and explain any two the following : Ans. Chromatic number : The minimum number of colours required
1. BFS and DFS in trees for the proper colouring of a graph so that no two adjacent vertices
2. Euler graph have the same colour, is called chromatic number of a graph.
3. Adjacency matrix of a graph Isomorphic graph : If two graphs are isomorphic to each other
then :
b. Solve the recurrence relation : ar + 4ar – 2 + 4ar – 2 = r2. i. Both have same number of vertices and edges.

SP–4 C (CS/IT-Sem-3) Solved Paper (2017-18) Discrete Structures & Theory of Logic SP–5 C (CS/IT-Sem-3)

ii. Degree sequence of both graphs are same (degree sequence is the Ans. 3 + 33 + 333 + ............ + 3333 ... = (10n + 1 – 9n – 10)/27
sequence of degrees of the vertices of a graph arranged in non- Let given statement be denoted by S(n)
increasing order). 1. Inductive base : For n = 1
(102  9(1)  10) 100  19 81
e. Define union and intersection of multiset and find for
3= ,3=  =3
27 27 27
A = [1, 1, 4, 2, 2, 3], B = [1, 2, 2, 6, 3, 3] 3 = 3. Hence S(1) is tree.
Ans. Union : Let A and B be two multisets. Then, A  B, is the multiset 2. Inductive hypothesis : Assume that S(k) is true i.e.,
where the multiplicity of an element in the maximum of its 3 + 33 + 333 + ............ + 3333 = (10k + 1 – 9k – 10)/27
multiplicities in A and B. 3. Inductive steps : We have to show that S(k + 1) is also true i.e.,
Intersection : The intersection of A and B, A  B, is the multiset 3 + 33 + 333 + ............ (10k + 2 – 9(k + 1) – 10)/27
where the multiplicity of an element is the minimum of its Now, 3 + 33 + ............ + 33 ............ 3
multiplicities in A and B. = 3 + 33 + 333 + ............ + 3 ............ 3
Numerical : = (10k + 1 – 9k – 10)/27 + 3(10k + 1 – 1)/9
A = {1, 1, 4, 2, 2, 3}, B = {1, 2, 2, 6, 3, 3} = (10k + 1 + 9k – 10 + 9.10k + 1 – 9)/27
Union : A  B = {1, 2, 3, 4, 6} = (10k + 1 + 9.10k + 1 – 9k – 8 – 10)/27 = (10k + 2 – 9(k + 1) – 10)/27
Intersection : A  B = {1, 2, 2, 3} Thus S(k + 1) is true whenever S(k) is true. By the principle of
mathematical induction S(n) true for all positive integer n.
f. Find the contrapositive of “If he has courage, then he will
b. Define the following with one example :
win”.
i. Bipartite graph ii. Complete graph
Ans. If he will not win then he does not have courage.
iii. How many edges in K7 and K3, 6 iv. Planar graph
g. Define rings and write its properties. Ans.
i. Bipartite graph : A graph G = (V, E) is bipartite if the vertex set
Ans. Ring : A non-empty set R is a ring if it is equipped with two binary
V can be partitioned into two subsets (disjoint) V1 and V2 such that
operations called addition and multiplication and denoted by '+'
every edge in E connects a vertex in V1 and a vertex V2 (so that no
and '.' respectively i.e., for all a, b  R we have a + b R and a.b  R
edge in G connects either two vertices in V1 or two vertices in V2).
and it satisfies the following properties :
(V1, V2) is called a bipartition of G.
i. Addition is associative i.e.,
(a + b) + c = a + (b + c)  a, b, c  R x1 x2 x3 x1 x2 x3 x4
which
ii. Addition is commutative i.e., x4
redrawn
a + b = b + a  a, b  R as :
iii. There exists an element 0  R such that y1 y2 y3 y1 y2 y3
0 + a = a = a + 0,  a  R
Fig. 1. Some bipartite graphs.
iv. To each element a in R there exists an element – a in R such that
a + (– a) = 0 ii. Complete graph : A simple graph, in which there is exactly one
v. Multiplication is associative i.e., edge between each pair of distinct vertices is called a complete
graph. The complete graph of n vertices is denoted by Kn. The
a.(b.c) = (a.b).c,  a b, c  R
graphs K1 to K5 are shown below in Fig. 2.
vi. Multiplication is distributive with respect to addition i.e., for all
a, b, c R,

SECTION-B
K1 K2 K3 K4 K5
2. Attempt any three of the following : (7 × 3 = 21) Fig. 2.
a. Prove by mathematical induction
n(n – 1) n
3 + 33 + 333 + ............ 3333 = (10n + 1 – 9n – 10)/27 Kn has exactly = C2 edges
2
SP–6 C (CS/IT-Sem-3) Solved Paper (2017-18) Discrete Structures & Theory of Logic SP–7 C (CS/IT-Sem-3)

iii. Number of edge in K7 : Since, Kn is complete graph with n vertices.  (y – x) = – 3n2 = 3n2, n2 is also an integer
7(7  1) 7  6 So, y – x is divisible by 3 or R is symmetric.
Number of edge in K7 =  = 21
2 2 iii. Transitive : Let x, y, z  X and (x, y)  R, (y, z)  R
Number of edge in K3, 6 : Then x – y = 3n1, y – z = 3n2, n1, n2 being integers
Since, Kn, m is a complete bipartite graph with n  V1 and m  V2  x – z = 3(n1 + n2), n1 + n2 = n3 be any integer
Number of edge in K3, 6 = 3 × 6 = 18 So, (x – z) is also divisible by 3 or (x, z)  R
iv. Planar graph : So, R is transitive.
A graph G is said to be planar if there exists some geometric Hence, R is an equivalence relation.
representation of G which can be drawn on a plane such that no
two of its edges intersect except only at the common vertex. 1 3
2
i. A graph is said a planar graph, if it cannot be drawn on a plane
without a crossover between its edges crossing.
ii. The graphs shown in Fig. 3(a) and (b) are planar graphs.
4 7 6
5

Fig. 4. Diagraph of R.
(a) (b )
Fig. 3. Some planar graph. e. Simplify the following Boolean function using K-map :
F(x, y, z) = (0, 2, 3, 7)
c. For any positive integer D36, then find whether (D36, ‘|’) is Ans.
yz
lattice or not ? x 00 01 11 10
Ans. D36 = Divisor of 36 = {1, 2, 3, 4, 6, 9, 12, 18, 36} 0 1 1 1
Hasse diagram :
1 1
(1  3) = {3, 6}, (1  2) = {2, 4}, (2  6) = {6, 18}, (9  4) = {}
36
F = x z  yz
12 12
SECTION-C
6
4 9 3. Attempt any one part of the following : (7 × 1 = 7)
3
a. Solve ar – 6ar – 1 + 8ar – 2 = r.4r, given a0 = 8, and a1 = 1.
2
Ans. ar – 6ar – 1 + 8ar – 2 = r4r
1 The characteristic equation is, x2 – 6x + 8 = 0, x2 – 2x – 4x + 8 = 0
Since, 9  4 = {}
(x – 2) (x – 4) = 0, x = 2, 4
So, D36 is not a lattice.
The solution of the associated non-homogeneous recurrence relation is,
ar(h) = B1(2)r + B2(4)r ...(1)
d. Let X = {1, 2, 3 ...... 7} and R = {(x, y)|(x – y) is divisible by 3}. Is
Let particular solution of given equation is, ar(p) = r2(A0 + A1r)4r
R equivalence relation. Draw the digraph of R.
Substituting in the given equation, we get
Ans. Given that X = {1, 2, 3, 4, 5, 6, 7}
 r2(A0 + A1r)4r – 6(r – 1)2 (A0 + A1(r – 1))4r – 1
and R = {(x, y) : (x – y) is divisible by 3 }
+ 8(r – 2)2 (A0 + A1(r – 2)4r – 2 = r4r
Then R is an equivalence relation if
6
i. Reflexive :  x  X  ( x  x) is divisible by 3  r 2A 0 + A 1r 3 – [(A0r2 – 2A0r + A0) + (A1r3 – A1 – 3A1r2 + 3A1r)2]
4
So, ( x, x)  X  x  X or, R is reflexive. 8
ii. Symmetric : Let x, y  X and (x, y)  R + 2 [(A0r2 – 4rA0 + 4A0) + (A1r3 – 8A1 – 6A1r2 + 12A1r)] = r
4
 (x – y) is divisible by 3  (x – y) = 3n1, (n1 being an integer)
SP–8 C (CS/IT-Sem-3) Solved Paper (2017-18) Discrete Structures & Theory of Logic SP–9 C (CS/IT-Sem-3)

3 3 3 3 4. Attempt any one part of the following : (7 × 1 = 7)


 rA0 + A1r3 – A0r2 + 3A0r – A0 – A 1r 3 + A a. Write the properties of group. Show that the set (1, 2, 3, 4, 5)
2 2 2 2 1
9 9 1 is not group under addition and multiplication modulo 6.
+ A r2 – A r+ A r2 – 2A0r + 2A0 Ans. Properties of group :
2 1 2 1 2 0
Following are the properties of group :
1
A r3 – 4A1 – 3A1r2 – 6A1r = r 1. a * b  G  a, b  G [closure property]
2 1
2. a * (b * c) = (a * b) * c  a, b, c  G [associative property]
1 5 3 3
 2A0r – A0r2 – A – A + A r2 + A r=r 3. There exist an element e  G such that for any a  G
2 0 2 1 2 1 2 1 a * e = e * a = e [existence of identity]
Comparing both sides, we get 4. For every a  G,  element a–1  G
3 such that a * a–1 = a–1 * a = e
2A0 + A =1 ...(2)
2 1 For example : (Z, +), (R, +), and (Q, +) are all groups.
A0 + 5A1 = 0 ...(3) Numerical :
2  10 Addition modulo 6 (+6) : Composition table of S = {1, 2, 3, 4, 5}
Solving equation (2) and (3), we get A1 = A0 =
17 17 under operation +6 is given as :
To find the value of B1 and B2 put r = 0 and r = 1 in equation (1) +6 1 2 3 4 5
r = 0 a0 = B1 + B2 B1 + B2 = 8 ...(4)
r = 1 a1 = 2B1 + 4B2 2B1 + 4B2 = 1 ...(5) 1 2 3 4 5 0
31  15 2 3 4 5 0 1
Solving equations (4) and (5), we get B1 = B2 =
2 2 3 4 5 0 1 2
Complete solution is, ar = ar(h) + ar(p) 4 5 0 1 2 3
31 r 15 r   10    2   5 0 1 2 3 4
ar = 2  4  r2  17    17  r  4r
2 2   Since, 1 +6 5 = 0 but 0  S i.e., S is not closed under addition modulo 6.
So, S is not a group.
b. Show that : (r  ~ q, r  S, S  ~ q, p  q)  ~ p are Multiplication modulo 6 (*6) :
inconsistent. Composition table of S = {1, 2, 3, 4, 5} under operation *6 is given as
Ans. Following the indirect method, we introduce p as an additional premise *6 1 2 3 4 5
and show that this additional premise leads to a contradiction.
{1} (1) p  q Rule P
1 1 2 3 4 5
{2} (2) p Rule P (assumed)
{1, 2} (3) q Rule T, (1), (2) and modus ponens 2 2 4 0 2 4
{4} (4) s  q Rule P 3 3 0 3 0 3
{1, 2, 4} (5) s Rule T, (3), (4) and modus tollens 4 4 2 0 4 2
{6} (6) r  s Rule P 5 5 4 3 2 1
{1, 2, 4, 6} (7) r Rule T, (5), (6) disjunctive syllogism Since, 2 *6 3 = 0 but 0  S i.e., S is not closed under multiplication
{8} (8) r  q Rule P modulo 6.
{8} (9) r  q Rule T, (8) and EQ16 (p  q  p  q) So, S is not a group.
{8} (10) r  q Rule T, (8) and De Morgan’s law
b. Prove by mathematical induction
{1, 2, 4, 6} (11) r  q Rule T, (7), (3) and conjunction n4 – 4n2 is divisible by 3 for all n > = 2.
{1, 2, 4, 6, 8} (12) r  q  r  q Rule T, (10), (11) and conjunction. Ans. Base case : If n = 0, then n4 – 4n2 = 0, which is divisible by 3.
Since, we know that set of formula is inconsistent if their conjunction Inductive hypothesis : For some n  0, n4 – 4n2 is divisible by 3.
implies contradiction. Hence it leads to a contradiction. So, it is Inductive step : Assume the inductive hypothesis is true for n.
inconsistent.
SP–10 C (CS/IT-Sem-3) Solved Paper (2017-18) Discrete Structures & Theory of Logic SP–11 C (CS/IT-Sem-3)

We need to show that (n + 1)4 – 4(n + 1)2 is divisible by 3. By the Bounded lattice : Since, the given lattice has 1 as greatest and 0
inductive hypothesis, we know that n4 – 4n2 is divisible by 3. as least element so it is bounded lattice.
Hence (n + 1)4 – 4(n + 1)2 is divisible by 3 if
(n + 1)4 – 4(n + 1)2 – (n4 –4n2) is divisible by 3. b. Draw the Hasse diagram of (A, ), where
Now (n + 1)4 – 4(n + 1)2 – (n4 – 4n2) A = {3, 4, 12, 24, 48, 72} and relation  be such that a  b if a
= n4 + 4n3 + 6n2 + 4n + 1 – 4n2 – 8n – 4 – n4 + 4n2 divides b.
= 4n3 + 6n2 – 4n – 3, Ans. Hasse diagram of (A, ) where A = {3, 4, 12, 24, 48, 72}
which is divisible by 3 if 4n3 – 4n is. Since 4n3 – 4n = 4n(n + 1) 1
(n – 1), we see that 4n3 – 4n is always divisible by 3.
Going backwards, we conclude that (n + 1)4 – 4(n + 1)2 is divisible by
3, and that the inductive hypothesis holds for n + 1. a b c
By the Principle of Mathematical Induction, n4 – 4n2 is divisible by 3,
for all n  N.
0
Fig. 6.
5. Attempt any one part of the following : (7 × 1 = 7)
a. Explain modular lattice, distribute lattice and bounded
6. Attempt any one part of the following : (7 × 1 = 7)
lattice with example and diagram.
a. Given the inorder and postorder traversal of a tree T :
Ans. Modular distributive and bounded lattice :
Inorder : HFEABIGDC Postorder : BEHFACDGI
Types of lattice :
Determine the tree T and it's Preorder.
1. Modular lattice : A lattice (L, ) is called modular lattice if,
a  (b  c) = (a  b)  c whenever a  c for all a, b, c  L. Ans. The root of tree is I.
2. Distributive lattice : A lattice L is said to be distributive if for I
any element a, b and c of L following properties are satisfied : Now elements on right of I are D, G, C and G comes last of all in
i. a  (b  c) = (a  b)  (a  c) postorder traversal.
ii. a  (b  c) = (a  b)  (a  c) I
otherwise L is non-distributive lattice. G
3. Bounded lattice : A lattice L is said to be bounded if it has a Now D and C are on right of G and D comes last of G and I postorder
greatest element 1 and a least element 0. In such lattice we have traversal so
a  1 = 1, a  1 = a
a  0 = a, a  0 = 0 I

 a  Land 0  a  I G
Example : D
Let consider a Hasse diagram : C
1
Now element left of I are H F E A B in inorder traversal and A
comes last of all in postorder traversal. Therefore tree will be
a b c I
G
A D
0 C
Fig. 5.
Now H F E are on left of A in inorder traversal and B comes last of all
Modular lattice :
and continuing in same manner. We will get final binary tree as
0  a i.e., taking b = 0
b  (a  c) = 0  0 = 0, a  (b  c) = a  c = 0
Distributive lattice :
For a set S, the lattice P(S) is distributive, since union and intersection
each satisfy the distributive property.
SP–12 C (CS/IT-Sem-3) Solved Paper (2017-18) Discrete Structures & Theory of Logic SP–13 C (CS/IT-Sem-3)

some arbitrary node as the root in the case of a graph) and explores
I
as far as possible along each branch before backtracking.
G
A Algorithmic steps :
D
F B C Step 1 : Push the root node in the stack.
Step 2 : Loop until stack is empty.
H E Step 3 : Pick the node of the stack.
Preorder traversal of above binary tree is CAFHEBDGI Step 4 : If the node has unvisited child nodes, get the unvisited
child node, mark it as traversed and push it on stack.
b. Translate the following sentences in quantified expressions Step 5 : If the node does not have any unvisited child nodes, pop the
of predicate logic. node from the stack.
i. All students need financial aid. ii. Some cows are not white. 2. Eulerian graph : A graph containing an Eulerian circuit is called
iii. Suresh will get if division if and only if he gets first div. Eulerian graph.
iv. If water is hot, then Shyam will swim in pool. For example : Graphs given below are Eulerian graphs.
v. All integers are either even or odd integer. V1 V3 A B
V2
Ans.
i.x [S(x)  F(x)]
ii.~ [(x) (C(x)  W(x))] V5 V4 D C
iii.Sentence is incorrect so cannot be translated into quantified expression. Fig. 7.
iv. W(x) : x is water Eulerian path : A path of graph G which includes each edge of G
H(x) : x is hot
exactly once is called Eulerian path.
S(x) : x is Shyam
Eulerian circuit : A circuit of graph G which include each edge of
P(x) : x will swim in pool
G exactly once.
x [((W(x)  H(x))  (S(x)  P(x))]
The existence of Eulerian paths or Eulerian circuits in a graph is
v. E(x) : x is even
O(x) : x is odd related to the degree of vertices.
x (E(x)  O(x)) a. Adjacency matrix :
i. Representation of undirected graph :
7. Attempt any one part of the following : (7 × 1 = 7) The adjacency matrix of a graph G with n vertices and no parallel
a. Define and explain any two the following : edges is a n × n matrix A = [aij] whose elements are given by
1. BFS and DFS in trees aij = 1, if there is an edge between ith and jth vertices
2. Euler graph
= 0, if there is no edge between them
3. Adjacency matrix of a graph
ii. Representation of directed graph :
Ans.
1. Breadth First Search (BFS) : Breadth First Search (BFS) is an The adjacency matrix of a digraph D, with n vertices is the matrix
algorithm for traversing or searching tree or graph data structures. A = [aij]n×n in which
It starts at the tree root and explores the neighbour nodes first,
aij = 1 if arc (vi, vj) is in D
before moving to the next level neighbours.
Algorithmic steps : = 0 otherwise
Step 1 : Push the root node in the queue. For example :
Step 2 : Loop until the queue is empty. V1 V4
Step 3 : Remove the node from the queue.
Step 4 : If the removed node has unvisited child nodes, mark them
as visited and insert the unvisited children in the queue. V2 V3
Depth First Search (DFS) :
Fig. 8.
Depth First Search (DFS) is an algorithm for traversing or searching
tree or graph data structures. One starts at the root (selecting
SP–14 C (CS/IT-Sem-3) Solved Paper (2017-18) Discrete Structures & Theory of Logic SP–1 C (CS/IT-Sem-3)

v1 v2 v3 v4 B.Tech.
v1 0 1 1 1
 (SEM. III) ODD SEMESTER
A = v2 1 0 1 0 
v3 1 1 0 1
THEORY EXAMINATION, 2018-19
  DISCRETE STRUCTURES AND
v4 1 0 1 0
THEORY OF LOGIC
b. Solve the recurrence relation : ar + 4ar – 2 + 4ar – 2 = r2.
Ans. ar + 4ar – 1 + 4ar – 2 = r2 Time : 3 Hours Max. Marks : 70
The characteristic equation is,
x2 + 4x + 4 = 0 Note : 1. Attempt all Sections. If require any missing data; then choose
(x + 2)2 = 0
suitably.
x = –2, – 2 2. Any special paper specific instructions.
The homogeneous solution is, a(h) = (A0 + A1r) (– 2)r
The particular solution be, a(p) = (A0 + A1r) r2 SECTION – A
Put ar, ar – 1 and ar – 2 from a(p) in the given equation, we get
r2A0 + A1r3 + 4A0(r – 1)2 + 4A1(r – 1)3 + 4A0(r – 2)2 + 4A1(r – 2)3 = r2 1. Attempt all questions in brief. (2 × 7 = 14)
a. Find the power set of each of these sets, where a and b are
A0(r2 + 4r2 – 8r + 4 + 4r2 – 16r + 16) +A1 (r3 + 4r3 – 4 – 12r2 + 12r + 4r3
distinct elements.
– 32 – 24r2 + 48r) = r2
i. {a} ii. {a, b}
A0(9r2 – 24r + 20) + A1(9r3 – 48r2 + 60r – 36) = r2 iii. {, {}} iv. {a, {a}}
Comparing the coefficient of same power of r, we get
9A0 – 48A1 = 1 ...(1) b. Define ring and field.
20A0 – 36A1 = 0 ...(2)
c. Draw the Hasse diagram of D30.
3 5
Solving equation (1) and (2) A0 = A1 
53 159 d. What are the contrapositive, converse, and the inverse of
The complete solution is, the conditional statement : “The home team wins whenever
  3    5   2 it is raining” ?
ar = ar(p) + ar(h) = (A0 + A1r) (– 2)r +     r r
 53   159  
e. How many bit strings of length eight either start with a ‘1’
bit or end with the two bit ‘00’ ?

 f. Define injective, surjective and bijective function.

g. Show that  (p  q) and  p  q are logically equivalent.

SECTION-B

2. Attempt any three of the following : (7 × 3 = 21)


a. A total of 1232 student have taken a course in Spanish, 879
have taken a course in French, and 114 have taken a course
in Russian. Further 103 have taken courses in both Spanish
and French, 23 have taken courses in both Spanish and
Russian, and 14 have taken courses in both French and
Russian. If 2092 students have taken least one of Spanish,
SP–2 C (CS/IT-Sem-3) Solved Paper (2018-19) Discrete Structures & Theory of Logic SP–3 C (CS/IT-Sem-3)

French and Russian, how many students have taken a b. Find the Sum-Of-Products and Product-Of-sum expansion
course in all three languages ? of the Boolean function F(x, y, z) = (x + y) z.

b. i. Let H be a subgroup of a finite group G. Prove that order of 6. Attempt any one part of the following : (7 × 1 = 7)
H is a divisor of order of G. a. What is a tautology, contradiction and contingency ? Show
that (p  q)  ( p  r)  (q  r) is a tautology, contradiction
ii. Prove that every group of prime order is cyclic. or contingency.

c. Define a lattice. For any a, b, c, d in a lattice (A, ) if a  b and b. Show that the premises “It is not sunny this afternoon and
c  d then show that a  c  b  d and a  c  b  d. it is colder than yesterday,” “We will go swimming only if it
is sunny,” “If we do not go swimming, then we will take a
d. Show that ((p  q)  ~ (~p  (~q  ~r))) (~p  ~q)  (~ p  r) is canoe trip.” and “If we take a canoe trip, then we will be
a tautology without using truth table. home by sunset” lead to the conclusion “We will be home by
sunset.”
e. Define a binary tree. A binary tree has 11 nodes. It’s inorder
and preorder traversals node sequences are : 7. Attempt any one part of the following : (7 × 1 = 7)
Preorder : A B D H I E J L C F G a. What are different ways to represent a graph. Define Euler
Inorder : H D I B J E K A F C G circuit and Euler graph. Give necessary and sufficient
Draw the tree. conditions for Euler circuits and paths.

3. Attempt any one part of the following : (7 × 1 = 7) b. Suppose that a valid codeword is an n-digit number in
a. Prove that if n is a positive integer, then 133 divides 11n + 1 + decimal notation containing an even number of 0’s. Let an
122n – 1. denote the number of valid codewords of length n satisfying
the recurrence relation an = 8an – 1 + 10n – 1 and the initial
b. Let n be a positive integer and S a set of strings. Suppose condition a1 = 9. Use generating functions to find an explicit
that Rn is the relation on S such that sRnt if and only if formula for an.
s = t, or both s and t have at least n characters and first n
characters of s and t are the same. That is, a string of fewer
than n characters is related only to itself; a string s with at
least n characters is related to a string t if and only if t has 
at least n characters and t beings with the n characters at
the start of s.

4. Attempt any one part of the following : (7 × 1 = 7)


a. Let G = {1, – 1, i, – i} with the binary operation multiplication
be an algebraic structure, where i =  1 . Determine
whether G is an abelian or not.

b. What is meant by ring ? Give examples of both commutative


and non-commutative rings.

5. Attempt any one part of the following : (7 × 1 = 7)


a. Show that the inclusion relation  is a partial ordering on
the power set of a set S. Draw the Hasse diagram for
inclusion on the set P(S), where S = {a, b, c, d}. Also determine
whether (P(S), ) is a lattice.
SP–4 C (CS/IT-Sem-3) Solved Paper (2018-19) Discrete Structures & Theory of Logic SP–5 C (CS/IT-Sem-3)

Ans.
SOLUTION OF PAPER (2018-19)
30
Note : 1. Attempt all Sections. If require any missing data; then choose 6 15
suitably. 10
2. Any special paper specific instructions. 3
2 5
SECTION – A 1
Fig. 1.
1. Attempt all questions in brief. (2 × 7 = 14)
a. Find the power set of each of these sets, where a and b are d. What are the contrapositive, converse, and the inverse of
distinct elements. the conditional statement : “The home team wins whenever
i. {a} ii. {a, b} it is raining” ?
iii. {, {}} iv. {a, {a}} Ans. Given : The home team wins whenever it is raining.
Ans. q(conclusion) : The home team wins.
i. Power set of {a} = {{}, {a}} p(hypothesis) : It is raining.
ii. Power set of {a, b} = {{}, {a}, {b}, {a, b}} Contrapositive : ~ q  ~ p is “if the home team does not win
iii. Power set of {, {}} = {} then it is not raining”.
iv. Power set of {a, {a}} = {{}, {a}, {{a}}, {a, {a}}} Converse : q  p is “if the home team wins then it is raining”.
Inverse : ~ p  ~ q is “if it is not raining then the home team does
b. Define ring and field. not win”.
Ans. Ring : A non-empty set R is a ring if it is equipped with two binary
operations called addition and multiplication and denoted by '+' e. How many bit strings of length eight either start with a ‘1’
and '.' respectively i.e., for all a, b  R we have a + b R and a.b  R bit or end with the two bit ‘00’ ?
and it satisfies the following properties : Ans.
i. Addition is associative i.e., 1. Number of bit strings of length eight that start with a 1 bit :
(a + b) + c = a + (b + c)  a, b, c  R 27 = 128.
ii. Addition is commutative i.e., 2. Number of bit strings of length eight that end with bits 00 : 26 = 64.
3. Number of bit strings of length eight 25 = 32 that start with a 1 bit
a + b = b + a  a, b  R
and end with bits 00 : 25 = 32
iii. There exists an element 0  R such that Hence, the number is 128 + 64 – 32 = 160.
0 + a = a = a + 0,  a  R
iv. To each element a in R there exists an element – a in R such that f. Define injective, surjective and bijective function.
a + (– a) = 0 Ans.
v. Multiplication is associative i.e., 1. One-to-one function (Injective function or injection) : Let
a.(b.c) = (a.b).c,  a b, c  R f : X  Y then f is called one-to-one function if for distinct elements
of X there are distinct image in Y i.e., f is one-to-one iff
vi. Multiplication is distributive with respect to addition i.e., for all
a, b, c R, f(x1) = f(x2) implies x1 = x2  x1, x2,  X
Field : A ring R with at least two elements is called a field if it has
following properties : A B
f
i. R is commutative
ii. R has unity
iii. R is such that each non-zero element possesses multiplicative
inverse.

c. Draw the Hasse diagram of D30. Fig. 2. One-to-one.


SP–6 C (CS/IT-Sem-3) Solved Paper (2018-19) Discrete Structures & Theory of Logic SP–7 C (CS/IT-Sem-3)

2. Onto function (Surjection or surjective function) : Let SECTION-B


f : X  Y then f is called onto function iff for every element y  Y
there is an element x  X with f(x) = y or f is onto if Range (f) = Y. 2. Attempt any three of the following : (7 × 3 = 21)
X Y a. A total of 1232 student have taken a course in Spanish, 879
have taken a course in French, and 114 have taken a course
in Russian. Further 103 have taken courses in both Spanish
f
and French, 23 have taken courses in both Spanish and
Russian, and 14 have taken courses in both French and
Russian. If 2092 students have taken least one of Spanish,
French and Russian, how many students have taken a
course in all three languages ?
Fig. 3. Onto. Ans. Let S be the set of students who have taken a course in Spanish, F
3. One-to-one onto function (Bijective function or bijection) : be the set of students who have taken a course in French, and R be
A function which is both one-to-one and onto is called one-to-one the set of students who have taken a course in Russian. Then, we
onto function or bijective function. have
X Y |S| = 1232, |F| = 879, |R| = 114, |S F| = 103, |S R| = 23,
f |S R| = 14, and |SF R| = 23.
1 a
2 b
Using the equation
3 c |SF R| = |S|+ |F|+ |R| – |S  F| – |S  R| – |S  R| +
|SF R|,
Fig. 4. One-to-one onto. 2092 = 1232 + 879 + 114 – 103 – 23 – 14 +|SF R|,
|SF R| = 7.
g. Show that  (p  q) and  p  q are logically equivalent.
Ans. To prove : (p + q) = p.q |S  F  R| = ? |S F| = 103
To prove the theorem we will show that
(p + q) + p.q = 1
Consider (p + q) + p.q = {(p + q) + p}.{(p + q) + q}
by Distributive law
= {(q + p) + p}.{(p + q) + q}
by Commutative law
= {q + (p + p)}.{p + (q + q)}
|S| = 1232
by Associative law |F| = 879
= (q + 1).(p + 1) by Complement law |S R| = 23
= 1.1 by Dominance law |F R| = 14
=1 ...(1) |R| = 114 |S F R| = 2092
Also consider
(p + q).pq = pq.(p + q) by Commutative law Fig. 5.
= pq.p + pq.q by Distributive law
= p.(pq) + p.(q q) by Commutative law b. i. Let H be a subgroup of a finite group G. Prove that order of
= (p. p).q + p(q. q) by Associative law H is a divisor of order of G.
= 0. q + p.0 by Complement law Ans.
= q.0 + p.0 by Commutative law 1. Let H be any sub-group of order m of a finite group G of order n. Let
= 0+0 by Dominance law us consider the left coset decomposition of G relative to H.
=0 ...(2) 2. We will show that each coset aH consists of m different elements.
From (1) and (2), we get, Let H = {h1, h2, ....., hm}
pq is complement of (p + q) i.e., (p + q) = p q. 3. Then ah1, ah2, ...., ahm, are the members of aH, all distinct.
SP–8 C (CS/IT-Sem-3) Solved Paper (2018-19) Discrete Structures & Theory of Logic SP–9 C (CS/IT-Sem-3)

For, we have (Using De Morgan’s Law)


ahi = ahj  hi = hj  [(p  q)]  (p  (q  r))  ~ ((p  q)  (p  r))
by cancellation law in G.  [(p  q)  (p  q)  (p  r)] ~ (( p  q)  (p  r))
4. Since G is a finite group, the number of distinct left cosets will also (Using Distributive Law)
be finite, say k. Hence the total number of elements of all cosets is  [((p  q)  (p  q)]  (p  r) ~ ((p  q)  (p  r))
km which is equal to the total number of elements of G.  ((p  q)  (p  r))  ~ ((p  q)  (p  r))
Hence  x  ~ x where x = (p  q)  (p  r)
n = mk T
This show that m, the order of H, is a divisor of n, the order of the
group G. e. Define a binary tree. A binary tree has 11 nodes. It’s inorder
We also find that the index k is also a divisor of the order of the and preorder traversals node sequences are :
group. Preorder : A B D H I E J L C F G
Inorder : H D I B J E K A F C G
ii. Prove that every group of prime order is cyclic. Draw the tree.
Ans. Ans. Binary tree : Binary tree is the tree in which the degree of every
1. Let G be a group whose order is a prime p. node is less than or equal to 2. A tree consisting of no nodes is also
2. Since P > 1, there is an element a G such that a  e. a binary tree.
3. The group <a> generated by ‘a’ is a subgroup of G. Numerical :
4. By Lagrange’s theorem, the order of ‘a’ divides |G|. Step 1 : In preorder sequence, leftmost element is the root of the
5. But the only divisors of |G|= p are 1 and p. Since a  e we have tree. By searching A in ‘Inorder Sequence’ we can find out all the
|<a>|> 1, so |<a>| = p. elements on the left and right sides of ‘A’.
6. Hence, <a> = G and G is cyclic. A

c. Define a lattice. For any a, b, c, d in a lattice (A, ) if a  b and HDIBJEK FCG


c  d then show that a  c  b  d and a  c  b  d.
Step 2 : We recursively follow the above steps and we get
Ans. Lattice : A lattice is a poset (L, ) in which every subset {a, b}
consisting of 2 elements has least upper bound (lub) and greatest A
lower bound (glb). Least upper bound of {a, b} is denoted by a  b
and is known as join of a and b. Greatest lower bound of {a, b} is
B C
denoted by a  b and is known as meet of a and b. A
Lattice is generally denoted by (L, , ).
Numerical : B C D E F G
As a  b and c  d, a  b  b d and c  d  b  d.
By transtivity of , a  b d and c  b  d.
HDI JEK F G H I J K
So b d is an upper bound of a and c.
So a  c  bd.
As a  c  a and a c  c, a  c  a  b and a c  c  d. 3. Attempt any one part of the following : (7 × 1 = 7)
Hence a  c is a lower bound of b and d. So a c  b  d. a. Prove that if n is a positive integer, then 133 divides 11n + 1 +
So a c  b  d. 122n – 1.
Ans. We prove this by induction on n.
d. Show that ((p  q)  ~ (~p  (~q  ~r))) (~p  ~q)  (~ p  r) is Base case : For n = 1, 11n+1 + 122n–1 = 112 + 121 = 133 which is
a tautology without using truth table. divisible by 133.
Ans. Inductive step : Assume that the hypothesis holds for n = k, i.e.,
i. We have 11k+1 + 122k–1 = 133A for some integer A. Then for n = k + 1,
((p q) ~ (~ p  (~ q  r)))  (~ p  ~ q)  (~ p r) 11n+1 + 122n–1 =11k+1+1 + 122(k+1)–1
((p  q)  ~ (~ p  ~ (q  r)))  (~ (p  q)  ~ ( p  r)) = 11k+2 + 122k+1
SP–10 C (CS/IT-Sem-3) Solved Paper (2018-19) Discrete Structures & Theory of Logic SP–11 C (CS/IT-Sem-3)

=11 * 11k+1 + 144 * 122k–1 1. Closure property : Since all the entries of the composition table
=11 * 11k+1 + 11 * 122k–1 + 133 * 122k–1 are the elements of the given set, the set G is closed under
=11[11k+1 + 122k–1] + 133 * 122k–1 multiplication.
=11* 133A + 133 * 122k–1 2. Associativity : The elements of G are complex numbers, and we
= 133[11A + 122k–1] know that multiplication of complex numbers is associative.
Thus if the hypothesis holds for n = k it also holds for n = k + 1. 3. Identity : Here, 1 is the identity element.
Therefore, the statement given in the equation is true. 4. Inverse : From the composition table, we see that the inverse
elements of 1, – 1, i, – i are 1, – 1, – i, i respectively.
b. Let n be a positive integer and S a set of strings. Suppose 5. Commutativity : The corresponding rows and columns of the
that Rn is the relation on S such that sRnt if and only if table are identical. Therefore the binary operation is commutative.
s = t, or both s and t have at least n characters and first n Hence, (G, *) is an abelian group.
characters of s and t are the same. That is, a string of fewer
than n characters is related only to itself; a string s with at b. What is meant by ring ? Give examples of both commutative
least n characters is related to a string t if and only if t has and non-commutative rings.
at least n characters and t beings with the n characters at Ans. Ring : A ring is an algebraic system (R, +, •) where R is a non
the start of s. empty set and + and • are two binary operations (which can be
Ans. We have to show that the relation Rn is reflexive, symmetric, and different from addition and multiplication) and if the following
transitive. conditions are satisfied :
1. Reflexive : The relation Rn is reflexive because s = s, so that sRns 1. (R, +) is an abelian group.
whenever s is a string in S. 2. (R, •) is semigroup i.e., (a • b) • c = a • (b • c)  a, b, c  R.
2. Symmetric : If sRn t, then either s = t or s and t are both at least n 3. The operation • is distributive over +.
characters long that begin with the same n characters. This means i.e., for any a, b, c  R
that tRn s. We conclude that Rn is symmetric. a • (b + c) = (a • b) + (a • c) or (b + c) • a = (b • a) + (c • a)
3. Transitive : Now suppose that sRn t and tRn u. Then either s = t or Example of commutative ring :
s and t are at least n characters long and s and t begin with the same Let a, b R (a + b)2 = (a + b)
n characters, and either t = u or t and u are at least n characters (a + b) (a + b) = (a + b)
long and t and u begin with the same n characters. From this, we (a + b)a + (a + b)b = (a + b)
can deduce that either s = u or both s and u are n characters long (a2 + ba) + (ab + b2) = (a + b)
and s and u begin with the same n characters, i.e., sR n u. (a + ba) + (ab + b) = (a + b) (  a2 = a and b2 = b)
Consequently, Rn is transitive. (a + b) + (ba + ab) = (a + b) + 0
 ba + ab = 0
4. Attempt any one part of the following : (7 × 1 = 7) a + b = 0 a + b = a + a [being every element of its own additive
a. Let G = {1, – 1, i, – i} with the binary operation multiplication inverse]
be an algebraic structure, where i =  1 . Determine  b=a
 ab = ba
whether G is an abelian or not.
 R is commutative ring.
Ans. The composition table of G is Example of non-commutative ring : Consider the set R of 2 × 2
matrix with real element. For A, B, C  R
* 1 –1 i –i
A * (B + C) = (A * B) + (A * C)
1 1 –1 i –i also, (A + B) * C = (A * C) + (B * C)
 * is distributive over +.
–1 –1 1 –i i  (R, +, *) is a ring.
i i –i –1 1 We know that AB  BA, Hence (R, +, *) is non-commutative ring.

–i –i i –1 1 5. Attempt any one part of the following : (7 × 1 = 7)


a. Show that the inclusion relation  is a partial ordering on
the power set of a set S. Draw the Hasse diagram for
SP–12 C (CS/IT-Sem-3) Solved Paper (2018-19) Discrete Structures & Theory of Logic SP–13 C (CS/IT-Sem-3)

inclusion on the set P(S), where S = {a, b, c, d}. Also determine Sum-Of-Product :
whether (P(S), ) is a lattice. F(x, y, z) = xyz + xyz + xyz
Ans. Show that the inclusion relation () is a partial ordering on the Product-Of-Sum :
power set of a set S. F(x, y, z) = (x + y + z)(x + y+ z)(x+ y + z)(x+ y+ z)
Reflexivity : A  A whenever A is a subset of S. (x+ y+ z')
Antisymmetry : If A and B are positive integers with A  B and B
 A, then A = B. 6. Attempt any one part of the following : (7 × 1 = 7)
Transitivity : If A  B and B  C, then A  C. a. What is a tautology, contradiction and contingency ? Show
Hasse diagram : that (p  q)  ( p  r)  (q  r) is a tautology, contradiction
{a, b, c, d} or contingency.
Ans. Tautology, contradiction and contingency :
1. Tautology : Tautology is defined as a compound proposition that is
always true for all possible truth values of its propositional variables
{a, b, d} {a, c, d}
{a, b, c} {b, c, d} and it contains T in last column of its truth table.
Propositions like,
i. The doctor is either male or female.
ii. Either it is raining or not.
are always true and are tautologies.
{a, c} {b, c} {b, d} {c, d}
{a, b} {a, c} 2. Contradiction : Contradiction is defined as a compound
proposition that is always false for all possible truth values of its
propositional variables and it contains F in last column of its truth
{a} {b} {c} {d} table.
Propositions like,
i. x is even and x is odd number.
ii. Tom is good boy and Tom is bad boy.
 are always false and are contradiction.
Fig. 6. 3. Contingency : A proposition which is neither tautology nor
(P(S), ) is not a lattice because ({a, b},{b, d}) has no lub and glb. contradiction is called contingency.
Here the last column of truth table contains both T and F.
b. Find the Sum-Of-Products and Product-Of-sum expansion Proof : ((p  q)  (~ p  r))  (q  r)
of the Boolean function F(x, y, z) = (x + y) z.
Ans. F(x, y, z) = (x + y)z
p q r ~P (p  q) (~ p  r) (A  B) (q  r) C  D
=A =B =C =D
x y z x+y z (x + y)z
F F F T F T T F F
1 1 1 1 0 0
F F T T F T T T T
1 1 0 1 1 1 F T F T T T T T T
1 0 1 1 0 0 F T T T T T T T T
1 0 0 1 1 1 T F F F T F T F F

0 1 1 1 0 0 T F T F T T T T T
T T F F T F T T T
0 1 0 1 1 1
T T T F T T T T T
0 0 1 0 0 0
So, ((p  q)  (~ p  r))  (q  r) is contingency.
0 0 0 0 1 0
SP–14 C (CS/IT-Sem-3) Solved Paper (2018-19) Discrete Structures & Theory of Logic SP–15 C (CS/IT-Sem-3)

b. Show that the premises “It is not sunny this afternoon and ii. Representation of directed graph
it is colder than yesterday,” “We will go swimming only if it b. Incidence matrix :
is sunny,” “If we do not go swimming, then we will take a i. Representation of undirected graph
canoe trip.” and “If we take a canoe trip, then we will be ii. Representation of directed graph
home by sunset” lead to the conclusion “We will be home by 2. Linked representation : In this representation, a list of vertices
sunset.” adjacent to each vertex is maintained. This representation is also
Ans. called adjacency structure representation. In case of a directed
i. The compound proposition will be : (p  q  r)  s graph, a care has to be taken, according to the direction of an edge,
ii. Let p be the proposition “It is sunny this afternoon”, q be the while placing a vertex in the adjacent structure representation of
proposition “It is colder than yesterday”, r be the proposition “We another vertex.
will go swimming”, s be the proposition ‘‘We will take a canoe trip’’, Euler circuit and Euler graph :
and t be the proposition “We will be home by sunset”. Eulerian circuit : A circuit of graph G which include each edge of
Then the hypothesis becomes  p  q, r  p,  r  s, and s  t. The G exactly once.
conclusion is simply t. Eulerain graph : A graph containing an Eulerian circuit is called
We construct an argument to show that our hypothesis lead to the Eulerian graph.
conclusion as follows : For example : Graphs given below are Eulerian graphs.
V1 V3 A B
S. No. Step Reason V2

1. pq Hypothesis V5 V4 D C
2. p Simplification using step 1 Fig. 7.
3. rp Hypothesis Necessary and sufficient condition for Euler circuits and
paths :
4. r Modus tollens using steps 2 and 3 1. A graph has an Euler circuit if and only if the degree of every
vertex is even.
5. rs Hypothesis
2. A graph has an Euler path if and only if there are at most two
6. s Modus ponens using steps 4 and 5 vertices with odd degree.

7. st Hypothesis b. Suppose that a valid codeword is an n-digit number in


8. t Modus ponens using steps 6 and 7 decimal notation containing an even number of 0’s. Let an
denote the number of valid codewords of length n satisfying
the recurrence relation an = 8an – 1 + 10n – 1 and the initial
7. Attempt any one part of the following : (7 × 1 = 7) condition a1 = 9. Use generating functions to find an explicit
a. What are different ways to represent a graph. Define Euler formula for an.
circuit and Euler graph. Give necessary and sufficient

conditions for Euler circuits and paths.
Ans. Representation of graph :
Ans. Let G(x) = 
n 0
an xn be the generating function of the sequence a0,
Graph can be represented in following two ways :
1. Matrix representation : a1, a2 .... we sum both sides of the last equations starting with n = 1.
Matrices are commonly used to represent graphs for computer To find that
processing. Advantages of representing the graph in matrix lies in  

the fact that many results of matrix algebra can be readily applied G(x) – 1 = 
n 1
an x n   (8a
n 1
n –1 x
n
 10 n–1 x n )
to study the structural properties of graph from an algebraic point
 
of view.
a. Adjacency matrix : = 8 a
n 1
n –1 x
n
 10
n 1
n –1 n
x
i. Representation of undirected graph
SP–16 C (CS/IT-Sem-3) Solved Paper (2018-19) Discrete Structures & Theory of Logic SP–1 C (CS/IT-Sem-3)

 
B.Tech.
= 8x a
n 1
n –1 x
n –1
x 10
n 1
n –1 n –1
x
(SEM. III) ODD SEMESTER
  THEORY EXAMINATION, 2019-20
= 8x a x
n 0
n
n
x  10
n 0
n
xn
DISCRETE STRUCTURES & THEORY
= 8xG(x) + x/(1 – 10x) OF LOGIC
Therefore, we have
G(x) – 1 = 8xG(x) + x/(1 – 10x) Time : 3 Hours Max. Marks : 100
Expanding the right hand side of the equation into partial fractions
gives
Note : 1. Attempt all Section.
G(x) = 
1 1 1 

2  1  8 x 1  10 x 
 Section-A
This is equivalent to
1. Answer all questions in brief. (2 × 10 = 20)
1 
 
G(x) = 
2  n 0 
8n xn   10 n x n 

a. Define various types of functions.
n 0
b. How many symmetric and reflexive relations are possible


1 n from a set A containing ‘n’ elements ?
= (8  10n ) x n
n 0
2
c. Let Z be the group of integers with binary operation *
1 n defined by a * b = a + b – 2, for all a, b  Z. Find the identity
an = (8  10n )
2 element of the group (Z, *).

d. Show that every cyclic group is abelian.



e. Prove that a lattice with 5 elements is not a boolean
algebra.

f. Write the contrapositive of the implication: “if it is Sunday


then it is a holiday”.

g. Show that the propositions p  q and p  q are logically


equivalent.

h. Show that there does not exist a graph with 5 vertices


with degress 1, 3, 4, 2, 3 respectively.

i. Obtain the generating function for the sequence 4, 4, 4, 4, 4,


4, 4.

j. Define Pigeon hole principle.


Ans. Refer Q. 5.13, Page SQ–21C, Unit-5, Two Marks Questions.
Section-B
2. Answer any three of the following : (3 × 10 = 30)
SP–2 C (CS/IT-Sem-3) Solved Paper (2019-20) Discrete Structures & Theory of Logic SP–3 C (CS/IT-Sem-3)

6. Answer any one part of the following : (1 × 10 = 10)


1 1 1 1
a. Prove that + + + ............ + > n for n  2 using a. Explain various rules of inference for propositional logic.
1 2 3 n
principle of mathematical induction. b. Prove the validity of the following argument “if the races
are fixed so the casinos are cooked, then the tourist trade
b. What do you mean by cosets of a subgroup ? Consider the will decline. If the tourist trade decreases, then the police
group Z of integers under addition and the subgroup will be happy. The police force is never happy. Therefore,
H = {....., – 12, – 6, 0, 6, 12, .....} considering of multiple of 6 the races are not fixed.”
i. Find the cosets of H in Z.
ii. What is the index of H in Z. 7. Answer any one part of the following : (7 × 1 = 7)
a. Solve the following recurrence equation using generating
c. Show that the following are equivalent in a Boolean function
algebra. G(K) – 7 G(K – 1) + 10 G (K – 2) = 8K + 6
a  b  a * b = 0  b  a  a  b = 1
b. A collection of 10 electric bulbs contain 3 defective ones.
d. Show that ((P  Q)  (QR))  (P Q)  (P R) is i. In how many ways can a sample of four bulbs be selected ?
tautology by using equivalences. ii. In how many ways can a sample of 4 bulbs be selected
which contain 2 good bulbs and 2 defective ones ?
e. Define planar graph. Prove that for any connected planar iii. In how many ways can a sample of 4 bulbs be selected so
graph, v – e + r = 2 where v, e, r is the number of vertices, that either the sample contain 3 good ones and 1 defectives
edges, and regions of the graph respectively. ones or 1 good and 3 defectives ones ?

Section-C 
3. Answer any one part of the following : (1 × 10 = 10)
a. Find the number between 1 to 500 that are not divisible by
any of the integers 2 or 3 or 5 or 7.

b. Is the “divides” relations on the set of positive integers


transitive ? What is the reflexive and symmetric closure of
the relation ?
R = {(a, b)|a > b} on the set of positive integers.

4. Answer any one part of the following : (1 × 10 = 10)


a. What is ring ? Define elementary properties of ring with
example.

b. Prove or dis prove that intersection of two normal


subgroups of a group G is again a normal subgroup of G.

5. Answer any one part of the following : (10 × 1 = 10)


a. Let (L, , , ) be a distribute lattice and a, b  L. If a  b = a
 c and a  b = a  c then show that b = c.

b. Obtain the principle disjunction and conjunctive normal


forms of the formula (p  r)  (q  p).
SP–4 C (CS/IT-Sem-3) Solved Paper (2019-20) Discrete Structures & Theory of Logic SP–5 C (CS/IT-Sem-3)

If g1 and g2 are any two elements of G, there exist integers r and s


SOLUTION OF PAPER (2019-20) such that g1 = ar and g2 = as. Then
g1 g2 = ar as = ar+s = as+r = as . ar = g2g1
Note : 1. Attempt all Section. So, G is abelian.

Section-A e. Prove that a lattice with 5 elements is not a boolean


algebra.
1. Answer all questions in brief. (2 × 10 = 20) Ans. To be a boolean algebra the number of elements in the lattice
a. Define various types of functions. should be of the form 2m. Since the number of elements is 5 which
Ans. Various types of functions : is not of the form 2m. So, it is not a boolean algebra.
1. Algebraic functions : Algebraic functions are those functions
which consist of a finite number of terms involving powers and f. Write the contrapositive of the implication: “if it is Sunday
roots of the independent variable x. then it is a holiday”.
2. Transcendental functions : A function which is not algebraic is Ans. Consider the statements :
called transcendental function. p : It is sunday
q : It is a holiday
b. How many symmetric and reflexive relations are possible Contrapositive : ~ q  ~ p
from a set A containing ‘n’ elements ?
Ans. There are 2n(n + 1)/2 symmetric binary relations and 2n(n – 1) reflexive g. Show that the propositions p  q and p  q are logically
binary relations are possible on a set S with cardinality. equivalent.
Ans. Truth table :
c. Let Z be the group of integers with binary operation * pq:
defined by a * b = a + b – 2, for all a, b  Z. Find the identity
element of the group (Z, *). p q pq
Ans. Since Z is closed for addition, as we have T T T
a + b  Z for all a, b  Z T F F
 a+b– 2Z F T T
 a* b Z F F T
So * is a binary operation on Z. p  q :
Again, a*b= a+b–2=b+a–2
(by commutative law of addition on Z) p q p pq
= b * a for all a, b  Z
Hence * is commutative. T T F F
Again, (a * b) * c = (a + b – 2) * c T F F F
= (a + b – 2) + c – 2 = (a + b + c) – 4 F T T T
and a * (b * c) = a * (b + c – 2) F F T F
= a + (b + c – 2) – 2 = (a + b + c) – 4
Thus, (a * b) * c = a * (b * c) for all a, b, c  Z No, both are not equivalent.
Hence, * is associative.
Now, if e is the identity element in Z for *, then for all a  Z h. Show that there does not exist a graph with 5 vertices
a* e= aa+e–2=ae=2Z with degress 1, 3, 4, 2, 3 respectively.
So, 2 is the identity element for * in Z. Ans. According to hand shaking theorem, sum of degree of all the
Let the integer a have its inverse b. Then, vertices is even. But in the given degree sequence
a* b=–1 a+b–2=1b=3–a 1 + 3 + 4 + 2 + 3 = 13
 So, the inverse of a is (3 – a) Sum of degrees of all vertices is 13 which is an odd number.
Hence, no such graph exists with the given degree sequence.
d. Show that every cyclic group is abelian.
Ans. Let G be a cyclic group and let a be a generator of G so that i. Obtain the generating function for the sequence 4, 4, 4, 4, 4,
G = <a> = {an : n  Z} 4, 4.
SP–6 C (CS/IT-Sem-3) Solved Paper (2019-20) Discrete Structures & Theory of Logic SP–7 C (CS/IT-Sem-3)

Ans. Here a0 = 4, a1 = 4, a2 = 4, i. Find the cosets of H in Z.


G(x) = 4 + 4x + 4x2 + 4x3 + ...... ii. What is the index of H in Z.
= 4(1 + x + x2 + x3 + ......) Ans. Coset : Let H be a subgroup of group G and let a  G then the set
which is an infinite G.P. Ha = {ha : h  H} is called right coset generated by H and a.
Also the set aH = {ah : h  H} is called left coset generated by a and
4
G(x) = H.
1 x Numerical :
i. We have Z = {– 6, – 5, – 4, – 3, – 2, – 1, 0, 1, 2, 3, 4, 5, 6, ....}
j. Define Pigeon hole principle. and H = {...., – 12, – 6, 0, 6, 12, ....}
Ans. Pigeonhole principle : If n pigeons are assigned to m pigeonholes Let 0 Z and the right cosets are given as
then at least one pigeon hole contains two or more pigeons (m < n). H = H + 0 = {...., – 12, – 6, 0, 6, 12, ....}
H + 1 = {...., – 11, – 5, 1, 7, 13, ....}
Section-B H + 2 = {...., – 10, – 4, 2, 8, 14, ....}
H + 3 = {...., – 9, – 3, 3, 9, 15, ....}
2. Answer any three of the following : (3 × 10 = 30) H + 4 = {....., – 8, – 2, 4, 10, 16, ....}
H + 5 = {...., – 7, – 1, 5, 11, 17, ....}
1 1 1 1
a. Prove that + + + ............ + > n for n  2 using H = H + 6 = {...., – 6, 0, 6, 12, 18, ....}
1 2 3 n Now, its repetition starts. Now, we see that the right cosets,
principle of mathematical induction. H, H + 1, H + 2, H + 3, H + 4, H + 5 are all distinct and more over they
are disjoint. Similarly the left cosets will be same as right cosets.
1 1 1
Ans. Let S(n) :   .....   n ,n2 ii. Index of H in Z is the number of distinct right/left cosets.
1 2 n Therefore, index is 6.
Step I : Inductive base :
c. Show that the following are equivalent in a Boolean
1 1
S(2) :   1.707  1.414  2 algebra.
1 2 a  b  a * b = 0  b  a  a  b = 1
 S(1) is true. Ans. First prove the LHS, for this we use a * b = 0 or a  b = 0 (say)
Step II : Inductive hypothesis : Let us assume S(k) is true. Now, a = a  I [By identity of bounded lattice]
1 1 1 = a  (b  b) = (a  b)  (a  b) [By law of distribution]
i.e.,   ....   k = (a  b)  0 [a  b = 0]
1 2 k = abb [Partial order relation]
Step III : Inductive step : We have to show S(k + 1) is true Hence it is clear that if a * b = 0 then relation a  b is a partial order
1 1 1 1 relation.
i.e.,   ....    k 1 Since, it is evident in Boolean algebra for any a, b,
1 2 k k1
a  b iff b a [By law of duality]
1 1 1 1 1 Note : In the given question, the equivalency cannot be solved if
Consider   ....   > k we use a  b = 1. So, assuming a + b = 1.
1 2 k k1 k1
Since, a  b so we can say that a  b = a  a  b = b
[Using inductive hypothesis] If a + b = 1 then by DeMorgan’s law and involution,
k k1 1 k k 1 k1 1 = 0 = (a * b) = a + b = a + b
=    k1 0 = 1 = (a+ b) = a * b = a * b
k1 k 1 k1 So, a * b = 0 is equivalent to a + b = 1
 S(k + 1) is true
Hence by principle of mathematical induction, S(n) is true for all d. Show that ((P  Q)  (QR))  (P Q)  (P R) is
n  N. tautology by using equivalences.
Ans. = ((P  Q)  ( Q  R))  ( P  Q) ( P  R)
b. What do you mean by cosets of a subgroup ? Consider the = ((P  Q)  (Q R))  (( P  Q)  ( P  R))
group Z of integers under addition and the subgroup = ((P  Q  R)  (Q Q  R))  (( P  P  R) ( Q  P  R))
= (P  Q  R)  (Q  R)  ( P  R) ( Q  P  R)
H = {....., – 12, – 6, 0, 6, 12, .....} considering of multiple of 6
SP–8 C (CS/IT-Sem-3) Solved Paper (2019-20) Discrete Structures & Theory of Logic SP–9 C (CS/IT-Sem-3)

= (P  T) (Q R)  (T  Q)( P  R) [ T  P = T] Now remove vertex x and edge incident on v.
= (Q  R)  ( P  R) Then we will left with graph G* given as
So, the given expression is not a tautology.

e. Define planar graph. Prove that for any connected planar


graph, v – e + r = 2 where v, e, r is the number of vertices,
edges, and regions of the graph respectively. Fig. 4.
Ans. Planar graph : Therefore Euler’s formula holds for graphs in Fig. 4, since it has k
A graph G is said to be planar if there exists some geometric edges [By inductive hypothesis]
representation of G which can be drawn on a plane such that no Since G has one more edge than G* and one more vertices than G*.
two of its edges intersect except only at the common vertex. So, let v = v1 + 1 and e = e1 + 1 where G* = (v1, e1)
i. A graph is said a planar graph, if it cannot be drawn on a plane  v + r – e = v1 + 1 + r – e1 – 1
without a crossover between its edges crossing. = v1 + r – e1 = 2 [By inductive hypothesis]
ii. The graphs shown in Fig. 2(a) and (b) are planar graphs. Hence Euler’s formula holds true.
Case II : We assume that G has a circuit and e is edge in circuit.
Let G be given in Fig. 5.
v1 v4

(a) (b ) e
Fig. 1. Some planar graph.
Proof : We will use induction to prove this theorem. v2 v3
Step I : Inductive base : Fig. 5.
Assume that e = 1 Then we have two cases given in figure below : Now e is the part of boundary for 2 region so after removing edge
we are left with graph G* as shown in Fig. 6.
v1 v4
(a) (b)
Fig. 2.
In Fig. 1 (a) we have v = 2 and r = 1  v + r – e = 2 + 1 – 1 = 2 v2 v3
In Fig. 1 (b) we have v = 1 and r = 2  v + r – e = 1 + 2 – 1 = 2 Fig. 6.
Hence vertified Now number of edges in G* are k so by inductive hypothesis,
Step II : Inductive hypothesis : Euler formula holds for G*.
Let us assume that given theorem is true for e = k Now since G has one more edges and region than G* with same vertices.
i.e., for k edges So v + r – e = v + r1 + 1 – e1 – 1 = v + r1 – e1 = 2
Step III : Inductive step : Hence Euler’s formula also holds for G.
We have to show that theorem is true for k + 1 edges. Hence by Principle of mathematical induction Euler’s Theorem
Let graph G has k + 1 edges. holds true.
Case I : We suppose that g contain no circuits. Now take a vertex
v and find a path starting at v. Since g has no circuit so whenever Section-C
we find an edge we have a new vertex atleast we will reach a
vertex with degree one as shown in Fig. 3. 3. Answer any one part of the following : (1 × 10 = 10)
a. Find the number between 1 to 500 that are not divisible by
x any of the integers 2 or 3 or 5 or 7.
v
Ans. Let A, B, C and D be the sets of integers between 1 and
500(inclusive) which are divisible by 2, 3, 5, and 7, respectively.
We want |(A  B  C  D)C|. Now
Fig. 3.
SP–10 C (CS/IT-Sem-3) Solved Paper (2019-20) Discrete Structures & Theory of Logic SP–11 C (CS/IT-Sem-3)

|(A  B  C  D)| = |A| + |B| + |C| + |D| – |A  B| – |A  3. The operation • is distributive over +.
C| – |A  D| – |B  C| – |B  D| – |C  D| + |A  B  C| + i.e., for any a, b, c  R
|A  B  D| + |A  C  D| + |B  C  D| – |A  B  C  D| a • (b + c) = (a • b) + (a • c) or (b + c) • a = (b • a) + (c • a)
We have Elementary properties of a ring :
 500   500   500   500  Let a, b and c belong to a ring R. Then
|A| =  = 250 |B| =   = 166 |C| =   = 100 |D| = 
  7 
1. a.0 = 0. a = 0 2. a.(– b) = (– a).b = – (a.b)
 2   3   5 
= 71 3. (– a).(– b) = a.b
4. a(b – c) = a.b – a.c and (b – c).a = b.a – c.a
 500   500   500 
|A  B| =  = 83 |A  C| =  = 50 |A  D| =  = 35 For example : If a, b  R then (a + b)2 = a2 + ab + ba + b2
 6   10   14  We have (a + b)2 = (a + b) (a + b)
 500   500   500  = a (a + b) + b (a + b) [by right distributive law]
|B  C| =   = 33 |B  D| =   = 23 |C  D| =  = 14
 15   21   35  = (aa + ab) + (ba + bb)[by right distributive law]
 500   500  = a2 + ab + ba + b2
|A  B  C| =  = 16 |A  B  D| =  = 11
 30   42 
b. Prove or dis prove that intersection of two normal
 500   500 
|A  C  D| =  = 7 |B  C  D| =  =4 subgroups of a group G is again a normal subgroup of G.
 70   105 
Ans. Let H1 and H2 be any two subgroups of G. Since at least the identity
 500  element e is common to both H1 and H2.
|A  B  C  D| =  =2
 210   H1  H2  
So |A  B  C  D| = 385. In order to prove that H1  H2 is a subgroup, it is sufficient to prove
Hence, the number between 1 to 500 that are not divisible by 2 or that
3 or 5 or 7 is 500 – 385 = 115. a  H1  H2, b H1  H2 ab–1 H1  H2
Now a H1  H2  a H1 and a H2
b. Is the “divides” relations on the set of positive integers b H1  H2 b H1 and b  H2
transitive ? What is the reflexive and symmetric closure of But H1, H2 are subgroups. Therefore,
the relation ? a  H1, b  H1 ab–1  H1
R = {(a, b)|a > b} on the set of positive integers. a H2 , bH2 ab–1  H2
Ans. Yes, divides relation on the set of positive integers is transitive. Finally, ab–1  H1, ab–1  H2  ab–1  H1  H2
Numerical : Thus, we have shown that
Reflexive : a = a  aa a  H1 H2, b  H1  H2  ab–1  H1  H2.
 (a, a)  R  a is real number. Hence, H1  H2 is a subgroup of G.
 R is reflexive
Symmetric : Let (a, b)  R 5. Answer any one part of the following : (10 × 1 = 10)
 a  b  b  a  (b, a)  R a. Let (L, , , ) be a distribute lattice and a, b  L. If a  b = a
 R is not symmetric  c and a  b = a  c then show that b = c.
 R is not an equivalence relation. Ans. b = b  (a  b) (Absorption)
= b  (a  c) (hypothesis)
4. Answer any one part of the following : (1 × 10 = 10) = (b a) (b  c) (distributive law)
a. What is ring ? Define elementary properties of ring with = (a c) (b  c) (hypothesis)
example. = (a b) c (distributive law)
Ans. Ring : A ring is an algebraic system (R, +, •) where R is a non- = (a  c)  c (hypothesis)
empty set and + and • are two binary operations (which can be =c (Absorption)
different from addition and multiplication) and if the following
conditions are satisfied : b. Obtain the principle disjunction and conjunctive normal
1. (R, +) is an abelian group. forms of the formula (p  r)  (q  p).
2. (R, •) is semigroup i.e., (a • b) • c = a • (b • c)  a, b, c  R. Ans. Principle disjunction normal form :
(p  r)  (p  q)
SP–12 C (CS/IT-Sem-3) Solved Paper (2019-20) Discrete Structures & Theory of Logic SP–13 C (CS/IT-Sem-3)

(~ p  r)  ((p  q)  (p  q)) [By using distributive property] p q


  
q r
B C A
(B  A)  (C  A)  p r
A = (q  p)  (p  q) = (~ q  p)  (~ p  q) 4. Disjunctive syllogism : By this rule if the premises p  q and ~ q
= (~ q  p) ~ p  (~ q  p)  q are true then p is true.
= (~ q  ~ p)  (p  p)  (~ q  ~ q)  (p  q) The argument is of the form :
[By using distributive property] p q
= (~ q  ~ p)  F  F  (p  q) = (~ q  ~ p)  (p  q)
~q
Now, (B  A)  (C  A)
= ~ p  ((~ q  ~ p)  (p  q))  (r  (~ q  ~ p)  (p  q))  p
= (~ p ~ q  ~ p)  (~ p p  q))  (r  ~ q  ~ p)  (r  p  q)) 5. Addition : By this rule if p is true then p  q is true regardless the
= (~ q ~ p)  (r ~ q  ~ p)  (r  p  q) truth value of q.
= (T  r)(~ q ~ p)  (r p  q) = (~ q ~ p)  (r p  q) The argument is of the form :
Principle conjunctive normal form : p
(p  r)  (p  q)
 p q
(p  r)  (q  p)  (p  q)
(~ p  r)  (~ q  p)  (~ p  q) 6. Simplification : By this rule if p  q is true then p is true.
The argument is of form :
6. Answer any one part of the following : (1 × 10 = 10) p q p q
a. Explain various rules of inference for propositional logic.  p or  q
Ans. Rules of inference are the laws of logic which are used to reach
7. Conjunction : By this rule if p and q are true then p  q is true.
the given conclusion without using truth table. Any conclusion
The argument is of the form :
which can be derived using these laws is called valid conclusion
and hence the given argument is valid argument. p
1. Modus ponens (Law of detachment) : By this rule if an q
implication p  q is true and the premise p is true then we can  p q
always conclude that q is also true.
8. Constructive dilemma : By this rule if (p  q)  (r  s) and p  r
The argument is of the form : are true then q  s is true.
p q The argument is of form :
p ( p  q)  ( r  s)
 q p r
2. Modus tollens (Law of contraposition) : By this rule if an  q s
implication p  q is true and conclusion q is false then the premise 9. Destructive dilemma : By this rule if (p  q)  (r  s) and ~ q
p must be false.  s are true.
The argument is of the form : The argument is of the form :
p q ( p  q)  (r  s)
~q ~qs
 ~p   pr
3. Hypothetical syllogism : By this rule whenever the two 10. Absorption : By this rule if p  q is true then p  (p  q) is true.
implications p  q and q  r are true then the implication p  r is The argument is of the form :
also true.
p q
The argument is of the form :
 p  ( p  q)
SP–14 C (CS/IT-Sem-3) Solved Paper (2019-20) Discrete Structures & Theory of Logic SP–15 C (CS/IT-Sem-3)

b. Prove the validity of the following argument “if the races b. A collection of 10 electric bulbs contain 3 defective ones.
are fixed so the casinos are cooked, then the tourist trade i. In how many ways can a sample of four bulbs be selected ?
will decline. If the tourist trade decreases, then the police ii. In how many ways can a sample of 4 bulbs be selected
will be happy. The police force is never happy. Therefore, which contain 2 good bulbs and 2 defective ones ?
the races are not fixed.” iii. In how many ways can a sample of 4 bulbs be selected so
Ans. Let that either the sample contain 3 good ones and 1 defectives
p : Race are fixed. ones or 1 good and 3 defectives ones ?
q : Casinos are cooked. Ans.
r : Tourist trade will decline. i. Four bulbs can be selected out of 10 bulbs in
s : Police will be happy. 10! 10  9  8  7
The above argument can be written in symbolic form as
10C =
 = 210 ways
4
4! 6! 4  3  2  1
(p  q)  r
ii. Two bulbs can be selected out of 7 good bulbs in 7C2 ways and 2
r s~s
~ p defective bulbs can be selected out of 3 defective bulbs in 3C2 ways.
Thus, the number of ways in which a sample of 4 bulbs containing
So,
1. (p  q)  r (Given Premise) 2. r  s (Given Premise) 2 good bulbs and 2 defective bulbs can be selected as
3. ~ s (Given Permise) 4. ~ r Modus tollens using 2 and 3 7! 3! 76
7C × 3C =    3 = 63
5. ~ (p  q) Modus tollen using 1 and 4 2 2
2! 5! 2! 1! 2
6. ~ p  ~ q iii. Three godd bulbs can be selected from 7 good bulbs in 7C3 ways
and 1 defective bulb can be selected out of 3 defective ones in 3C1
7. Answer any one part of the following : (7 × 1 = 7) ways.
a. Solve the following recurrence equation using generating Similarly, one good bulb can be selected from 7 good bulb in 7C1
function ways and 3 defective ones in 3C3 ways.
G(K) – 7 G(K – 1) + 10 G (K – 2) = 8K + 6 So, the number of ways of selecting a sample of 4 bulbs containing
Ans. G(K) – 7 G(K – 1) + 10 G (K – 2) = 8K + 6 3 good ones and 1 defective or 1 good and 3 defective ones are
Now, the characteristics equation is :
7! 3! 7! 3!
x2 – 7x + 10 = 0 7C
3 × 3C1 + 7C1 × 3C3 =   
x2 – 5x – 2x + 10 = 0 3! 4! 1! 2! 1! 6! 3! 0!
x(x – 5) – 2(x – 5) = 0 765
=  3  7 = 35 × 3 + 7 = 112
x = 2, 5 32
The homogeneous solution is Gh(K) = C12K + C25K
Let the particular solution be
Gp(K) = A0 + A1K 
A0 + A1 K – 7{A0 + A1(K – 1)} + 10 {A0 + A1(K – 2)} = 8K + 6
A0 + A1 K – 7A0 – 7A1K + 7A1 + 10A0 + 10A1K – 20A1 = 8K + 6
4 A0 + 4A1K – 13A1 = 8K + 6
Comparing the coefficient we get,
4A1 = 8
A1 = 2
4 A0 – 13A1 = 6
A0 = (6 + 13A1)/4 = (6 + 26)/4 = 8
Solution is given by
= Gh(K) + Gp(K) = C12K + C22K + 2K + 8

You might also like