You are on page 1of 139

DISCRETE MATHEMATICS

AND GRAPH THEORY

For
COMPUTER SCIENCE
DISCRETE MATHEMATICS
. AND GRAPH THEORY
SYLLABUS
Mathematical Logic: Propositional Logic; First Order Logic.
Set Theory & Algebra: Sets; Relations; Functions; Groups; Partial Orders; Lattice;
Boolean Algebra.
Combinatory: Permutations; Combinations; Counting; Summation; generating
functions; recurrence relations; asymptotic.
Graph Theory: Connectivity; spanning trees; Cut vertices & edges; covering; matching;
independent sets; Coloring; Planarity; Isomorphism.
ANALYSIS OF GATE PAPERS
Exam Year 1 Mark Ques. 2 Mark Ques. Total
2003 5 15 35
2004 5 11 27
2005 5 10 25
2006 3 10 23
2007 4 9 22
2008 4 10 24
2009 4 6 16
2010 6 8 24
2011 - 5 10
2012 6 5 16
2013 6 3 12
2014 Set-1 6 9 24
2014 Set-2 5 8 21
2014 Set-3 7 8 23
2015 Set-1 5 8 21
2015 Set-2 5 8 21
2015 Set-3 7 6 19
2016 Set-1 5 4 13
2016 Set-2 6 3 12
2017 Set-1 3 1 5
2017 Set-2 3 2 7

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
CONTENTS
Topics Page No
1. PROPOSITIONAL LOGIC

1.1 Statement/Proposition 01
1.2 Logical Connectives and Compound Statements 01
1.3 Tautologies & Contradictions 02
1.4 Logical Equivalence 02
1.5 Predicates & Quantifiers 02
1.6 Some Basic Terms Related to Normal Form 03
1.7 Validity of Arguments Using Truth Tables 05
1.8 Rules of Inference 05
1.9 Rules of Inference for Quantified Statements 06
1.10 Practice Set 06
Gate Questions 16

2. SET THEORY, RELATIONS & FUNCTIONS

2.1 Set Theory 30


2.2 Operations on sets 31
2.3 Some Important Results 33
2.4 Partition 34
2.5 Relations 34
2.6 Types of Relations 35
2.7 Representation of a Relation 36
2.8 Composition of Relations 37
2.9 Connectivity Relation 37
2.10 Equivalence Class 39
2.11 Partial Order Relation and Poset 39
2.12 Hasse Diagram 39
2.13 Lattice 41
2.14 Functions 42
2.15 Composition of Function 45
2.16 Groups 48
2.17 Practice Set 49
Gate Questions 53

3. NUMBER THEORY & COUNTING


3.1 Division 72
3.2 Prime Numbers 72
3.3 Greatest Common Divisor 72
3.4 Least Common Multiples 73
3.5 Modular Arithmetic 73
3.6 Basic Counting Principles 73

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
3.7 Inclusion – Exclusion Principle 74
3.8 Permutations & Combinations 75
Gate Questions 77

4. GRAPH THEORY

4.1 Terminology of Graph Theory 86


4.2 Directed Graphs 88
4.3 Subgraph 90
4.4 Graph Isomorphism 91
4.5 Operations on a graph 93
4.6 Konigsberg Bridge Problem 94
4.7 Coloring Problem 95
4.8 Bipartite Graph 97
4.9 Trees 97
4.10 Planar & Dual Graphs 99
4.11 Minimum Spanning Tree 100
4.12 Practice Set 102
Gate Questions 106

5. ASSIGNMENT QUESTIONS 119

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
1 PROPOSITIONAL LOGIC

1.1 STATEMENT/ PROPOSITION Truth table of p  q


A statement (or Proposition) is a p Q p →q
declarative sentence that is either true or T T T
T F F
false, but not both. If the statement is true
F T T
then we assign a value T to it and if it is F F T
false then we assign a value F to it. These
values T and F are called the truth values Truth table of p  q
of the statement.
P Q p∨q
PROPOSITIONAL VARIABLES T T T
T F F
F T F
In logic, it is required to draw conclusions F F F
from the given statements. Now, instead of
writing the statements repeatedly, it is 1.2.2 CONDITIONAL STATEMENT (OR
convenient to denote each of the IMPLICATION), CONVERSE AND CONTRA
statements by a unique variable, called POSITIVE
propositional variable.
If p and q are statements, then “if p then q”
1.2 LOGICAL CONNECTIVES AND
is a compound statement, denoted as p 
COMPOUND STATEMENTS
q and referred as a conditional statements,
or implication. The implication p  q is
Statements or propositional variables can
false only when p is true and q is false;
be combined by means of logical
otherwise, it is always true. In this
connectives or operators to form a single
implication, p is called the hypothesis (or
statement called compound statements (or
antecedent or premise) & q is called the
compound propositions or molecular
conclusion (or consequent).
statement).
Truth table of p  q
1.2.1 LOGICAL CONNECTIVES
p q p ∨q
Symbol Connective Name T T T
~ OR ¬ Not Negation T F T
∧ And Conjunction
∨ Or Disjunction F T T
⟶ Implies or if ….. Implication or F F F
then conditional
↔ If and only if Equivalence or If p  q is an implication, then
biconditional The converse of p →q is the implication
q→p,
Truth table of ~ p The contrapositive of p→q is the
implication ~ q→~p,
P ~p
T F And the inverse of p→q is the implication
F T ~p →~ q.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Truth table of q→p (converse) its truth table contains both T and F values
at least once in its last column.
p q p→q q→p
T T T T
1.4 LOGICAL EQUIVALENCE
T F F T
F T T F Two compound statements p and q are said
F F T T to be logically equivalent or simply
equivalent, if p  q is a tautology. If p is
Truth Table of ~q→~p (contrapositive) equivalent to q then we write p  q .
p q ~p ~q ~q→~p Operations for Propositions
T T F F T
T F F T F
F T T F T A) Commutative Properties
F F T T T i) p  q  q  p
ii) p  q  q  p
Truth Table of ~p→~q (inverse) B) Associative Properties
i) p  (q  r)  (p  q)  r
p q ~p ~q ~p→~q
ii) p  (q  r)  (p  q)  r
T T F F T C) Distributive Properties
T F F T T i) p  (q  r)  (p  q)  (p  r)
F T T F F ii) p  (q  r)  (p  q)  (p  r)
F F T T T D) Idempotent Properties
i) p∨q  p
Bi-conditional Statement ii) p∧q  p
E) Properties of Negation
If p and q are statements, then “p if and i) ~(~p) ≡p (Double negation law)
only if q” is a compound statement, ii) ~(p∨q) ≡ (~p)∧(~q) (De Morgan’s
denoted as p  q and referred as a bi- law)
conditional statement or an equivalence. iii) ~(p∧q)≡(~p) ∨(~q)(De Morgan’s law)
The equivalence p  q is true only when
F) Identity Laws
both p and q are true or when both p and q
i) p  T  p
are false.
ii) p  F  p,
Where T denotes any proposition that
Truth Table of p↔q
is always true and F denotes any
proposition that is always false.
p Q p ↔q
G) Domination Laws
T T T i) p  T  T
T F F
F T F
ii) p  F  F
F F T H) Absorption Laws
i) p  (p  q)  p
1.3 TAUTOLOGIES & CONTRADICTIONS ii) p  (p  q)  p

A compound statement that is always true 1.5 PREDICATES & QUANTIFIERS


for all possible truth values of its
propositional variables, is called a Consider the statement
tautology or valid. “x is a positive integer.”
A statement that is neither a tautology nor This statement cannot have a truth value
a contradiction is called a contingency. So, unless the value of the variable x is
specified. The first part, i.e., the variable x,

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
is called the subject of the statement, while The negation of a quantified statement
the second part, i.e., “is a positive integer” – changes the quantifier and also negates the
refers to a property that the subject of the given statement as mentioned below:
statement can have, is called the predicate. i) ~ (  xP(x))   x~P(x)(De Morgan’s Law)
We can express the above statement by ii) ~(  xP(x))   x ~ P(x)(De Morgan’s Law)
P(x), where P denotes the predicate “is a iii)  x(P(x)  Q(x))   xP(x)   xQ(x)
positive integer” and x is the variable. The iv)  xP(x)   xQ(x)   x(P(x)  Q(x))
statement P(x) is also called a v)  x(P(x)  Q(x))   xP(x)   xQ(x)
Propositional function because once a vi) ~(  x~P(x)   xP(x)
value has been assigned to x, it becomes a
proposition and has a truth value. 1.6 SOME BASIC TERMS RELATED TO
Propositional functions also occur in NORMAL FORM
computer programs. The logic based upon
the analysis of predicates in any statement i) Elementary Product: A product of the
is called predicate logic or first order variables and their negation is called an
logic. elementary product.

1.5.1 QUANTIFIERS ii) Elementary Sum: A sum of the


variables and their negation is called an
Quantification is an another powerful
elementary sum.
technique to create a statement from a
propositional function. There are two types
iii) Factor: A factor of the given elementary
of quantification, namely, universal
sum or product, is a part of it and is
quantification and existential quantification.
itself an elementary sum or product.
The universal quantification of a predicate
P(x) is the statement “P(x) is true for all
iv) Minterms : Let p and q be two
values of x in the universe of discourse”.
propositional variables. All possible
The universe of discourse is the domain
formulas which consist of product of p
that specifies the possible values of the
or its negation and product of q or its
variable x. The notation  xP(x) denotes
negation, but should not contain both
the universal quantification of P(x). Here
the variable and its negation in any one
the symbol  is called the universal
of the formula are called minterms of p
quantifier. The statement  xP(x) can also
and q.
be stated as “for every xP(x)” or “for all v) Maxterm:For given variables, the
xP(x)”. maxtern consists of sums (disjunctions)
The existential quantification of a predicate in which each variable or its negation,
P(x) is the statement “There exists an but not both, appears only once. Thus
element x in the universe of discourse for the maxterms are the duals of
which P(x) is true”. minterms.
The notation  xP(x) denotes the existential
quantification of P(x). Here the symbol  is
1.6.1 DISJUNCTIVE NORMAL FORM
called the existential quantifier. The (DNF)
statement  xP(x) can also be stated as
“there is an x such that P(x)”, “there is at A statement which consists of a sum of
least one x such that P(x)”, “for some elementary products of propositional
xP(x)”, or “there exists an x such that P(x)”. variables and is equivalent to the given
compound statement is called a disjunctive
1.5.2 PROPERTIES OF QUANTIFIERS normal form of the given statement. This
form is not unique for the given statement.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
1.6.2 CONJUNCTIVE NORMAL FORM Identical minterms, if appearing in the
(CNF) disjunctions, must be deleted.

A statement which consists of a product of 1.6.4 PRINCIPAL CONJUNCTIVE NORMAL


elementary sums of propositional variables FORM (PCNF)
and is equivalent to the given statement is
called a conjunctive normal form of the For a given formula, an equivalent
given statement. This form is not unique statement consisting of conjunctions of the
for the given statement. maxterms only is known as its principal
conjunctive normal form or product-of-
1.6.3 PRINCIPAL DISJUNCTIVE NORMAL sums canonical form. The method for
FORM (PDNF) obtaining the principal conjunctive normal
form of a given statement using truth table
For a given formula, an equivalent is as follows:
statement consisting of disjunctions of the For every truth value F in the truth table of
minterms only is known as its principal the given statement, select the maxterm
disjunctive normal form or sum-of- which also has the value F for the same
products canonical form. The method for combination of the truth values of the
obtaining the principal disjunctive normal variables involved in the statement. The
form of a given statement using truth table product (conjunction) of these maxterms
is as follows: will then be equivalent to the given formula
For every truth value T in the truth table of and is also the required principal
the given statement, select the minterm conjunctive normal form for the given
which also has the value T for the same statement.
combination of the truth values of the
variables involved in the statement. The Alternative Method to Obtain PCNF
sum (disjunction) of these minterms will
then be equivalent to the given formula and The method for finding the principal
is also the required principal disjunctive conjunctive normal form of a given
normal form for the given statement. statement without using truth table, is
similar to the one described previously for
ALTERNATIVE METHOD TO OBTAIN the principal disjunctive normal form.
PDNF
1.6.5 To Obtain PCNF from PDNF and
The method for finding the principal Vice – Versa
disjunctive normal form of a given
statement without using truth table is as If the principal disjunctive (or conjunctive)
follows: normal form of a given statement S,
First replace the biconditionals and containing n variables, is known then the
conditional by their equivalent formulas principal disjunctive (or conjunctive)
containing only the connectives  ,  and ~ normal form of ~ S will consist of the
. Next, the negations are applied to the disjunction (or conjunction) of the
variables by using De Morgans’ laws remaining minterms (or maxterms) which
followed by distributive laws. Any are not present in the principal disjunctive
elementary product which is a (or conjunctive) normal form of S. Since S 
contradiction such as p  ~p, is dropped. ~ (~S), so we can obtain the principal
Minterms are obtained in the disjunction conjunctive (or disjunctive) normal form S
by introducing the missing factors. by applying De Morgan’s laws to the

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
principal disjunctive (or conjunctive) only if the proposition (p1  p2  …  pn)  c
normal form of ~S. is a tautology. However, a valid argument
does not necessarily lead to a true
Example : Find PCNF of a statement S conclusion.
whose PDNF is (p  q  r)  (p  q  ~r)  An argument which is not valid is called
(~p  q  r)  (p  ~q  r). invalid or a fallacy.
Solution
First we obtain the principal disjunctive 1.7 VALIDITY OF ARGUMENTS USING
normal form of ~S, which is the sum TRUTH TABLES
(disjunction) of those minterms which are
not present in the given PDNF of S. Hence For a given set of premises and a
the PDNF of ~S is conclusion, it is possible to find whether
(~p  ~q  ~r)  (~p  ~q  r)  (p  ~q the conclusion logically follows from the
 ~r)  (~p  q  ~r) given premises by constructing truth
Thus, the PCNF of S  ~[PDNF of (~S)], i.e. tables. We assert that from a set of
 ~((~p  ~q  ~r)  premises {p1, p2… pn} a conclusion c follows
(~p  ~q  r)  (p  ~q  ~r)  (~p  q logically if
 ~r)) p1  p2  …  pn  c
 (p  q  r)  (p  q  ~r)  (~p  q  r)  First, for all possible combinations of truth
(p  ~q  r) values of the atomic variables, we enter the
truth values of p1, p2… pn and c in the table.
Example: Find PDNF of a statement S Next, we observe the rows in which all p1,
whose PCNF is (p  q  r)  (p  ~q  r)  (p p2…, pn have the value T. If, for every such
 ~q  ~r)  (~p  q  r)  (~p  q  ~r) row, c also has the value T, then (1) holds.
Solution Alternatively, we may observe the rows in
First we find the PCNF of ~S, which is the which c has the value F. If, in every such
product (conjunction) of those maxterms row, at least one of the values of p1, p2, …..,
which do not appear in the given PCNF of S. pn is F, then (1) also holds.
Hence the PCNF of ~S is (p  q  ~r)  (~p
 ~q  r)  (~p  ~q  ~r) 1.8 RULES OF INFERENCE
Thus, the PDNF of S  ~[PCNF of (~S)],
i.e.  ~((p  q  ~r)  (~p  ~q  r)  (~p  ~q  Rule of Tautological Name
~r)) Inference Form
 (~p  ~q  r)  (p  q  ~r)  (p  q  r). p p  (p  q) Addition
p  q
1.6.6 ARGUMENTS pq (p  q)  p Simplification
p
An argument is an assertion that a given set P [p  (p  q)]  q Modus
of statements (or propositions) p1, p2, …., pq ponens
pn, called premises (or hypotheses) implies q
a certain statement c, called the conclusion. ~q [~q  (p  q)]  Modus tollens
Such an argument is denoted by pq ~p
p1, p2, …., pn  c ~ q
So, we can say that c logically follows from pq [(p  q)  (q  r)] Hypothetical
p1, p2,…., pn. pq  (p  r) syllogism
An argument p1, p2, …, pn  c is said to be pr
valid if c is true whenever all the premises
p1, p2, …., pn are true. In other words, the
argument p1, p2, … , pn  c is valid if and

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
1.9 RULES OF INFERENCE FOR Fundamental Rule 4:
QUANTIFIED STATEMENTS Existential Generalization

In the previous section, we discussed rules It states, if P(c) is true for some element c
of inference for propositions. Now, we will in the universe of discourse (U), then  x
describe some additional rules of inference P(x) which is true. Symbolically, we have
for statements involving quantifiers. The P(c) for some c  U
following four rules describe when the  x P(x)
universal and existential quantifiers can be
added to or deleted from an assertion. We
continue our list to include the two rules of 1.10 PRACTICE SET
inference we have already discussed.
Q.1 Is the following sentence a
proposition? If it is a proposition,
Fundamental Rule 1.
determine whether it is true or
Universal Specification or Universal
false.
Instantiation:
a) “Can Allen come with you?”
This rule may be represented as
b)1 + 2 = 3 or 2 + 3 = 5.
xP(x)
c) “Take two aspirin.”
 P(c) for any c  U Solution
It states that if a statement of the form a) This is a question, and hence not
xP(x) is assumed to be true, then the a proposition.
universal quantifier can be dropped to b) This is a proposition, and it is
obtain P(c) which is true for an arbitrary true because 1 + 2 = 3 is true and
object c in the universe of discourse (U). 2 + 3 = 5 is true.
c) This is an imperative sentence. It
Fundamental Rule 2. is not a proposition.
Universal Generalization:
Q.2 Write the negation of the following:
It states, if a statement P(c) is true for each a) “George Washington was the
element c of the universe of discourse (U), first president of the United
then the universal quantifier may be States.”
prefixed to obtain xP(x) . Symbolically, b) “1 + 5 = 7.”
this rule is c) “It is hot today.”
P(c) for an arbitrary c U d) “6 is negative.”
xP(x) Solution
a) The negation is “It is not the case
that George Washington was the
Fundamental Rule 3.
first president of the U. S.” In
Existential Specification or Existential
more straightforward language
Instantiation
we say “George Washington
was not the first president of
It states, if  xP(x) which is assumed to be
the U. S.”
true, then there is an element c in the
b) The negation states that 1 + 5 is
universe of discourse (U) such that P(c) is
not equal to 7: “1 + 5 ≠ 7.”
true. This rule takes the form
c) The negation is “It is not that
xP(x)
case that it is hot today”, or
 P(c) for some c  U “It is not hot today.” Note that
the negation is not “It is cold
today,” because the

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
temperature could be neither c) “I go walking whenever it rains.”
hot nor cold, making both d) “To pass the course it is sufficient
statements false. But a that you get a high grade on the
statement and its negation final exam.”
must have opposite truth e) “To pass the course it is necessary
values. that you get a high grade on the
d) The negation states that “It is final exam.”
not the case that 6 is negative.” f) “I will buy the tickets only if you
This means that 6 is greater call.”
than or equal to 0; we say “6 is Solution
nonnegative.” Note that “6 is c) The word “whenever” is
positive” is not the negation of equivalent to “if”. Therefore we
the given statement. Saying have “If it rains, then I go
that a number is not negative walking.”
means that the number can d) Getting a high grade on the final
be either 0 or positive. exam is a sufficient condition for
passing the course. That is,
Q.3 The following proposition uses the getting a high grade on the final
English connective “or”. Determine exam will guarantee that you
from the context whether “or” is pass the course. Hence we have
intended to be used in the inclusive “If you get a high grade on the
or exclusive sense. final exam, then you will pass the
a) “Tonight I will stay home or go course.”
out to a movie.” e) We first rephrase the statement
b) “If you fail to make a payment as “Getting a high grade on the
on time or fail to pay the final exam is a necessary
amount due, you will incur a condition for passing the course.”
penalty.” The word “necessary” and the
c) “If I can’t schedule the airline word “sufficient” give rise to
flight or if I can’t get a hotel converse implications: “p is
room, then I can’t go on the trip.” sufficient for q” is p→ q, while
Solution “p is necessary for q” is q→p (or,
a) Because the one alternative equivalently, ≦p→≦q). If the
(staying home) precludes the given statement had the word
other (going out),“or” is used in “sufficient” instead of
the exclusive sense. “necessary”, the statement
b) You might both fail to make a would be “If you get a high grade
payment on time and your late on the final exam, then you will
payment might be for an pass the course.” The word
incorrect amount. Hence the “necessary” yields the converse
inclusive “or” is used here. of this statement; that is, “If you
c) If both events happen, you won’t will pass the course, then you get
go on the trip. Hence the a high grade on the final exam.”
inclusive “or” is used here. The equivalent contra positive
sounds better in English: “If you
Q.4 The following statement is a do not get a high grade on the
conditional proposition in one of its final exam, then you will not pass
many alternate forms. Write it in the course.”
English in the form “If . . . then . . . .” f) “p if q” and “p only if q” are

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
converses; “only” has the effect a) “It rains exactly when I plan a
of reversing the implication picnic.”
arrow. The proposition “p if q” is b) “I attend class when I have a quiz
equivalent to q→p; thus “p only if and I have a quiz when I attend
q” is equivalent to p→q. In class.”
English we have “If I buy the c) “I visit the library whenever I
tickets, then you call.” Using the have a paper to write, and
equivalent contra positive, this is conversely.”
“If you do not call, then I won’t Solution
buy the tickets.” a) The word “exactly” takes the
place of “if and only if. “The
Q.5 Write the contra positive, converse, statement says that “If it rains,
and inverse of the following then I plan a picnic” and “If I
proposition: plan a picnic, then it rains.”
= “If the number is positive, then its Putting these two together we
square is positive.” have “It rains if and only if I plan
= “I stay home whenever it is a picnic.”
stormy.” b) Using “if” in place of “when,” we
Solution have “I attend class if I have a
= The contra positive of p→ q is quiz” and “If I attend class, then I
≦q→≦p. Therefore the contra have a quiz.” Therefore we have
positive of “If the number is positive, “I attend class if and only if I
then its square is positive” is the have a quiz.”
equivalent statement “If the square c) Using v for “I visit the library”
of a number is not positive, then the and p for “I have a paper to
number is not positive.” write,” we have both p→ v and
The converse of p→q is q→p . Thus its converse v→p. Together,
the converse is “If the square of a these two statements give p↔v,
number is positive, then the number or “I visit the library if and only if
is positive.” I have a paper to write.”
The inverse of p →q is ≦p→≦q.
Therefore we have the inverse “If Q.7 Translate this system specification
the number is not positive, then the into symbols:
square is not positive.” a) “The online user is sent a
= Remember that the word notification of a link error if the
“whenever” is equivalent to “if”, so network link is down.”
the original proposition is “I stay b) “Whenever the file is locked or
home if it is stormy,” or, the system is in executive
equivalently “If it is stormy, then I clearance mode, the user cannot
stay home.” Therefore: make changes in the data.”
Contra positive: “If I do not stay Solution
home, then it is not stormy.” a) The statement is equivalent to
Converse:“If I stay home, then it is “If the network link is down,
stormy.” then the online user is sent a
Inverse: “If it is not stormy, then I do notification of a link error.”
not stay home.” Using d for “the network link is
down” and s for “the online user
Q.6 Write the following proposition in is sent a notification of a link
the form “. . .if and only if. . . .” error,” the statement becomes

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
d→s. Equivalences .
b) The statement is equivalent to Sol.
“If the file is locked or the
system is in executive clearance
mode, the user cannot make
changes in the data.” Using l for
“the file is locked,” e for “the
system is in executive clearance
mode,” and u for “the user can
make changes in the data,” the
statement is (l ∨e) →≦u.
Q.11 Write the statementp→(¬q∧r) using
Q.8 How would you do a Boolean search only the connectives¬and∧.
for the appropriate Web pages for Solution
each of these? p → (¬q ∧ r) ≡ ≦p ∨(¬q ∧ r) ≡ ≦(p
a) Hotels in New England. ∧¬(¬q ∧ r)).
b) Hotels in England.
c) Hotels in England or New Q.12 Let P(x) be the statementx2< x
England. where the universe for axis all real
Solution numbers.
a) We need to examine “hotels” and a) Determine the truth value of P
both “New” and “England”; that (0).
is, HOTELS AND (NEW AND b) Determine the truth value of P
ENGLAND). (1/3).
b) To avoid getting hotels in New c) Determine the truth value of P
England, we use ENGLAND NOT (2).
NEW. Therefore we have d) Determine the set of all real
HOTELS AND(ENGLAND NOT numbers for which P(x) is true.
NEW). Solution
c) The two key words here are a) The proposition P (0) states that
“hotels” and “England” (which 02< 0, which is false.
will include both the country and b) The proposition P (1/3) states
the part of the United States). that (1/3)2< 1/3, which is true.
Therefore we can search for c) The proposition P (2) states that
HOTELS AND ENGLAND. 4 < 2, which is false.
d) If x≥ 1, then x2≥x, so P(x) is false.
Q.9 Provethat¬[r∨(q∧(≦r→≦p))] ≡ ¬ r ∧ If x≤ 0, then x2≥ 0 and hence
(p ∨ ¬ q) by using a truth table. x2≥x, so P(x) is false. If 0 < x < 1,
then x2< x is true (because
Solution this inequality can be rewritten
as x2−x< 0, or x(x−1) <0, which
is true because the product is
negative — it is the product of a
positive and a negative number).
Therefore, P(x) is true if and
only if 0 < x < 1.
Q.13 Find all real numbers x and y
Q.10 Provethat¬[r∨(q∧(≦r→≦p))] ≡ ¬r ∧ such that R(x, y) is true, where
(p ∨ ¬ q) by using a series of logical R(x, y) is the predicate “x y = y.”

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Solution claims that there is an x such that x
The given predicate can be walked on the moon; that is,
rewritten as xy−y = 0, or y(x− 1) = 0. ∃xW(x). The negation is ¬∃xW(x),
This is true if and only if either y which is equivalent to ∀x¬W( x).
= 0 or x− 1 = 0. That is, R(x, y) is true Therefore, the negative states that
if and only if y = 0 or x = 1. for every x that can be chosen, x did
not walk on the moon. That is, “No
Q.14 Find a universe for x such that person walked on the moon.”
∀x(x2< x) is true. Note:
Solution The negation is not “There is a
We need to select numbers such person who did not walk on the
that the square of the number is less moon.” You cannot have a statement
than the number. We could take the and its negation both true, which
universe for x to consist of any would be the case if we took this
numbers greater that 0 but less statement as the negation of the
than 1. For example, one such original statement.
universe would consist of the single
number 1/2. Another universe is Q.17 Write in symbols using predicates
{1/5, 2/3, 9/11}. The largest and quantifiers: “Everyone who
universe we could choose is the visited France stayed in Paris”.
entire interval (0, 1). Solution
Q.15 Determine whether ∃t (t2+ 12 = 7t) The solution depends on the
is true, where the universe for t universe for the variable. If we take
consists of all real numbers. as the universe all people who visited
Solution France, we can write the proposition
The equation t2 + 12 = 7t can be as ∀xP(x), where P(x) is the
rewritten as t2− 7t + 12 = 0, which predicate “x stayed in Paris.”
factors as (t− 3)(t− 4) = 0. This is However, if we take all people as the
true for the numbers 3 and 4. universe, then we need to introduce
Hence the given proposition is true. a second predicate F(x) for “x visited
France.” In this case, the proposition
Q.16 Negate “There is a person who can be written as ∀x (F(x) →P(x)).
walked on the moon.”
Solution Q.18 Express this statement in symbols,
We can always obtain the negation using predicates and any needed
of a statement by placing the phrase quantifiers: “Every freshman at the
“it is not the case that” in front of the College is taking some Computer
statement. Thus, the negation is “It Science course.”
is not the case that there is a person Solution
who walked on the moon”. That is, There are many solutions,
“No person walked on the moon. depending on the universes chosen
“(Incidentally, the original statement for people and for courses. If we
is true because12 astronauts walked take as our universe for people all
on the moon between 1969 and freshmen at the College and our
1972). universe for courses all Computer
We can also work with symbols. Let Science courses, then we can use
W(x) be the statement “x walked on the predicate T (x, y): “x is taking y”
the moon” where the universe for x and hence the statement can be
consists of all people. The statement written as ∀x∃ y T(x, y).

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
However, suppose we enlarge the take for the universe for the
universe of people to include all variable. If we take all juniors in this
students at the College, not only class as the universe, we can write
freshmen. Also, suppose we enlarge the proposition a s∀x S(x) where
the range of courses to include all S(x) is the predicate “x scored above
courses offered at the College. In 90 on the first exam”. However, if
this case we need to introduce a we take all students in this class as
predicate to restrict the students the universe, then we can write the
and a predicate to restrict the proposition a s∀x (J(x) → S(x))
courses: where J(x) is the predicate “x is a
F(x): “x is a freshman” C(y): “y is a junior.”
Computer Science course”. We can extend the universe still
We are making a conditional further. Suppose we take all students
statement: “If the student is a as the universe. Then we need to
freshman, then the student is taking introduce a third predicate C(x) to
some Computer Science course;” mean “x is in this class.” In this case,
that is the proposition becomes ∀x ((C(x) ∧
∀x (F(x) → ∃y (C(y)∧ T (x, y))), J(x)) → S(x)).
Which we can rewrite as We can also replace S(x) by S(x, y)
∀x ∃y (F(x) → C(y)∧ T (x, y)) where S(x, y) means “x received a
score of y on the first exam” and the
Q.19 Write the following statements in universe for y is the set of all
English, using the predicate S(x, y): possible exam scores. In this case
“x shops in y”, where x represents the proposition becomes ∀x∃y(C(x)
people and y represents stores: ∧ J(x) → (y > 90) ∧ S(x, y)).
a) ∀y S(Margaret, y). Note that we used a predicate, y >
b) ∃x∀y S(x, y). 90, without giving it a name.
Solution
a) The predicate states that if y is a Q.21 Write the following statement in
store, then Margaret shops there. English, using the predicates S(x, y):
That is, “Margaret shops in every “x shops in y”
store.” T (x): “x is a student”
b) The predicate states that there is Where x represents people and y
a person x with the property that represents stores:∃y∀x (T (x)→≦S(x,
x shops in every store y. That is, y))
“There is a person who shops in Solution
every store.” The statement ∃y∀x (T (x) →≦S(x,
[Note that part (a) is obtained y)) says that “there is a store y with
from part (b) by taking a a certain property, namely, if x is
particular value, Margaret, for any student whatever, then x does
the variable x. If we do this, we not shop in y.”
do not need to quantify x.] We have “There is a store in which
no student shops.”
Q.20 Write in symbols using predicates
and quantifiers: “Every Junior in Q.22 Write the following statement in
this class scored above 90 on the English, using the predicates
first exam.” S(x, y): “x shops in y”
Solution T (x): “x is a student”
The solution depends on what we Where x represents people and y

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
represents stores: following cases and false otherwise:
∀y∃x (T (x) ∧ S(x, y)). P(1, 4), P(2, 1), P(2, 2), P(3, 4), P(4,
Solution 1), P(4, 4).
The statement ∀ y∃x (T (x) ∧ S(x, y)) Determine whether each of the
asserts that for every store y that following is true or false:
can be chosen, there is a person x a) ∃y∀xP(x, y).
who is a student and who shops in y. b) ∀xP(x, x).
Therefore: “Every store has at least c) ∀x∃y (x≠y ∧ P(x, y)).
one student who shops in it.” Solution
a) False. If we take y = 1, not all
Q.23 Write the following statement in four statements P(x, 1) are true.
English, using the predicates C(x): “x (Take x = 1 for example.) If we
is a Computer Science major” take y= 2, not all four statements
M(y): “y is a Math course” T (x, y): “x P(x, 2) are true. (Take x=1 for
is taking y” example.) If we take y = 3, not all
Where x represents students and y four statements P(x, 3) are true.
represents courses: (Take x=1 for example.) If we
∀x ∃y (C(x) → M(y) ∧ T (x, y)). take y= 4, not all four statements
Solution P(x, 4) is true. (Take y = 2.)
The statement ∀x ∃y (C(x) → M(y) ∧ b) False. P (1, 1) is false.
T (x, y)) asserts that for every c) True. For every x we can find a
student x there is a course y such value y ≠ x such that P(x, y) is
that if x is a major in Computer true: P (1, 4), P (2, 1), P (3, 4),
Science then x is taking y and y is a and P (4, 1).
Math course. Therefore, “Every
Computer Science major is taking at Q.26 What are the truth values of each of
least one Math course.” these? Assume that in each case the
universe consists of all real numbers.
Q.24 Write the following statement using c) ∃x ∃y (xy = 2) d)∃x∀y(xy=2)
quantifiers and the predicates e) ∀x ∃y (xy = 2) f)∀x∀y(xy = 2)
S(x, y): “x shops in y” Solution
T (x): “x is a student” c) This statement asserts that there
Where the universe for x consists of are numbers x and y such that xy
people and the universe for y = 2. This is true because we can
consists of stores: “There is no store take x = 2 and y = 1, for example.
that has no students who shop d) This statement asserts that there
there.” is a number x such that when we
Solution multiply this particular x by
We can begin by stating that “It is every possible number y we
false that there exists a store y with obtain xy=2. There is no such
the property that no students shop number x. (If there were such a
in y.” Saying that “no students shop number x, then xy=2 for all y. If
in y” is ∀x (T(x)→¬S(x, y)). we take y = 0, the product xy
Completely written in symbols, we cannot equal 2.) Therefore the
have¬∃y ∀x (T (x) →≦S(x, y)). statement is false.
e) This statement asserts that for
Q.25 Suppose that the universe for x and every number x we choose, we
y is {1, 2, 3, 4}. Assume that P(x, y) is can find a number y such that
a predicate that is true in the the xy = 2. This is almost always

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
the case, except if we choose x = Q.28 Express the following statement
0. If we take x = 0, there is no using predicates & quantifiers: “The
number y such that xy = 2. product of two positive numbers is
Therefore the statement is false. positive.”
(Note that the statement would Solution
be true if the universe for x Using the universe consisting of all
consisted of all nonzero real real numbers for x and y, we are
numbers.) saying that “If x and y are greater
f) This statement claims that no than zero, then xy is greater than
matter what numbers x and y we zero. That is, ∀x ∀y [(x > 0 ∧ y > 0) →
choose, we obtain xy = 2. Clearly, (xy > 0)].
this is false, because we could If we use all positive real numbers
choose x = y = 1. as the universe for x and y, we can
write the statement more simply:
Q.27 Suppose P(x, y, z) is a predicate ∀x ∀y (xy > 0).
where the universe for x, y, and z is
{1, 2}. Also suppose that the Q.29 Write the following statement in
predicate is true in the following symbols using the predicates
cases P(1, 1, 1), P(1, 2, 1), P(1, 2, 2), S(x): “x is a perfect square”
P(2, 1, 1), P(2, 2, 2), and false P(x): “x is positive”
otherwise. Determine the truth Where the universe for x is the set of
value of each of the following all integers:
quantified statements: “Perfect squares are positive.”
c) ∀x ∃y ∃z P(x, y, z) Solution
d) ∀x ∀y ∃z P(x, y, z) Note that “for all” is implied. When
e) ∀y ∀z ∃x P(x, y, z) we say “Perfect squares are
f) ∀x ∃y ∀z P(x, y, z) positive” we are really saying that
Sol. “For all integers x we choose, if x is a
c) True. For every value of x (x = 1 perfect square, then x is positive.” In
and x = 2) there are y and z such symbols we have ∀x (S(x) → P(x)).
that P(x, y, z) is true. In both
cases we can choose both y = z = Q.30 Write the statement “There is a
2. largest number” using predicates
d) True. For each choice of values and quantifiers. Then give its negation
for x and y, we can find z such in symbols.
that P(x, y, z) is true. We need to Solution
consider four cases. Taking the universe for x and y to
x = y = 1: we take z = 1, consist of all real numbers, we are
x = 1 and y = 2: we can take z to stating that there is a number x such
be 1 or 2, that, no matter what number y is
x = 2, y = 1: we take z = 1, chosen, we have x ≥ y. Therefore.
x = y = 2: we take z = 2. ∃x ∀y (x ≥ y).
e) False. If we take y = 1 and z = 2, Its negation can be formed using
there is no value of x such that these steps:
P(x, 1, 2) is true. ¬ (∃x ∀ y (x ≥ y)) ≡ ∀x ∃y ≦(x ≥ y) ≡
f) False. Take x=2. There is no ∀x ∃y (x < y). (This says that there is
value of y such that ∀z P(2, y, z) no largest number.)
is true.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.31 The proposition (¬q∧(p→q))→≦pis a
tautology. It is the basis for the rule
of inference modus tollens:
¬q
p → q ∴¬p
Suppose we are given the
propositions: “If the class finishes
Chapter 1, then they have a quiz”
and “The class does not have a quiz.”
Find a conclusion that can be drawn
using modus tollens.
Dolution
Let p represent “The class finishes
Chapter 2” and q represent “The
class has a quiz.” According to
modus tollens, because we have ¬q In the fourth row the three
and p→q, we can conclude ¬p, or hypotheses (columns 5, 6, 7) are
“The class did not finish Chapter 1.” true and the conclusion is false.
Therefore, the argument is not valid.
Q.32 Suppose that “it is snowing” is true
and that “it is windy” is true. Using Q.34 Suppose we have the two
the conjunction rule, what propositions (with symbols to
conclusion can be drawn? represent them):
Solution “It is raining (r) or I work in the
Using s for “it is snowing” and w for yard (w)”
“it is windy,” we are given that s is “It is not raining (¬r) or I go to the
true and w is true. By the library (l).”
conjunction rule, we can conclude What conclusion can we draw from
s∧w, or “it is snowing and windy”. these propositions?
Solution
Q.33 Determine whether this argument is We can use the resolution rule of
valid by using a truth table:I play inference to draw a conclusion from
golf or tennis. these propositions. In symbols the
If it is not Sunday, I play golf and two given propositions are (r∨w) ∧
tennis. (¬r∨l). From resolution we have
If it is Saturday or Sunday, then I (r∨w) ∧ (¬r∨l) → ( w∨l). Therefore,
don’t play golf. Therefore, I don’t we can draw the conclusion “I work
play golf. in the yard or I go to the library.”
Solution
Using the variables: g: I Q.35 Suppose we have:
play golf t: I play tennis s: “Every student in this class is a
it is Saturday u: it is Sunday, junior.”
the argument can be written in “Every Junior in this class passed the
symbols as: g ∨ t final exam.”
≦u → (g ∧ t) “Allen is a student in this class.”
+(s∨u) →≦g∴¬g Explain why we can draw the
conclusion “Allen passed the final
Truth table: exam.”
Solution

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
We will use S(x) to mean “ x is a The universal quantifier “∀x”
student in this class”, J(x) to mean “x (where the universe for x consists of
is a Junior”, and P(x) to mean “x all integers) is understood, if we
passed the final exam”, where the read the statement as “for every x
universe for x consists of all people. we choose, x2 does not end in the
The proof is: digit 8”. That is, we have ∀x (x2 does
1. ∀x (S(x) →J(x)) premise not end in the digit 8).
2. ∀x(J(x) →P(x)) premise However, we can read the given
3. S(Allen)→J(Allen)universal statement equivalently as “there
instantiation on (1) [ to be does not exist an integer x such that
covered in next class] x2 ends in the digit 8”. If we do this,
4. J(Allen) →P(Allen) universal the existential quantifier is used:
instantiation on (2) ¬∃x (x2 ends in the digit 8).
5. S(Allen) →P(Allen) hypothetical Both statements are equivalent.
syllogism on (3) and (4)
6. S(Allen) premise
7. P(Allen) modus ponens on (5)
and (6)

Q.36 Sometimes quantifiers in statements


are understood, but do not actually
appear in the word so the statement.
Explain what quantifiers are
understood in the statement “The
product of two negative numbers is
positive.”
Solution
What is really meant is “For all pairs
of negative numbers, the product is
positive.” In symbols, ∀x ∀y [((x < 0)
∧ (y < 0)) → (xy > 0)].

Q.37 Consider the theorem “If x ends in


the digit 3, then x3 ends in the digit
7.” What quantifier is understood,
but not written?
Solution
The universal quantifier “∀x”
(where the universe for x consists of
all integers) is understood. That is,
we have ∀x ((x ends in the digit 3) →
(x3 ends in the digit 7)).

Q-38 Consider the theorem “No squares


of integers end in the digit 8.” What
quantifier is understood, but not
written?
Solution

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
GATE QUESTIONS
Q.1 What is the converse of the  : (x) Px   y  Qxy  Qyy  
following assertion?
I stay only if you go   x  Px 
a) I stay if you go I1 : Domain : the set of natural
b) If I stay then you go numbers
c) If you do not go then I do not stay Px = ‘x is a prime number’
d) If I do not stay then you go Qxy = ‘y divides x’
[GATE-2001] I2 : Same as I1 except that Px = ‘x is a
composite number.’
Q.2 Consider two well-formed formulas Which of the following statements is
in propositional logic true?
F1 : P  P a) I1 satisfies  , I2 does not
F2 : (P   P)   P  P  b) I2 satisfies  , I1 does not
c) Neither I2 nor I1 satisfies 
Which of the following statements is
d) Both I1 and I2 satisfy  .
correct?
[GATE-2003]
a) F1 is satisfiable, F2 is valid
b) F1 is unsatisfiable, F2 is satisfiable Q.6 The following resolution rule is used
c) F1 is unsatisfiable, F2 is valid in logic programming:
d) F1 and F2 are both satisfiable Derive clause (P  Q) from clauses (P
[GATE-2001]  R), (Q  R)
Which of the following statements
Q.3 If X then Y unless Z” is represented related to this rule is FALSE?
by which of the following formulas a) (P  R)  (Q  R)  (P  Q) is
in propositional logic? logically valid
(“  ”) is negation, “” is b) (P  Q)  (P  R)  (Q  R) is
conjunction, and 
“ ” is logically valid
implication) c) (P  Q) is satisfiable if and only if
a) (X Z)  Y b) (X Z)  Y (P  R)  (Q  R) is satisfiable
c) X   Y  Z d) (X  Y)  Z d) (P  Q)  FALSE if and only if
both P and Q are unsatisfiable
[GATE-2002]
[GATE-2003]
Q.4 Which of the following is a valid first
Q.7 Identify the correct translation into
order formula? (Here α and β are
logical notation of the following
first order formulae with x as their
assertion. Some boys in the class are
only free variable)
taller than all the girls
a) (x)    x     x     Note : Taller (x, y) is true if x is taller
b) (x)    x     than y.
c) x)      x    x   a)  x   boy(x)   y  girl(y)  taller(x, y)  

d) (x)       x     x   b)  x   boy(x)   y  girl(y)  taller(x, y)  

[GATE-2003] c)  x   boy(x)  y  girl(y)  taller(x, y)  


d)  x   boy(x)   y  girl(y)  taller(x, y)  
Q.5 Consider the following formula α
and its two interpretations I1 and I2. [GATE-2004]

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
 tiger(x)  lion(x)   
Q.8 The following proportional c) x  
statement is  attacks(x)  (hungry(x)   Threatened(x)
(P  (Q  R))  ((P  Q)  R)
 tiger(x)  lion(x)   
a) satisfiable but not valid d) x  
b) valid  hungry(x)  threatened(x)   attacks(x)
c) a contradistinction [GATE-2006]
d) None of the above
[GATE-2004] Q.12 Consider the following proportional
statements:
Q.9 Let P, Q and R be three atomic P1: ((A  B)→C)) = ((A→C)  (B→C))
propositional assertions. Let X P2: ((A  B)→C)) = ((A→C)  (B→C))
denote (P  Q) → R and Y denote Which one of the following is true?
(P→R)  (Q→R). Which one of the a) P1 is a tautology, but not P2
following is a tautology? b) P2 is a tautology, but not P1
a) X = Y b) X → Y c) P1 and P2 are both tautologies
c) Y → X d) Y  X d) Both P1 and P2 are not
[GATE-2005] tautologies
[GATE-2006]
Q.10 What is the first order predicate
calculus statements equivalent to Q.13 A logical binary relation ʘ, is
the following? Every teacher is liked defined as follows:
by some student A B A⊙B
 teacher(x)   TRUE TRUE TRUE
a) (x)  
(y) student(y)  likes(y, x)  TRUE FALSE TRUE

 teacher(x)   FALSE TRUE FALSE


b) (x)  
(y) student(y)  likes(y, x) 
FALSE FALSE TRUE

 teacher(x)   Let ~ be the unary negation (NOT)


c) (y)(x)   operator, with higher precedence,
student(y)  likes(y, x)  then ʘ. Which one of the following
 teacher(x)  (y)  is equivalent to A  B?
d) (x)   a) (~A ʘ B) b) ~ (A ʘ ~B)
student(y)  likes(y, x)  c) ~ (~A ʘ ~B) d) ~ (A ʘ B)
[GATE-2005] [GATE-2006]

Q.11 Which one of the first order Q.14 Let Graph(x) be a predicate which
predicate calculus statements given denotes that x is a graph. Let
below correctly expresses the Connected (x) be a predicate which
following English statement? Tigers denotes that x is connected. Which
and lions attack if they are hungry of the following first order logic
or threatened. sentences DOES NOT represent the
statement; “Not every graph is
 tiger(x)  lion(x)   
a) x   connected”?
 hungry(x)  threatened(x)   attacks(x) a) x(Graph(x)  Connected(x))
b)  x(Graph(x)   Connected(x))
 tiger(x)  lion(x)   
b) x   c)  x( Graph(x)  Connected(x))
 hungry(x)  threatened(x)   attacks(x) d)  x(Graph(x)  Connected(x))
[GATE-2007]

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.15 Which of the following is TRUE Q.18 Which one of the following is the
about formulae in Conjunctive most appropriate logical formula to
Normal Form? represent the statement:
a) For any formula, there is a truth “Gold and silver ornaments are
assignment for which at least previous”
half the clauses evaluate to true. The following notations are used:
b) For any formula, there is a truth G(x) : x is a gold ornament
assignment for a which all the S(x) : x is a silver ornament
clauses evaluate to true. P(x): x is precious
c) There is a formula such that for a) x  P(x)   G(x)  S(x)  
b) x  G(x)  S(x)  P(x)  
each truth assignment at most
one-fourth of the clauses
evaluate to true. c) x  G(x)  S(x)  P(x)  
d) None of the above d) x  G(x)  S(x)  P(x)  
[GATE-2007]
[GATE-2009]
Q.16 Let fsa and pda be two predicates
such that fsa(x) means x is a finite Q.19 The binary operation is defined as
state automaton, and pda(y) means, follows:
that y is a pushdown automaton. Let P Q PQ
equivalent be another predicate T T T
T F T
such that equivalent (a, b) means a
F T F
and b are equivalent. Which of the F F T
following first order logic statement Which one of the following is
represents the following : equivalent to P  Q ?
Each finite state automaton has an
a) QP b) PQ
equivalent pushdown automaton.
a) (∀xfsa(x))⇒(∃ypda(y)∧equivalent c) PQ d) PQ
(x, y)) [GATE-2009]
b) ~∀y(∃xfsa(x)⇒pda(y)∧equivalent
Q.20 Consider the following well –
(x, y))
formed formulae:
c) ∀x∃y(fsa(x) ∧ pda(y) ∧ equivalent
I. x(P(x))
(x, y))
d) ∀x∃y(fsa(y) ∧ pda(x)∧ equivalent II. x  P  x  
(x, y)) III. x  P  x  
[GATE-2008]
IV. x  P  x  
Q.17 P and Q are two propositions. Which Which of the above are equivalent?
of the following logical expression a) I and II b) I and IV
are equivalent? c) II and III d) II and IV
1. P ~ Q [GATE-2009]
2. ~ (~ P Q)
Q.21 Suppose the predicate F(x, y, t) is
3.  P  Q    P ~ Q    ~ P ~ Q  used to represent the statement that
4.  P  Q    P ~ Q    ~ P  Q  person x can fool person y at time t.
a) Only 1 and 2 Which one of the statements below
b) Only 1, 2 and 3 expresses best the meaning of the
c) Only 1,2 and 4 formula xyt  F  x, y, t   ?
d) All of 1,2,3 and 4 a) Everyone can fool some person
[GATE-2008] at some time

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
b) No one can fool everyone all the “Some real numbers are rational”
time a) x  real(x)  rational(x) 
c) Everyone cannot fool some
person all the time b) x  real(x)  rational(x) 
d) No one can fool some person at c) x  real(x)  rational(x) 
the time
d) x  rational(x)  real(x) 
[GATE-2010]
[GATE-2012]
Q.22 Which one of the following options Q.25 What is the logical translation of the
is CORRECT given below three following statements?
positive integers x, y and z, and a “None of my friends are perfect”.
predicate
a) x  F(x)  P(x) 
P  X     X  1 
b) x  F(x)  P(x) 
y  z  x  y  z    y  x    y  1 
c) x  F(x)  P(x) 
a) P(x) being true means that x is a
prime number d) x  F(x)  P(x) 
b) P(x) being true means that x is a [GATE-2013]
number other than 1
c) P(x) is always true irrespective of Q.26 Which one of the following is NOT
the value of x logically equivalent to
d) P(x) being true means that x has x  y()  z()  .
exactly two factors other than a) x  z    y    
1& x
[GATE-2011] b) x  z   y    

Q.23 Consider the following logical c) x  y     z    


interferences. d) x  y     z    
I1 : If it rains then the cricket match
[GATE-2013]
will not be played.
Interference: There was no rain. Q.27 Consider the statement
I2 : If it rains then the cricket match “Not all that glitters is gold”
will not be played. Predicate glitter(x) is true if x
It did not rain. glitters and predicate gold(x) is true
Interference: The cricket match was if x is gold.
played. Which one of the following logical
Which of the following is TRUE? formulae represents the above
a) Both I1 and I2 are correct statement?
interferences a) x : glitters(x)  gold(x)
b) I1 is correct but I2 is not a correct b) x : gold(x)  glitters(x)
interference c) x : gold(x)  glitters(x)
c) I1 is not correct but I2 is a correct
d) x : glitters(x)  gold(x)
interference
d) Both I1 and I2 are not correct [GATE-2014]
interferences Q.28 Which one of the following
[GATE-2012] propositional logic formulas is TRUE
Q.24 What is the correct translation of when exactly two of p, q and r are
the following statements into TRUE?
mathematical logic? a)   p  q   r    p  q ~ r 

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
b)  ~  p  q   r    p  q ~ r  p q p≠ q
0 0 0
c)   p  q   r    p  q ~ r  0 1 1
d)  ~  p  q   r    p  q ~ r 
1 0 1
1 1 0
[GATE-2014] Which one of the following is true
about the binary operator ≠?
Q.29 Which one of the following Boolean
a) Both commutative and associative
expressions is NOT a tautology?
b) Commutative but not associative
a)   a  b    b  c     a  c  c) Not commutative but associative
b)  a  c    ~ b   a  c   d)Neither commutative nor
associative
c)  a  b  c    c  a  [GATE-2015 (1)]
d) a   b  a 
[GATE-2014] Q.34 Consider the following two
statements.
Q.30 Consider the following statements: S1: If candidate is known to be
P : Good mobile phones are not corrupt, then he will not be elected.
cheap S2: If a candidate is kind, he will be
Q:Cheap mobile phones are not good elected.
L : P implies Q Which one of the following
M : Q implies P statements follows from S1 and S2
N : P is equivalent to Q as per sound inference rules of
Which one of the following about. L, logic?
M, and N is correct? a) If a person is known to be
a) Only L is TRUE. corrupt, he is kind
b) Only M is TRUE. b) If a person is not known to be
c) Only N is TRUE. corrupt, he is not kind
d) L, M and N are TRUE. c) If a person is kind, he is not
[GATE-2014] known to be corrupt
Q.31 The CORRECT formula for the d) If a person is not kind, he is not
sentence, “not all rainy days are known to be corrupt
cold” is [GATE-2015 (2)]
a) d(Rainy(d)  Cold(d))
Q.35 Which one of the following well
b) d(Rainy(d)  Cold(d))
formed formulae is a tautology?
c) d( Rainy(d)  Cold(d)) a) x y R(x, y)y x R(x, y)
d) d(Rainy(d)  Cold(d)) b) (x[y R(x, y) S(x, y)]) x y S(x, y)
[GATE-2014] [x y (P(x, y) R(x, y))]
c)
Q. 32 Which one of the following is nor [x y (P(x, y)R(x, y))]
equivalent to p ↔ q ? d) x y(x, y) x yP(y, x)
a) (p  q)  (p  q) [GATE-2015 (2)]
b) (p  q)  (p  q)
Q.36 In a room there are only two types
c) (p  q)  (p  q)
of people, namely Type 1 and Type
d) (p  q)  (p  q) 2. Type 1 people always tell the
[GATE-2014] truth and Type 2 people always lie.
Q.33 The binary operator ≠ is defined by You give a fair coin to a person in
the following truth table. that room, without knowing which

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
type he is from and tell him o toss it pleasant”, and it is pleasant, and it is
and hide the result from you ask for not pleasant only if it
it. Upon asking, the person replies is cold” is represented by
the following a)  p  r    r   p  q  
“The result of the toss is head if an
only if I am telling the truth.” b)  p  r     p  q   r 
Which of the following options is c)  p  r     p  q   r 
correct?
a) The result is head d)  p  r    r   p  q  
b) The result is tail [GATE-2017]
c) If the person is of Type 2, then
the result is tail Q.41 Consider the first-order logic
d) If the person is of Type 1 then sentence F : x  yR  x, y   .
the result is tail Assuming non-empty logical domains,
[GATE-2015] which of the sentences below are
implied by F?
I. y  xR  x, y  
Q.37 Let p,q,r,s represent the following
proposition
P:x {8,9,10,11,12} II. y  xR  x, y  
q:x is a composite number III. y  xR  x, y  
r:x is perfect square
s: x is a prime number IV. x  yR  x, y  
The integer x 2 which satisfies a) IV only b) I and IV only
(p q)(r s)) is ___. c) II only d) II and III only
[GATE-2016] [GATE-2017]

Q.38 Consider the following expressions: Q.42 The statement  p    q  is


(i) false (ii) Q
logically equivalent to which of the
(iii) true (iv) P Q
statements below?
(v) –Q P
I. p  q
The number of expressions given
above that are logically implied by P II. q  p
(P Q) is ______. III.  q  v p
[GATE-2016]
IV.  p  v q
Q.39 Which one of the following well – a) I only b) I and IV only
formed formulae in predicate c) II only d) II and III only
calculus is NOT valid? [GATE-2017]
a) (xp(x)xq(x))(xp(x)xq(x)) Q.43 Let p, q and r be propositions and
b) (xp(x)xq(x))x(p(x)q(x)) the expression  p  q   r be a
c) x(p(x)q(x))(xp(x)xq(x))
contradiction. Then, the expression
d) x(p(x)q(x))(xp(x)xq(xx))
 r  p   q is
[GATE-2016]
a) a tautology
Q.40 Let p, q, r denote the statements “It b) a contradiction
is raining”, “It is cold” , and “It is c) always TRUE when p is FALSE
pleasant”, respectively. Then the d) always TRUE when q is TRUE
statement “It is not raining and it is [GATE-2017]

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
ANSWER KEY:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
(a) (a) (a) (d) (d) (b) (d) (a) (b) (b) (d) (d) (d) (d)
15 16 17 18 19 20 21 22 23 24 25 26 27 28
(d) (a) (b) (d) (b) (b) (b) (a) (b) (c) (d) (a,d) (d) (b)
29 30 31 32 33 34 35 36 37 38 39 40 41 42
(b) (d) (d) (c ) (a) (c ) (c ) (a) 11 4 (d) (a) (b) (d)
43
(d)

EXPLANATIONS
Q.1 (a) a valid first order formula.
Let p : I say
q : you go Q.5 (d)
I stay only if you go Q yy  “y divides y” is always true
pq
 Qxx  Qyy is same as Qxx 
Converse of p  q is q  p
False Now α becomes
i.e., I stay if you go
 x  P  x    y   Qxy  false   x 
Q.2 (a)  ¬ P  x  
F1 : P ~ P
Now consider I1 : P(x) = “x is a prime
~ P ~ P number”.
~ P α becomes (∀ x x is a prime number
So, F1 is contingency. Hence, F1 is if and only if ∀ y (y does not divide x))
satisfiable but not valid.  ∀ x (x is not prime) Since, ∀ y
F2 :  P ~ P  ~ P  P  (y does not divide x) is always false
 ~ P ~ P    ~ (P)  P  (since x divides x always). α now
becomes
 ~ P   P  P ∀ x (x is a prime number  false)
~ PP  ∀ x (x is not a prime).
T Which is true.
So, F2 is tautology and therefore Now consider I2:P(x)= “x is a
valid. composite number”.
Now α becomes
Q.3 (a) (∀ x x is a composite number if and
If X then Y unless Z is represented only if ∀ y (y does not divide x)) 
by  X  Z  Y ∀ x (x is not a composite number)
By same reasoning used above, 
Q.4 (d) now becomes
(∀ x x is a composite number 
 x      x      x   false)  ∀ x (x is not composite) is
is a logical equivalence & therefore, also true.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Since if no number divides x, x =  P ' Q' + R    P ' + Q' + R 
cannot be a composite number, is
=  P'Q' + R  +P' + Q' +R
'
true.
 Both I1 & I2 satisfy α.
=  P'Q'  .R ' + P' + Q' + R
'

Q.6 (b)
  P + Q  .R ' + P' + Q' + R
Derive clause P  Q from clauses
P  R , Q  R means that =PR ' + QR ' + P' + Q' + R
=  PR ' + R  +  QR ' + Q'  + P'
 P  R    Q  R 
 PQ =  P + R  (R ' + R) +  Q' + Q  ×  R ' + Q'  + P'
 (a) is true.
=  P+R  +  R ' +Q'  +P'
Since, x  y does not imply that
yx = P + P ' + R + R ' + Q'
 P  Q   P  R    Q  ¬R  =1+1+ Q'
 may or may not be true. Hence (b) 1
is not true. X  Y is a tautology.

Q.7 (d) Q.10 (b)


The statement is “some boys in the “Every teacher is liked by some
class are taller than all the girls”. student : then the logical expression
So the notation for the given statements is
is (X)[teacher(x)  (y)[student(y)  likes(y,x]]

 x  boy  x    y   girl  y   taller  x,y    Where likes (y, x) means y likes x,
such that y represent the student
Q.8 (a) and x represents the teacher.
 P   Q  R    P  Q  R  Q.11 (d)
The given statement should be read
=  P  Q+R    PQ  R  as “If an animal is a tiger or a lion,
= P' +Q + R    PQ'  +R  then (if the animal is hungry or
threatened, then it will attack).
= P' +Q+R   P' +Q' +R  Therefore the correct translation is
=  P' + Q +R  +P' + Q' +R
'
 tiger  x   lion  x    
x  
= P Q'R ' +P' + Q' +R {hungry  x   threatened  x   attacks  x  }
= Q' + Q'PR ' +P' +R Which is choice (d).
= Q' + P' + R (by absorption law)
Q.12 (d)
P1:  A  B  C  =   A  C    B  C  
Which is a contingency

Q.9 (b) LHS:


X: P  Q   R  A  B  C
Y: P  R    Q  R   AB  C
=  AB + C
'
X : P + Q  R=  P + Q  +R = P'Q' +R
'

=A' + B' + C
Y: P' +R  +  Q' +R  = P' + Q' + R
RHS:
Clearly X  Y  A  B   B  C 
Consider X  Y

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
=  A' + C  B' + c  some graph which is not connected”
which is same as
=A'B' + C x{graph(x)  connected(x)}
= A' + B' + C Which is choice (b).
Clearly, LHS ≠ RHS Alternate solution
P1 is not a tautology We can translate the given
P2 :  A  B  C)  =   A  C    B  C   statement “NOT (every graph is
LHS   A+B  C  connected)” as
as (x graph (x) → connected (x))
=  A+B +C
'

=A'B' + C  x  graph(x)  connected(x) 


RHS =  A  C   B  C 
 x  graph(x)  connected(x) 
  A + C +  B + C
' '
 x  graph(x)  connected(x) 
' '
=A + B + C  x  graph(x)  connected(x) 
Clearly, LHS  RHS  P2 is also not
From the above option (a) = (b) =
a tautology
(c) (d) is
Therefore, both P1 and P2 are not
tautologies. Correct choice is (d).
x  graph(x)  connected(x) 
Q.13 (d) Which means all graphs are not
By using min terms we can define connected.
A⨀B = AB + AB’ + A’B’
= A + A’B’ Q.15 (d)
= (A + A’) . (A + B’) In conjunction normal form, for any
= A + B’ particular assignment of truth
a) ~ A ⊙ B = A’⊙ B = A’ + B’ values, all expect one clause, will
always evaluate to true. so (d) is
b) ~ (A⊙~B) = (A⊙B’)’ = (A + correct answer.
(B’)’)’ = (A + B)’ = A’B’
Q.16 (a)
c) ~ (~A⊙~B) = (A’⊙B’)’ = (A’ + “for x which is an fsa, there exists a
(B’)’)’ = (A’ + B)’ = A’B’ y which is a pda and which is
equivalent to x”.
d) ~ (A⊙~B) = (A⊙B’)’ = (A + xfsa  x    ypda  y  
(B’)’)’ = (A + B)’ = A’B’ equivalent (x,y)) is the logical
representation.
e) ~ (~A⊙B) = (A’⊙B)’ = (A’ + B’)’ =
A.B= A  B Q.17 (b)
 only, choice (d) = A  B
P~ Q = p + q'
Note: This problem can also be done
~  ~P  Q  =  p'q  = p + q '
'
by constructing truth table for each
i)
Choice and comparing with truth
table A  B. ii)
 P  Q   P~ Q   ~P~ Q
 pq  pq'  p'q'
 p  q  q '   p'q '
Q.14 (d)
The statement “Not every graph is
connected” is same as “There exists  p  p'q '

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
  p  p'   p  q   Q' P '  P  Q  Q ' 
 p  q'  Q' P '  P

iii)  P  Q    P ~ Q    ~ P  Q    Q'  P  .  P '  P 


 pq  pq '  p'q = Q' + P
 p  q  q '   p'q Choice (b) P  Q  P  Q'
 PQ'  P  Q'   P'  Q' 
' '
 p  p'q
  p  p'   p  q   PQ'  PQ  P'Q
 pq  P  Q'  Q   P ' Q
Clearly (i), (ii) and (iii) are
 P  P'Q
equivalent.
Correct choice is (b).   P  P'  .  P  Q 
 PQ
Q.18 (d) Choice (c) P  Q  P'  Q
The correct translation of “Gold and
 P ' Q  P ' Q'   P '  Q'
'
silver ornaments are previous” is
choice (d)  P'Q  P'Q'  PQ'

x  G  x   S  x    P  x    P'  Q  Q'   PQ'
Which is read as “if an ornaments is  P'  PQ'
  P '  P  .  P '  Q'   P '  Q'
gold or silver, then it is previous”.
Now since a given ornament cannot
be both gold and silver at the same Choice (d)
time. P  Q  P'  Q'
 P'Q'  P'  Q'    P'   Q' 
Choice(b) ' ' '


x  G  x   S  x    P  x  is   P'Q'  P'Q  PQ
incorrect.  P'  PQ

Q.19 (b)   P'  P  P'  Q 


The given table can be converted  P'  Q
into boolean function by adding As we can clearly see only choice (b)
minterms corresponding to true P  Q is equivalent to P + Q.
rows. Note: This problem can also be
P Q PQ solved by constructing the truth
T T T tables for each Choice & checking
T F T which one matches the truth table of
F T F P + Q.
F F T
 Translate P  Q  PQ  PQ'  P'Q' Q.20 (b)
using this we can check the choices I xP(x)  xP(x)
one by one to see which is And IV xP(x)
equivalent to P + Q. Clearly, choices I and IV are
Choice (a) Q  P  Q'  P' equivalent.
 Q' P'  Q'  P'    Q'  P'  II xP(x)  xP(x)
'

and
 Q' P'  Q' P  QP
III x P(x)  xP(x)

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Clearly II & III are not equivalent to Q.24 (c)
each other or to I& IV. Some real no’s are rational
 x  real(x)  rational(x)
Q.21 (b)
xytF  x, y, t  Q.25 (d)
None of my friends are perfect.
 xytF  x, y, t 
i.e. All of my friends are not perfect.
= it is not true that (someone can
fool all people at all time)

x  F  x   P  x   
= no one can fool everyone all the x  F  x   P  x  
time x  F  x   P  x  
Q.22 (a) Alternatively
If P(x) is true, then x  F  x   P  x   gives there exist
X ≠ 1 and also some of my friends who are perfect.
x is broken into two factors, only if, x  F  x   P  x  
one of the factors is x itself and the
There does not exists any friend
other
who is perfect
factor is 1, which is exactly the
i.e. none of my friends are perfect.
definition of a prime number.
So (d) is correct option.
So P(x) is true means x is a prime
number.
Q.26 (a, d)
Q.23 (b) Let y()  P, y()  Q
Let p : It rains Then y     P
q : cricket match will not be played.
and y     Q
I1 : p  q
~q Given x  y()  y() 

~p  x  P  Q 
Clearly I1 is correct since it is in the  x  PvQ 
form of Modus Tollens (rule of  x  P  Q 
contra positive)
a)
I2 : p  q
~p x  z    y      x  Q  P 
 b)
~q
x  z   y      x  Q  P 
Which corresponds
 x(P  Q)
 p  q ~ q ~ q c)
  p  q  p   q
' ' '
x  y     z      x  P  Q 
  p'  qp'   q' d)
x  y     z     x  P  Q 
 p'  q '
 (a) and (d) are not logically
  p'   q '
'

equivalent to x  P  Q 
 pq '

Which is not a tautology. Q.27 (d)


So I2 is incorrect interference. x glitters(x)   gold(x)
All glitters are not gold.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
a) x gold(x)  glitters(x)  (d(Rainy(d)  Cold(d)))
All golds are glitters  (d( Rainy(d)  Cold(d)))
b) x gold(x)  glitters(x)  d(Rainy(d)  Cold(d))
Not all that golds are glitters i.e., Alternative Method
there exist gold which is not glitter Not all rainy days are cold is same as
c) x glitters(x)  gold(x) some rainy days are not cold which
Not all that glitters is gold i.e., there is same as
exist glitter which is not gold. d(Rainy(d)  Cold(d))

Q.28 (b) Q.32 (c)


 ~  p  q   r    p  q ~ r  Here option (a) and (b) can be
reduced to (p →q) ∧ (q→ p) and
   
 ~  ~ p  q    pv ~ q   r   p  q ~ r 
hence ≡ p ↔ q
 Option (d) is p’ q’+ pq ≡ p ↔ q
   p ~ q    ~ p  q   r    p  q  ~ r   Option (c ) is p’ q+ pq’= p ⊕ q which
is not equivalent to p ↔ q.

 p ~ q  r    ~ p  q  r    p  q  ~ r  Q.33 (a)
If exactly two of p, q and r are true. The given truth table corresponds to
p’q’+ pq’ = p ⊕ q
 p ~ q  r    ~ p  q  r    p  q ~ r   TRUE ⊕ is known to be both commutative
and associative.
  
Q.34 (c )
If p = r = TIf q = r = T If p = q = T
C: person is corrupt
K: Person is kind
Q.29 (b)
E: Person is elected
 a  b   ~ b  a  c
S1 : C  E
  a  c c  a    b  ac  S2 : K  E
 ac  ca  b  ac S2  E  K
 a  ca  b So from S1 and S2 :
 a cb
 a  c  b is not a tautology (C  E)  (E  K)  (C  K)
We can conclude C  K which is
same as K  C , which is same as
Q.30 (d) option (c).
g : mobile is good
c : mobile is cheap Q.35 (c )
P : Good mobile phones are not Since P  R  P  R , and the
cheap g  c   gvc  quantifiers on both the sides are
Q : Cheap mobile phones are not same (xy) .
good Option ( c ) is clearly a tautology.
c  g   cvg 
 Both P and Q are equivalent. Q.36 (a)
Type 1 always tells truth
Q.31 (d) Type 2 always tells lies.
Not (all rainy days are cold):

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
The statement is “toss is head if and Now the only value of x which
only if I am telling the truth”. satisfies this is x=11. So correct
Case- 1: let the person be type 1. answer is x=11.
Case- 2: Let he person be type 2.
In each case we shall prove that Q.38
result is head. p  (p  q)p(p' q)  pq
Case-1: Let the person be type. 1 Take (i) false
Type 1 always tells truth. pq  false  pq  0
So the statement “toss is head if and  (pq) ' 0
only if I am telling the truth “is true.
 p' q ' 0
So toss head ⇔ telling truth . Since
type 1 is telling truth so toss head is  not valid
also true. So in case 1 result is that Take (ii)
toss is head. pq  q  (pq)' q
Case-2: Let the person be type 2.  (pq) ' q
Type 2 always tells lies. So the  p' 1  1  valid
statement “ toss is head if and only Take (iii)
if I am telling the truth “ is false. pq  true  pq  1
So toss head ⇔ telling truth is false.  (pq)' 1  1  valid
So toss head ⊕telling truth. So toss
Take (iv)
head and telling truth have opposite pq  p  q  (pq)' p  q
truth values Now, since type 2
telling truth is false, so toss head has  p' q ' p  q
to have opposite truth value which  1  1  1  valid
is true. So toss head is true. So in Take (v)
case 2 also, result is head. pq  q ' p  (pq)  q ' p
So in both cases we have proved  p' q ' q ' p
that the result is head.  1  valid
So option (a)is correct. So the number of expressions that
are logically implies by p  (p  q)
Q.37 is 4.
We wish to make
(p  q)  (r  s))  1 Q.39 (d)
 (p  q)  (r  s)  0 ∀x is only one way distribution over
 (p  q)  0 ….(1) “∨” so let us check (d)
Or r  s  0 …(2) x(p(x)  q(x))  (x(p(x)  x(q(x))
Now (1) is satisfies only when P = 1
and q = 0 Equation (2) r  s  0 Let LHS be true, so we have
,iff r  s  1 p1  q1 (true)
i.e. r =1 and s = 1 p2  q 2 (true)
i.e. x is perfect square and x is a
p3  q3 (true)
prime number. Which is not
possible so condition (2) cannot be ⋮
satisfied by any x. Now take p1 is true, q1 is false and
So condition (1) must be satisfies p 2 is false q 2 is true
which is p = 1 and q = 0 i.e. x Now LHS is true, but RHS, xp(x) is
ϵ{8,9,10,11,12} and x is not a
false (since is false) and xq(x) is
composite.
also false (since is false)

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
So LHS ⇏RHS
Q.43 (d)
Q.40 (a)
p: “It is raining” p  q  r  0
q : “It is cold” , and i.e.  p '  q  '  r  0
r : “It is pleasant”, i.e., pq ' r  0
so the correct representation of “ It
This is possible only if pq’=0 and r=0
is not raining and it is pleasant, and
Now, pq’ = 0 iff p = 0 or q’ = 0
it is not pleasant only if it is raining
So, final solution is r = 0
and it is cold” is
p  r  r only if p  q = and  p  0 or q '  0 

 p  r    r   p  q  Now let us see


 r  p  q
Q.41 (b)   r ' p  ' q
I. xyR  x, y   y  x R  x, y    rp ' q
is true, since y  x R  x, y   but we have previously shown that
r=0
 x  y R  x, y   So, rp '  0
II. xy R  x, y   y  x R  x, y   So  r  p   q  rp' q  0  q  q So,
is false truth value of  r  p   q is same
Since y when it is outside is
as that of q.
stronger then when it is inside.
So, it is true whenever q is true.
III. xy R  x, y   yx R  x, y  is So option (d) is correct.
False Note: Since we have shown that
IV.  p  0  or  q '  0 is true,
xy R  x, y     xyR  x, y   Option (c) is false because when p is
is true false i.e. when p = 0, q is free to be 0
Since or 1
  xyR  x, y    xy R  x, y 
So, IV will reduce to
xy R  x, y   xy R  x, y  which
is trivially true.
So correct answer is I and IV only
which is option (b).

Q.42 (d)
Statement p'  q '  p  q '
I. p  q  p' q
II. q  p  q ' p
III.  q  p  =q'+ p
IV.  p  q   p ' q
So, clearly the given statement is
same as II and III only.
So option (d) is correct.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
2 SET THEORY, RELATIONS & FUNCTIONS

2.1 SET THEORY Set is described by a characteristics


property p(x) of its elements & the set is
2.1.1 DEFINITION: described by {x/p(x) holds}

A well-defined collection of objects is called Example


as a set. The set of all even natural numbers = {x/x
Exp. Collection of vowels in English  N and x = 2n, n  N}
alphabets is a set.
Exp. Collection of all states in the Indian Example
union is a set. The set of all real number greater than -1
Exp. Collection of good cricket players of and less than 1 is
India is not a set. = {x/x  R and -1 < x < 1}

2.1.2 SOME WELL-KNOWN SETS- 2.1.5TYPES OF SETS

1. N  {1, 2, 3…} 1. Empty set: - If a set has no element


then it is called as empty or null or void
2. W  {0, 1, 2…}
set and denoted by  .
3. I or Z  {0,  1,  2,  3…}
4. I+ or z+  {1, 2, 3 …}
5. Q  Set of Rational numbers 2. Singleton set: - A set containing a
6. R  Set of Real numbers single element is called as singleton set.
7. C  Set of Complex numbers
3. Finite set: - If the elements of a set can
2.1.3 ELEMENT be counted by natural numbers 1, 2, 3…
and this counting process end at a
Objects in the set are called as elements of certain natural number i.e. the set
the set. If a is any element of a set A then a contains finite number of elements.
 A. If a is not the element of A then a  A.
4. Infinite set: - The set contains Infinite
elements.
2.1.4 CONSTRUCTION OF SET
5. Equivalent sets: - Two finite sets A & B
(a) Roaster Method:- set is described or
are said to be equivalent, if number of
constructed by listing elements separated
elements are same in both sets. i.e. n(A)
by commas, within braces { }.
= n (B)
Where n (A) represent cardinality of A
Example
i.e. number of elements in A.
The set of vowels of English alphabets = {a,
6. Equal sets: - Two sets A and B are
e, i, o, u}
equal sets if every element of A is in B
and every element of B is in A
Example

Set of even natural numbers = {2, 4, 6, 8, Example


…..} A = {1, 2, 3, 4, 5}
Set Builder Form B = {2, 4}

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
C = {3, 4, 5} 12. Power set: - If S is any set, then the set
D = {2, 4} of all subsets of s is called power set of
E = {a, b} S. It is denoted by P(S).
Then A  B, A  C, A  D
But B = D Example
Let S = {1, 2, 3} then
Example P(S) = {  , {1}, {2}, {3}, {1, 2}, {1, 3} {2, 3}{1,
A = {1, 2, 3} and B = {a, b, c}
A & B are equivalent sets but are not equal 2, 3}}
sets. If a finite set has ‘n’ element then its power
set has 2n elements.
Example
If A = {x/x is a letter in “LOYAL”} 13.Universal set: - A non empty set of
B= {x/x is a letter in “ALLOY”}, then A = B which, all sets under consideration are
subsets, is called the universal set. It is
7. Subset: - If A and B are two sets and denoted by  .
every element of A is in B then A is said
to be subset of B and it is denoted by A Example
 B. So if A  B then a  A  a  B All people in the world constitute the
universal set in any study of human
If A is not a subset of B then A  B
population.
If B  A  B is a superset of A.
Example
8. Proper subset: - Let A and B are two In plane geometry, the universal set
sets such that A is a subset of B and A  consists of all the points in the plane:
B then A is said to be proper subset of A
(A  B) Example
If A = {1, 2, 3},
9. Improper subset: - The empty set and B= {2, 4, 5, 6} and C = {1, 3, 5, 7}
the set itself are called improper Then  = {1, 2, 3, 4, 5, 6, 7} can be taken as
subsets of any set. universal set.
Some Results
1. Every set is a subset of itself. Venn- Euler Diagram: -this diagram gives
2. Empty set is a subset of every set. picture representation of sets and their
3. If a finite set of cardinality ‘n’ then operations. These consists of circle and
its total number of subsets are 2m. rectangular.
4. A = B  A  B and B   A. The universal set U is represented by a
5. If A  B, B  C then A  C large rectangle and its subsets are
6. A set has ‘n’ elements yields 2n- represented by circles drawn in the
1proper subsets rectangular area.

10. Disjoint sets: -Two sets are said to be 2.2 OPERATIONS ON SETS
disjoint if they have no common
element (or mutually exclusive). a) Union: - Let A and B are two sets then,
the union of A and B contain all those
11. Class of sets: - If the elements of a set elements that are in A or B both A & B.
are sets then such a set is said to be a It is denoted by  . i.e.
“class of sets” or “family of sets” and are A  B = {x/x  A or x  B}
denoted by script letters etc.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Similarly B – A is the set of all
Example elements which are in B but not in A
If A={1, 2, 3} and B = {1, 3, 5, 7} i.e.B – A = {x/x  B and x  A}
Then A  B= {1, 2, 3, 5, 7}
If A1, A2, ………An is a finite family of sets, d) Symmetric Difference: - The
then their union is denoted by A1  A2 symmetric Difference of two sets A and
n B is (A- B)  (B-A) or (A  B) – (A 
 …..  An or  Ai B) and is denoted by A  B. i.e.
i 1
A  B = (A-B)  (B-A)
b) Intersection: - Let A and B be two set,
the intersection of A and B is the set of
all those elements which are common in
A and B. It is denoted by  i.e.
A  B={x/x  A and x  B}
So if x  A  B  x  A and x  B.
n
 = A1  A2  ……An
i 1
e) Complement of a set: - The
complement of a set A with respect to
the universal set  is the difference U-
A. It is denoted by A or Ac.i.e.
AC =  -A = {x/x   and x  A}
( A) = A
 = 
Example
 = 
Let A = {a, b, c, d} and B = {f, b, d, g}
So A  B = {b, d} If A  B =  then it is
Example
clear that the sets A and B are disjoint
Let N = {1, 2, 3, 4 …} be the universal set
sets.
and Let A = {1, 3, 5, 7 …} then
A’ = {2, 4, 6, 8…}
c) Difference of Two sets: - Let A and B
are two sets, the difference of A and B,
Laws of Algebra of Sets
A-B or A~B is the set of elements which
are in A but not in B. i.e.
1. A  A = A, A  A = A (Idempotent law)
A-B = {x/x  A and x  B}
2. AB = BA Commutative Law
3. A  B = B  A Commutative Law
4. A  (B  C) = (A  B)  C Associative
Law
5. A  (B  C) = (A  B)  C Associative
Law
6. A  (B  C) = (A  B)  (A  C)
Distributive Law

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
A  (B  C) = (A  B)  (A  C) 7. No. of elements inexactly one of the sets
Distributive Law A, B, C are
7. (A  B )  = A  B  Demorgan Law = n(A) + n(B) + n (c) – 2n(A  B) – 2n(B
(A  B )  = A  B  Demorgan Law  C) – 2n(C  A) +3n(A  B  C)
8. n(A’  B’) = n[(A  B)’] = n[  ] – n(A 
Example B)
Two finite sets have ‘m’ and ‘n’ elements. 9. n(A’  B’) = n[(A  B)’] = n(  ) – n(A 
The total number of subsets of the first set B)
is 56 more than the total number of subsets
of the second so find m and n. Example
Solutoion If A and be two sets containing 3&6
2n(2m-n-1) = 23(23 – 1)  n = 3, m = 6 elements respectively. What can be the
minimum & maximum no. of element in A
Example  B.
Suppose A1, A2, …A30 are 30 sets each with Sol.
five elements and B1, B2, ….. Bn are n sets  n(A  B) = n(A) + n(B) – n(A  B)
30 n Case I n(A  B) is min
each with three elements. Let  Ai =  Bj=  n(A  B) = 0, Possible when A  B = 
i 1 j 1

S. Assume that each element of S belongs to So n(A  B) = n(A) + n(B) = 3 + 6 = 9


exactly 10 of Ai’s and 9 of Bj’s. Find n So max. n(A  B) = 9
Solution Case II When n(A  B) is max.
Since each Ai has 5 element and each  n(A  B) = 3
element of S belongs to exactly 10 of Ai’s. So n (A  B) = 3 + 6 – 3 = 6
 min n(A  B) = 3
30 1 30 150
 S    n( s)   n( Ai )   15
i 1 10 i 1 10 Example
 each of Bj has 3 elements and each A market research group conducts-a survey
element of S belongs to exactly 9 of Bj’s of 2000 consumer and reported that 1720
n 1 n 1 liked product P1 and 1450 liked P2. What is
S   B j  n(s)   n(B j )  15   3n n
i 1 9 j1 9 the least number that must have liked both
 n = 45 products?
Sol.
2.3 SOME IMPORTANT RESULTS Let  be the set of all consumers
So n(  ) = 2000, Let A be the set of all
If A, B and C are finite sets and  be the consumers who liked P1 and B be the set
finite universal set then. for P2.
1. n(A  B) = n(A) + n(B) – n(A  B) So n(A) = 1720, n(B) = 1450.
2. n(A  B) = n(A) + n(B)  n(A  B) = n(A) + n (B) – n(A  B)
If A and B are disjoint nonvoid sets. = 1720 + 1450 – n(A  B)
3. n (A-B) = n(A) – n(A  B)  n(A  B) = 3170 – n(A  B)
4. n (A  B) = n(A) + n(B) – 2 n(A  B) A  B  
5. n(A  B  C) = n(A) + n(B) + n(C) – n(A  n(A  B)  n(  )
 B) – n (B  C) – n (C  A) + n(A  B  3170 – n(A  B)  n(  ) = 2000
 C)  n(A  B)  1170
6. No. of elements in exactly two of the So the least value is 1170
sets A, B, C are-
= n(A  B) + n(B  C) + n(C  A) – 3n(A Example
 B  C) In a survey of 25 students, it was found that
15 had taken maths, 12-physics, & 11 – chy

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
. 5 – maths + chy, 9 – Maths + Phsy., 4 – Phy coordinate and b is second coordinate of
+ chy and 3 – all. Find no. of students that the ordered pair (a, b).
had – If (a, b) & (c, d) are two ordered pairs,
i) Only chy then (a, b) =(c, d) f a = c & b = d.
ii) only Maths
iii) only Physics 2.4.2 CARTESIAN PRODUCT OF TWO
iv) phy & chy but not maths SETS
v) Maths & Phy but not chy.
vi) Only one of the subjects Let A and B are two sets (non empty) the
vii) atleast one of the subjects set of all distinct ordered pairs (a, b) such
viii) none of the subj. that a  A and b  B is called the Cartesian
Solution product of A and B (in that order) and is
denoted by A  B. i.e.
A  B = {(a, b)] / a  A, b  B}
Also B  A = {(x, y)/x  B, y  A}
Generally A  B  B  A

Example
Let A = {a, b} and B = {1, 2, 3}
Then A  B = {(a, 1), (a, 2), (a, 3), (b, 1), (b,
n(P) = a + b + d + e = 12
2), (b, 3)}
n (C) = b + c + e + f = 11
B  A = {(1, a), (1, b), (2, a), (2, b), (3, a), (3, b)}
n (M) = d + e + f + g = 15
A  A = {(a, a), (a, b), (b, a), (b, b)}
n (M  C) = c + f = 15
B  B = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2,
n (M  P) = d + e = 9
3), (3, 1), (3, 2), (3, 3)}
n (P  C  M) = e = 3
Obviously A  B  B  A
so b = 1, d = 6, f = 2, a = 2, c = 5, g = 4
2.4.3 RESULTS
2.4 PARTITION
1. If set A has m and B has n elements then
A set P = {A1, A2 … An} of nonvoid subsets of
the product set A  B has m n elements
a set A is called the partition of the set A if
n
2. If either A or B void set then A  B =  .
i)  Ai = A1  A2  ……..  An = A, & 3. If either A or B infinite and the other is
i 1
nonvoid, then A  B is infinite.
ii) Ai  Aj =  ; i  j; i = 1,2, …n, ; j =1, 2, .. n
2.5 RELATIONS
Example
Let us consider the sets Let A and B two non void sets, then a
A1 = {3, 6, 9, 12 …24}, A2 = {1, 4, 7, 10, ….. relation R from A to B is a subset of A × B
20}, A3 = {2, 5, 8, 11,…….23} i.e. R  A  B. If (x, y) is a member of R then
And A = {1, 2, 3, …..25}
it is denoted by xRy. Thus (x, y)  R  xRy.
Then  A1  A2 = A3 = A
And A1  A2 = A2  A3=A1  A3 = 
Example
So P = {A1, A2, A3} is a partition of A.
If A = {1, 2, 3,} and B = {a, b, c} then R = {(1,
b), (2, c), (1, a), (3, a)} is a subset of A  B
2.4.1 ORDERED PAIR:-
and a relation from A to B. As (1, b)  R 
1Rb but (2, a) is not these, so 2 R a
Let A and B two sets and a  A, b  B. then
(a, b) denotes ordered pair. ‘a’ is called first
Example

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
If A = {2, 3, 5, 6} and R means “divide” then. Example.
2 R 2, 2R6, 3R3, 3R6, 5R5, 6R6 exists so The relation R1 ={1, 1), (2, 2), (3, 3)} is
R = {(2, 2), (2, 6), (3, 3), (3, 6), (5, 5), (6, 6)} an identity relation on A = {1, 2, 3} But
R = {(1, 1), (2, 2), (3, 3), (1, 3)} is not an
2.5.1 Domain and Range identity relation on A

Let R is relation from A to B. Then the set of 4. Reflexive Relation: A relation R one
all first co-ordinates of the ordered pairs in set A is said to be reflexive if every
the relation R is the domain of R. i.e. element of A is related to itself. Thus R
Domain (R) = {x/ (x, y)  R} is reflexive  (a, a)  R.
And the set of all second co-ordinates of the A relation R on A is not reflexive if these
ordered pairs in ‘R’ is called Range exists and a  A such that (a, a)  R
Range (R) = {y /(x, y)  R}
Example
Example Let A = {1, 2, 3} then
It A = {1, 2, 3, 4}, B = {3, 4, 5} and a relation R1={(1,1),(2,2),(3,3),(1,2),(2,3)}is
R is defined from A to B as x R y  x < y reflexive
then R2={(1,1), (2, 2), (1, 2), (1, 3), (2, 3)} is
R = {(1, 3), (1, 4), (1, 5), (2, 3), (2, 4), (2, 5), not reflexive
(3, 4), (3, 5), (4, 5)} 5. Symmetric Relation: A relation R on a
Domain (R) = {1, 2, 3, 4} set A is symmetric iff
Range (R) = {3, 4, 5} (a, b)  R  (b, a)  Rfor a, b  A
a R b = b R a for a, b  A
2.5.2 INVERSE RELATION
Example
Let A and B are two sets and R is a relation Let A be a set of all lines in a plane and
from A to B, then the inverse of R, R-1 is a R is the relation defined on A as (x, y) 
relation from B to A and is defines
R  x  y. Then R is symmetric.
R-1 = = {(y, x) / (x, y)  R }
Also Dom (R-1) = Range (R) 6. Transitive: Let A be any set, R is a
& Range (R-1) = Dom (R) relation on A, be transitive if
(a, b)  R, (b, c)  R  a R c
2.6 TYPES OF RELATIONS for a, b, c  A.
1. Void Relation: -Let R be a relation from
Example
A to B then if R =  , is known as void
On the set of natural number the
relation. relation R, defined by x R y  x < y is
transitive.
2. Universal Relation: -Let A is a non
void set and R is a relation from A × A to Example
A then it is called Universal Relation Let L is a set of lines in a plane then the
relation R, define by x R y  x || y is
3. Identity Relation: Let A be a non void transitive
set, then the relation
R = IA = {(a, a) / a  A} is called an 7. Anti symmetric: R on A, is a anti
Identity relation on A. symmetric if
i.e. A relation IAon A is called identity (a, b)  R, and (b, a)  R
relation if every element of A is related a = b V a, b  A.
to itself only

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
i.e. it follows that if (a, b)  R and (b, a) and label it. These circles called vertices.
 R then also R is anti symmetric Connect these circles by an arrow if
xRy  x|y correspond elements has the relation
xRy  xy Connect the vertex to itself a looking arrow
this pictorial representation of is called
8. Equivalence Relation: A relation R one Digraph or Directed
a set A is equivalence if it is reflexive,
symmetric and transitive 2.7.2 IN DEGREE
x R y  x || y
x R y  x  y (x is conquerent to y ) Total no. of arrow at end at any vertex is
Let n(A) = m & n(B) = n and R is a caller it’s in degree
relation from A to B then the num of
different relation A to B is 2mn. 2.7.3 OUT DEGREE

2.7 REPRESENTATION OF A RELATION Total no. of arrows from any vertex is


called its degree
1. Graph of a Relation
Elements of any relation R is of type (x, Example
y) so R can be sketched as a co-ordinate Let A = {1, 2, 3,4} and
diagram of points. R = {(1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (3, 4),
(4, 1)}
2. Matrix of Relation 1 1 0 0 
1 1 1 1 
If A = {a1, a2…an} and B = {b1,
Then M R   
b2………..bn} are two finite sets 0 0 0 1 
containing m & n elements respectively.  
These the relent R from A to B is 1 0 0 0 
represented by a matrix as And the digraph
MR = [mij]maxsuch that
1 if (a i , b j )  R
mij  
0 if (a i , b j )  R
MR is called as the matrix of relation R
or adjacency matrix or Boolean matrix
of R.

Example
If we consider a matrix for the sets A = {a1,
a2, a3} and B = {b1, b2, b3, b4} Example
Let A = {a, b, c, d} and a relation
1 0 0 1 
R = {(a, b), (a, d), (b, d), (c, a), (c, b), (c, c),
M R  0 1 1 0  (d, d,), (d, b), (d, d)}
1 0 1 0  Then
Then R = {(a1, b1), (a1, b4), (a2, b2), (a2,b3), 0 1 0 1 
(a3, b1), (a3, b3)} 0 0 0 1 
MR   
1 1 1 0 
2.7.1 Digraph  
1 1 0 1 
If R is a relation on a non void set A, then and digraph
we can represent R pictorially for every

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
A relation R is transitive if M 2R  but the
converse is not true.

UNION AND INTERSECTION OF A


RELATION
Element In degree Out Degree
a 2 2 Let R1 and R2 are two relations on a set A
b 3 1 and their Boolean matrix are M R 1 and M R 2
c 1 3 then MR 1  R1  MR 1 VMR 2 ( join)
d 3 3
So the resultant matrix will have 1 in the
ASYMMETRIC RELATION position
A relation which is not symmetric is called where M R 1 or M R 2 has a 1.
as Asymmetric relation Example
1 0 1  1 0 0 
2.8 COMPOSITION OF RELATIONS
Let M R1  1 1 0 & M R 2  1 0 1 
 
   
Let R is a set and its Boolean matrix is as 0 0 1  1 1 1 
1 1 1 1 0 1
M R  0 0 1 Then M R1UR 2  1 1 1
 
0 0 1 1 1 1
MR1 R 2  MR1  MR 2 (Meet)
Then composition is as Boolean product of
So the resultant matrix will have 1 in the
matrices
i.e.1.1 = 1, 1.0 = 0.1 = 0, 1 + 0 = 1, 1 + 1 = 1, position where MR1 and MR 2 both have 1.
0+0=0 1 0 0 
1 1 1 1 1 1 M R1 R 2  1 0 0 
then M 2R  0 0 1 0 0 1
  0 0 1 
0 0 1 0 0 1
1 1 1 2.9 CONNECTIVITY RELATION
or M R ⊛ M R  M R2  0 0 1
  Let R be a relation on a set A. A path of
0 0 1 length n in R from a to b is a finite sequence
A relation R is Identity relation if all  : a, x1, x2, …., xn-1, b, beginning with a and
diagonal element of MR are 1 and other ending with b, such thata R x1, x1 R x2, ….,
elements are zero. xn-1 R b.
1 0 0 A path of length ‘n’ involves (n + 1)
0 1 0  elements of the set A, although they are not
  necessarily distinct.If n is a fixed positive
0 0 1 integer, we can define a relation Rn on A as
A relation R is symmetric if a Rn b it implies that there is a path of
aij = aji∀aij  R. length n from a to b in R.
1 0 1  We can also define a relation R  on A as a R
M R  0 1 0 

b it implies that there is some path in R
from a to b, whose length depends on a and
1 0 1 
b. The relation R  is called the connectivity

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
relation for R. If A has n elements then R  contains R as a subset. The symmetric
= R  R2  R3  ……  Rn. closure of a relation R can be obtained by
adding those pairs, those can make R
2.9.1 CLOSURES OF RELATIONS symmetric. or the Union of R and R-1 gives
Symmetric closure of R.
Reflexive Closure: Let R be a relation on A,
then R  , reflexive closure of R, can be Example
formed by adding to R all those pairs of the If R = {(1, 2), (4, 3), (2, 2), (2, 1), (3, 1)} be a
form (a, a), a  A, that are not present in R. relation on S = {1, 2, 3, 4}. Find symmetric
Symbolically, R  = R   , where  is the set closure.
of pairs of diagonal elements in the set A.  R(S) = R  {(3, 4), (1, 3)} = {(1, 2), (4, 3), (2,
= [(a, a) |  a  A] 2), (2, 1), (3, 1), (3, 4), (1, 3)}
Or R(S) = R  {(1, 2), (4, 3), (2, 2), (2, 1), (3,
1)}  {(2, 1), (3, 4), (2, 2), (1, 2), (1, 3)}
Symmetric Closure: A relation R  ,
= {(1, 2), (4, 3), (2, 2), (2, 1), (3, 1), (3, 4), (1,
symmetric closure of R, can be formed by
3)}
adding to R all those pairs of the form (b, a)
Ms = MRVMRT
that are absent from R while (a, b) present
in R. Symbolically, R  = R  R-1, 2.9.3 TRANSITIVE CLOSURE
Transitive Closure: A relation R  , The relation obtained by adding the least
transitive closure of relation R, is the number of ordered pairs to assure
connectivity relation R  .Symbolically, R  = transitivity is called the transitive closure
R  R2  R3  ………  Rn. of a relation R. It is denoted by R+
R+ = R  R2  R3  …….  Rm
Closure of Relations if R is defined on a set S and n(s) = m
MT = MRV M R2 V ………. V M Rm
Let R be a relation on a set A, R may or may
not have a property P (as reflexivity,
Example
Symmetricity or transitivity). If there is a
Let A ={1, 2, 3} and a relation R = {(1, 2), (2,
relation S, with property P, containing R
3), (3, 1)} defined on A. Find the reflexive,
such that S is a subset of every relation that
Symmetric and transitive closure of R.
has property p and containing R, is called
Sol. R(r) = R  IA = {(1, 2), (2, 3), (3, 1)}
closure of R with respect to property P.
 {(1,1), (2, 2), (3, 3)}
R(S) = R  R-1
(A) Reflexive closure: - The reflexive
RT = R  R2  R3
closure R(r) of a relation R is the smallest
 R2=R0R={(1,2),(2,3),(3,1)}0{(1,2),(2,3),
reflexive relation that contains R as a
(3,1)}
subset. To find the reflexive closure of a
= {(1, 3), (2, 1), (3, 2)}
relation R, one has to found that what pair
R3=R20R={(1,3),(2,1),(3,2)}0{(1,2),(2,3),(3,
(s) to be added to R so that it converts in to
1)}
a reflexive relation.
= {(1, 1), (2, 2), (3, 3)}
 R(r) = R  {(3, 3), (4, 4)}
 RT = {(1, 2), (2, 3), (3, 1), (1, 1), (2, 2), (3,
Mc = MR VIn
3), (1, 3), (2, 1), (3, 2)}
2.9.2 SYMMETRIC CLOSURE
ADDITION MODULO ‘M’
The symmetric closure R(S) of a relation R is If a & b are two positive integers and m is a
the smallest symmetric relation which fixed positive integer then for modulo m

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
a+mb = r (mod m); 0  r  m 2. As partial order Relation is reflexive, so
Where r is the least non negative every vertex of the poset has a cycle of
remainder when a + b divided by m. length one.
Example 3. As partial order relation is anti
2 +3 5= 1 symmetrical so if there is an edge from
3 +2 1 = 0 a to b then there is no edge from b to a.
3 +6 2 = 5 if b  a.
4. If there is an edge from a to b and b to c
Multiplication modulo ‘m’ then there must be an edge from a to c.
a ×m b = r (mod m); 0  r  m Hence it is clear that in digraph of a
partial order relation, there is no cycle
Example of length more than one.
4 ×3 5 = 2
4 ×3 3= 0 2.12 HASSE DIAGRAM

2.10 0EQUIVALENCE CLASS If in a digraph of a poset (A,  ) we will do


following-
Let X be a set and R is any – relation a) Delete all loops from the vertices as it is
defined on it and x  X , then the set of all y obvious in P.O.R. as it is reflexive.
 X such that x R y is called equivalence b) Delete all edges that must represent
transitivity.
class of x. and is given as
c) Denotes vertices by dots
[x] = {y|x R y, x, y  X} = [y]
d) Draw the diagraph with all edges
So y  [x]  xRy pointing upward in order to remove
The set of all equivalence classes of the set arrows from edges.
X This digraph of a poset is known as Hasse
X is represented by
R diagram of the poset.
Also it is known as Quotient set of X by R.
Example
2.11 PARTIAL ORDER RELATION AND Draw the diagraph and Hasse diagram of
POSET the poset (A, R). Where
A = {a, b, c}, R = (a, a), (b, b), (c, c), (a, b),
A relation R, defined on a set A is said to be (b, c), (a, c)}
partial order relation in A if R is
(i) Reflexive
(ii) Anti symmetric
(iii) Transitive and the set A is called as
Poset for the defined partial order Relation
and is denoted by (A, R). The elements a &
b of a poset (A,  ) are said to be
comparable if either a  b or b  a and
they are not comparable if neither a  b nor
b  a. Digraph Hasse Diagram

Example Example
1. In the Digraph of poset (Z+, /), element Let s = {1, 2, 3, 4, 5, 6} and we defined  as
3 and 6 are comparable as 3|6 but 2 and m  n if m divides n, i.e. n is an integer
5 are Non comparable as 2 | 5 or 5 | 2 multiple of m. Then the Hasse diagram for
the poset is

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
4 6 Least Upper Bound
An element l  Am (A,  ) Least upper
2 3 Bound (LUB) of a and b, a, b  A if
5 i) A  l, b  l i.e. l is Upper Bound of a &b.
1 ii) If any other upper bound, other than l,
is also an Upper Bound of l
Example
Draw the Hasse diagram for the poset Lower Bound
({2, 4, 6, 9, 12, 18, 27, 48, 60, 72}, 1) Let (A,  ) be a poset and a, b  A then and
Where 1 represents divisibility element d  A is called. Lower bound of a &
b if d  b.

Greatest Lower Bound (GLB)


An element g  A is G.L.B. of a & b iff
a) g  a and g  b.
b) if an element g`  A such that it is also a
lower bound then g` must be a lower
bound of g.

Example
Consider the poset ({2, 4, 6, 9, 12, 18, 27,
36, 45, 60, 72}, 1) where 1 denotes
divisibility then Find
Maximal Element i) Maximal & Minimal elements
An element a  A of the poset (A, <) is said ii) Greatest and least elements exists
to be maximal if there is no element b in A iii) LUB of {2, 9}, if exists
such that a < b. iv) GLB of {60, 72} if exists

Minimal Element
An element a of the poset (A,  ) is said to
be minimal if there is no element b in A
such that b < a

Greatest Element
An element a  A of the poset (A,  ) is said
to be greatest if b  a, b  A (uniquely)

Least Element
An element a  A of the poset (A,  ) is said i) Maximal elements are 27, 48, 60, 72
to be least if b  a , b  A (uniquely) Minimal elements are 2, 9
ii) Maximal & Minimal elements are not
unique so greatest and Least element
Upper and Lower Bounds does not exists
iii) Upper bound of {2, 9} are 18, 36, 72and
Upper Bound the least upper bound is 18.
Let (A,  ) be a poset and a, b  A, then an iv) Lower bounds of {60, 72} are 12, 6, 4 &
element c  A is called upper bound of a & b 2 and the GLB is 12.
if a  c and b  c.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
JOIN AND MEET IN A POSET 2. Associative
Let A be a poset under an ordering  or R. a  (b  b) = (a  b)  c
Let a, b  x, then we define. Join (a, b) = a a  (b  c) = (a  b)  c
 b = LUB of (a, b) (unique)Meet (a, b) = a  3. Idempotent
b = GLB of (a, b) (unique) a  a =a, a  a = a
Results 4. Commutative
1. Both join and meet operations are ab = ba & a b = b a
commutative 5. The Dual of a Lattice is also a Lattice
2. Jain & meet operation are associative
3. For every a in the poset (A, R) a  a =a 2.13.1 BOUNDED LATTICES
and a  a=a
4. For any a & b in (A, R) Let (L,  ) is a lattice. An element 1 will be
a  (a  b) = a used to denote the upper bound (UB) of the
a  (a  b) = a set L (i.e., for each a  L, we have a  1).
Obviously 1 is unique in the lattice, if it
2.13 LATTICE exists. Similarly 0, to denote lower bound
(LB) of the set L (i.e., for any a  1, we have
A Lattice is a poset (L,  R) in which every 0  a).
pair of elements (a, b)  L has a GLB and A lattice which has both elements 0 and 1 is
LUB. And is denoted by (L,  R, V,  ) called a bounded lattice.
LUB {a, b} = a  b Remark: - It is important to note here that
GLB {a, b} = a  b 0 and 1 are notation and not the numbers.

Example Example
Let N be the set of natural number. A The lattice (P(X),  ), where X is a finite set
relation R is defined by x Ry  x/y. show is bounded.
that (N, R) is a lattice where x  y = LCM {x, It’s UB is X and LB is 
y} and x  y = HCF {x, y} i.e. element 1 = X
Solution and element 0 = 
Let us show first that (N, R) is a poset Theorem: - Let (L, <) be a lattice with 0
i) Reflexive: - As every element of Nis and 1 as lower and upper bounds, then  a
divisor of itself, so R is reflexive. L
ii) Anti symmetric: - If xRy and yRx both i) a  1 = 1 and a  1 = a
are true then obviously x = y. So R is Ant ii) a  0 = a and a  0 = 0
symmetric.
iii) Transitive: - x|y and y|z then clearly x|z, 2.13.2 DISTRIBUTIVE LATTICES
so R is Transitive. Hence (N, R) is a
poset as R is partial order Relation. A lattice (L,  ,  ) is called a distributive
In N meet (  ) and join (  ) are HCF and lattice if for any a, b, c  L
LCM and every pair of elements has i) a  (b  c) = (a  b)  (a  c)
their HCF & LCM in N itself i.e. ii) a  (b  c) = (a  b)  (a c) [Distributive
x  y = HCF {a, b} = LUB {a, b} over each other]
x  y = LCM {a, b} = GLB {a, b}
are in N. So N is a Lattice 2.13.3 COMPLEMENT OF AN ELEMENT
OF A LATTICES
Properties
1. Absorption Law Let lattice (L,  ) be a bounded lattice,
a  (a  b) = a whose UB and LB are 1 and 0 respectively.
a  (a  b) = a

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Then an element x  L is called a
complement of an element a  L if If f:A → B is a function, then A is called as
a  x = 1 and a  x = 0 Domain & B is called as Co-domain of f. All
The complement of a  L is denoted by a’ f-image of elements of A is called range of f
Thus, a  a’ = 1 and a  a’ = 0 and is denoted by f(A). obviously f(A)  B &
Theorem: -Let (L,  ) be a bounded f (A) = {f(x); x  A}
distributive lattice, if an element a  L, has a
complement then it is unique. TYPES OF FUNCTIONS

2.13.4 COMPLEMENTED LATTICE 1. Constant Function: -Let f: A→B is a


function such that f(x) = c  x  A where
A lattice (L,  ,  , 0 1) is said to be a C is a constant, is called as constant
complemented lattice if every element of L function.
has at least one complement.

Example
The lattice (P(X),  ) is a complemented
lattice in which the complement of any
subset A of X is the set X – A
 A  (X – A) = A  (X – A) = X (= 1)
and A  (X – A) = A  (X – A) =  (= 0) 2. Identity function: -f: A→A is an
identity function from A to A if f
Theorem:- If (L,  ) is a complemented associates every element x of A to x
distributive lattice, then  a, b  L. itself i.e.
i) (a  b)’ = a’  b’ F: A→A s.t.
ii) (a  b)’ = a’  b’ F(x) = x
[De-Morgan’s laws]
3. Equal Function: -Two function f and g
2.14 FUNCTIONS are said to be equal function if
a) Domain of f = domain of g
FUNCTIONS b) Co-domain of f = Co-domain of g
c) f(x) = g(x)  x  Domain
Let A and B are two non void sets and f is a
rule which associates each element of A to Example
a unique element of B, then f is called a Let A = {1, 2}, B = {3, 6} and f: A→B s.t.
function or a mapping from A to B and is f(X) =x2 + 2  x  A. and g: A  B such Then
denoted by f: A→B defined as f(x) = y  x f and g are two equal functions.
A .
CALCULATIONS AND ASSUMPTIONS FOR
DOMAIN & RANGE OF A FUNCTION

Assuming f(x) to be real number in general,


then
1) f(x) does not tends to 
2) f(x) does not involve i =  1
3) f(x) does not become indeterminable

Example
DOMAIN AND CO-DOMAIN

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Find domain of of B is not the f-image of any element of
x A. i.e. f(A) is a proper subset of B. i.e.
i) f(x) = 2
x 1 f(A)  B
x
ii) f(x) =
x 5
iii) f(x) = x  4
iv) f(x) = logx
v) f(x) = 4  x2
x2
vi) f(x) =
x2 Example
Solution Let f: R→R defined byf(x) = x2  x  R
i) R Then f is in to because negative number
ii) R – {5} does not appear in range.
iii) R+ - {1, 2, 3}
iv) R+ (v) {  1,  2, 0} 2. On to or Surjection: If f: A→B is such
vi) (-2,  ) – {2} that each element of B is f-image of at
least
Example one element of A. In this case f(A) = B

Find Range of following


1
i) f(x) =
x5
ii) f(x) = x2
x
iii) f(x) =
1 x
iv) f(x) = 9  x2
Ans. Example
1 1  5y Let A = {1, 2, 3, 4} and B = {1, 4, 9, 16}
i) Let y = x
x 5 y f:A→B, defined by f(x) =x2  x  A
So when y = 0, x =  Then f:A→B is On to.
 Range is R – {0}
3. One-One Mapping: -f: A→B is One-One
ii) y = x2 x  y
if different elements of A have different
 Range = [0,  ] f-images in B. Thus f: A→B is One-One
x y  f(a) =f(b)  a = b  a, b  A
iii) y  x
1 x 1 y  a  b  f (a)  f (b)
Range = R – {-1}

iv) y 9  x 2  x  9  y2
Range = [0, 3]

KINDS OF FUNCTION/MAPPING

1. In two or Injection: -If f: A→B is a Example


mapping such that at least one element

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Let I be the set of integers and B be the set
of all even integers then the mapping f: I→B Example
defined by f(x) = 2x is One-One. Show that f:Q→Q f(x) = 2x – 3
 x  Q is a Bijection
TO CHECK THE INFECTIVITY OF A
FUNCTION Solution
Let x, y  Q then
1. Take two arbitrary element x & y in f(x) = 2x – y & f(y) = 2y -3
Domain of f. If f(x) = f(y)
2. Put f(x) = f(y)  2x  3  2y  3  x  y
3. if x = y then f is One-One
 f is One  One.
Example On to
f: R→R; f(x) = x3 + 2  x  R Let y  Q then
Solution f(x) = y  2x – 3 = y
Let x, y  R then y3
x Q
f(x) = x3 + 2 & f(y) = y3 + 2 2
if f(x) = f(y) y3
 x3 + 2 = y3 + 2  x3 = y3  x = y Thus  y  Q,  an x  such
2
 f is One-One That f(x) = y
4. Many One Function: f: A→B is said to So f is On to
be many one function if two or more
elements of A has same image in B. HAMMING DISTANCE FUNCTION

This function is very useful in coding


theory. It gives a measure of difference
between two binary words that have the
same length and is defined by H(u, v) = the
number of positions in which u & v have
different bits, where u & v are two different
binary words of same length.
Example
f:Z→Z; f(x) = |x|  x  Z Example
Then f is many one function H (1010, 1111) = 2
H (1001, 1011) = 1
5. One-One On to or Bijection: f:A→B is a CHARACTERISTIC FUNCTION
Bijection if it is One-One as well as on
to. Or in other words f is a Bijection if Let A is a subset of Universal set U. The
a) it is One-One i.e. f(x) = f(y) characteristic function of A is defined as a
xy  x, y  A. function from U to {0, 1} as
b) It is on to i.e.  y  B ,  x  A such that fA(x) = 1 if x  A
f(x) = y. = 0 if x  A

Example
U = {1, 2, 3, 4}, A = {1, 2, 4} then
fA (1) = fA(2) = fA(4) = 1
and fA(3) = 0

ALGEBRA OF CHARACTERISTIC FUNCTION

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
1. Composition of functions is not
If A and B are two sets, then for all u necessarily commutative i.e. fog  gof.
1. f A (u) = 1 – fA(u) 2. Composition of functions is associative
2. f AB (u)  f A (u).f B (u) i.e. (fog)oh = fo(goh) if exists.
3. Let f: A→B, g: B→C are mappings; and
3. f AB (u)  f A (u)  f B (u)  f AB (u) a) If f and g are injections, the gof: A→C
is also an injection.
2.15 COMPOSITION OF FUNCTION b) If f and g are surjections, then gof:
A→C is also a surjection.
Let f:A→B and g:B→C then a function go c) If f & g are bijections the so is gof.
f:A→C is defined by (go f) (x) =g[f(x)] 4. Composition of any function with the
x  A and called composition of g and f. identity function is the function itself.
If f: B→C & g: A→B then a function (fog) 5. If for two functions f: A→B and g: B→A
A→C is defined by (fog)(x) = f[g(x)] x  A fog = IB (Identity function) then f is
and called composition of f and g. called
It is not necessary that inverse of g and denoted by – g-1 = f. If g
fog = gof of = IA (Identity function) then g is
i.e. fog  gof called as
so for gof, Domain(g) = co – domain (f) inverse of f and denoted by f-1 = g.
and for fog, Domain (f) = co –domain (g) 6. (gof)-1 = f-1og-1

Example INVERSE OF AN ELEMENT


Let f: R→R ; f(x) = x2
g: R→R ; g(x) = sinx Let f: A→B and if a  A is associated to b  B
 fog: R→R ; (fog) (x) = f[g(x) = then we say that b is the f image of a i.e. b =
sinx f(a). Also it then a is said to be pre image of
gof: R→R ; (gof) (x) = g[f(x)] b or inverse element b under f and we
=sinx2x writes it as f-1(b) = a
Example
INVERSE OF A FUNCTION
f and g functions are given by
Let f:A→B is a Bijection or One-One On to
f = {(1, 2), (3, 5), (4, 1)} and
function then a function f-1B→A. Which
g = {(2, 3), (5, 1), (1, 3)}, find range of f and
associate each y  B to a unique element x
g and write down fog and gof as sets of
ordered pairs.  A such that f(x) = y, then it is inverse of
f(x) = y  f-1(y) = x
ALGORITHM TO FIND INVERSE FUNCTION
Solution
Range of f = {1, 2, 5} Let f:A→B is a Bijection then
Range of g = {1, 3} i) Put f(x) = y, y  B and x  A
fog = {(2, 5), (5, 2), (1, 5)} ii) Obtain x in terms of y.
gof = {(1, 3), (3, 1), (4, 3)} iii) Replace x by f-1(y)

Example Example
f: R→R ; f(x) = x2 – 3x +2 f:R→R; f(x) =2x + 7,Find that inverse of f
(fof) (x) = f[f(x)] = (x2 – 3x + 2)2 – 3(x2 - Solution
3x+2)+2  f(x) = 2x + 7 = y
y7
PROPERTIES OF COMPOSITE FUNCTIONS x  f 1 (y)
2

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
y7 1 2 3 4  1 2 3 4 
f 1 : R  R; f 1 (y)  y  R. f   &g   
2  2 1 3 4 3 2 1 4
x 7
or f 1 (x)  x  R. Are two Permutations .
2
EQUALITY OF TWO PERMUTATION
PROPERTIES Two permutation f & gof degree ‘n’ are said
1. Inverse of a bijection is unique to be equal if we have
2. Inverse of a bijection is also a bijection f(a) = g(a)  a  S
3. If f:A→B is a Bijection and g: B→A is a For Example
inverse of f then (fog = IB& gof = I
1 2 3 4   2 4 3 1
4. (fog)-1 = g-1 o f-1 f   &g   
 2 3 4 1 3 1 4 2
GREATEST INTEGER FUNCTION are two permutation of degree 4 and are
equal.
f:R→Z is called greatest integer function if
f(x)=[x]= the largest integer less than or TOTAL NO. OF DISTINCT PERMUTATION
equal to x. OF DEGREE
Example
If S is a finite set having ‘n’ elements then
[7.3] = 7
we shall have n1 distinct permutation of
[5] = 5
degree ‘n’. If Pn will the set of all these
[8.1] = 8
permutations then it is called as the
[-7.4] = -7
symmetric set of permutations of degree
‘n’. i.e.
PERMUTATION FUNCTION
Pn = {f | f is a permutation of degree
Let S be a finite set having ‘n’ distinct
element. If f:S→S then it is called a Example
transformation. If f:S→S and it is a bisection
also then f is said to be a permutation of Let s = {1, 2, 3} is a set, having 3 elements
degree n. The number of elements in the then P3, Consists of 31 = 6 distinct
set is called the degree of permutation. permutation. They can be written as
1 2 3  1 2 3  1 2 3  
SYMBOL  , ,  ,
1 2 3  1 3 2   3 2 1 
Let S = {a1, a2,…….an} and f: S→S is a P3 =  
permutation. Let f(a1) = b1, f(a2) = b2, 1 2 3  , 1 2 3  , 1 2 3  
 2 1 3   3 2 1  2 3 1 
…….f(an) = bn where {b1, b2, ……..bn} are  
nothing but some arrangement of the
elements of S. i.e. {b1, b2,…bn} = {a1, IDENTITY PERMUTATION
a2,…….an} so to write this permutation in a
convenient way, we write it as If I is a permutation of degree ‘n’ such that I
 a a a 3 ......... a n 1 a n  replaces each element by the element itself
f  1 2  then I is called identity permutation.
 b1 b2 b3 ........ bn 1 bn 
1 2 3 4....... n 
i.e. each element in second row is the f- I 
image of the corresponding element in first 1 2 3 4....... n 
row.
PRODUCT OR COMPOSITE OF TWO
Example PERMUTATIONS
If S = {1, 2, 3, 4} then

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
The product or Composite of two 1 2 4 3 5 6 
permutation f and g of degree ‘n’ is denoted but g    is not cyclic
 2 1 3 4 5 6
by fg and obtained by carrying out firstly
If the cyclic permutation f = (1 3 4 2 6)
the operation defined by f and then by g.
represents a permutation of a degree on 9
symbols 1, 2, 3…9 then
Example
1 3 4 2 5 6 7 8 9 
 a a 2 a 3 ......... a n  f  
If f   1  3 4 2 6 5 1 7 8 9
 b1 b2 b3 ........ b n 
1 2 3 4   2 3 4 1
 b b2 b3 ........ b n 
and g   1    3 4 1 2    4 1 2 3
 c1 c2 c3 ........ cn 
are permutations from the set of TRANSPOSITION
Permutation Pn, of ‘n’ degree A cycle of length two is called a
 a a 2 a 3 ......... a n  transposition.
fg   1 
 c1 c2 c3 ........ cn  Example
1 3 
Example (1, 3) =  
 3 1
1 2 3  1 2 3 
f   g  DISJOINT CYCLES
1 3 2   2 3 1
1 2 3  Two cycles are said to be disjoint if they
fg    have no symbol in common.
 2 1 3
1 2 3  Example
gf   
 3 2 1
Obviously fg  gf (1 3 5) and (2 6 8 9) are disjoint

CYCLIC PERMUTATION INVERSE OF A CYCLIC PERMUTATION

Let f is a permutation of degree n on a set S, If f = (1 2 3 4………n-1 n)


having n distinct element. Let it be possible Then f-1 = (n n-1………4 3 2 1)
to arrange m element of S in a row such (fg)-1 = g-1 f-1
that the f-image of each element in the row Every cyclic Permutation can be expressed
is the element which follows it, the f-image as a product of transpositions in infinitely
of last element is first element and f-image many ways
of first element is last element and the
remaining n-m elements remains Example
unchanged by f. Then f is called a cyclic (5 6 7 8) = (5 6) (5 7) (5 8)
permutation or a cycle of length m or m-
cycle. EVEN AND ODD PERMUTATION
By the length of cycle means the number of
objects permuted by the cycle. A permutation is even if it can be expressed
as a product of an even number of
Example transpositions; otherwise it is an odd
1 2 5 3 6 4  permutations. Or If the length of a cycle is
f    1 2 5 3 odd then permutation is even and if length
 2 5 3 1 6 4 is even then the permutation is odd.
i) Identity permutation is an even per m.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
ii) A transposition is an odd per m. the sets Q∗,R∗ and C∗ one can always find a
iii) Even. Even = Even b such that a · b = 1 = b · a.
iv) Odd. Odd = Even Based on the above examples, an abstract
v) Odd. Even = Odd. notion called groups is defined. Formally,
n! n! one defines a group as follows.
vi)Or n symbols, are even & are odd .
2 2
Definition(Group): A group G, usually
2.16 Groups denoted (G, ∗), is a non-empty set together
with a binary operation, say ∗, such that the
Binary Operation: for every a, b ∈ Z elements of G satisfy the following:
(Q,R,C), a + b, called the addition of a and b, 1. for every a, b, c ∈ G, (a ∗ b) ∗ c = a ∗ (b ∗
is an element of Z (Q,R,C); c) (Associativity Property) holds in G;
2. there is an element e ∈ G such that a ∗e
Addition is Associative: for every a, b, c ∈ =a=e∗a, for all a ∈ G (Existence of
Z (Q,R,C), (a + b) + c = a + (b + c); Identity);
3. for every element a ∈ G, there exists an
Additive Identity: the element zero, element b ∈ G such that a∗b = e = b∗a
denoted 0, is an element of Z (Q,R,C) and (Existence of Inverse).
has the property that for every a ∈ Z In addition, if the set G satisfies a∗b =
(Q,R,C), a + 0 = a = 0 + a; b∗a, for every a, b ∈ G, then G is said to
be an abelian.
Additive Inverse: For every element a ∈ Z NOTE: Let (G, ∗) be a group. Then the
(Q,R,C), there exists an element −a ∈ Z following hold:
(Q,R,C) such that a + (−a) = 0 = −a + a; 1. The identity element of G is unique.
Addition is Commutative: We also have a + Hence, the identity element is denoted
b = b + a for every a, b ∈ Z (Q,R,C). by e.
Now, let us look at the sets Z∗ = Z − {0},Q∗ = 2. For each fixed a ∈ G, the element b ∈ G
Q − {0},R∗ = R − {0} and C∗ = C − {0}. such that a∗b = e = b∗a is also unique.
As in the previous case, we see that similar Therefore, for each a ∈ G, the element b
statements hold true for the sets Z∗,Q∗,R∗ that satisfies a ∗ b = e = b ∗ a is denoted
and C∗.Namely, by a-1.
3. Also, for each a ∈ G, (a-1)-1 = a.
Binary Operation: for every a, b ∈ Z∗ 4. If a∗b = a∗c, for some a, b, c ∈ G then b =
(Q∗,R∗,C∗), a · b, called the multiplication of c. Similarly, if b∗d = c∗d, for some b, c, d
a and b, is an element of Z∗ (Q∗,R∗,C∗); ∈ G then b=c. That is, the cancelation
laws in G.
Multiplication is Associative: for every a, 5. For each a, b ∈ G, (ab)-1 = b-1a-1.
b, c ∈ Z∗ (Q∗,R∗,C∗), (a · b) · c = a · (b · c); 6. By convention, we assume a0=e, for all
a ∈ G.
Multiplicative Identity: the element one, 7. For each a ∈ G, (an)-1 = (a-1)n, for all n ∈ Z.
denoted 1, is an element of Z∗ (Q∗,R∗,C∗) Definition (Subgroup): Let (G, ∗) be a
and for all a ∈ Z∗ (Q∗,R∗,C∗), a · 1 = a = 1 · a; group. Then a non-empty subset H of G is
said to be a subgroup of G, if H itself forms
Multiplication is Commutative: One also a group with respect to the binary
has a·b = b · a for every a, b ∈ Z∗ (Q∗,R∗,C∗). operation ⋆.
Observe that if we choose a ∈ Z∗ with a 6= Example: 1. Let G be a group with identity
1,−1 then there does not exist an element b element e. Then G and {e} are themselves
∈ Z∗ such that a · b = 1 = b · a. Whereas, for groups and hence they are subgroups of G.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
These two subgroups are called trivial Order of an Element: Let G be a group and
subgroups. let g ∈ G. Then the smallest positive integer
m such that gm = e is called the order of g. If
Note: there is no such positive integer then g is
1. Let G be a group and let H be a non- said to have infinite order. The order of an
empty subset of G.Then H is a subgroup element is denoted by O(g).
of G if for each a, b ∈ H, ab-1∈ H. Note: For each a ∈ G, O(a) = O(a-1)
2. Let H be a non-empty subset of a group
G. Then H is a subgroup if the two 2.17 PRACTICE SET
conditions given below hold.
Q.1 Write the set {2, 3, 4} (given in list
A) For each a, b ∈ H, ab ∈ H (i.e., H is closed notation) in set builder notation.
with respect to the binary operation of Solution
G). Here are three ways of writing the
B) For each a ∈ H, a-1∈ H. set in set builder notation:
{x | x∈N,1 < x< 5 }, { x | x ∈N, 2≤ x≤ 4 },
3) Let G be an abelian group with identity Or
e. Consider the sets H = {x ∈ G : x2 = e} x | x ∈R, x3 − 9x2 + 26x − 24 = 0 }.
and (This last set was obtained by
K = {x2 : x ∈ G}. Then both H and K are taking the equation (x − 2) (x − 3)
subgroups of G. (x − 4) = 0 and multiplying out the
4) Let G be a group and let H be a non- left side.)
empty finite subset of G. If H is closed
with respect to the binary operation of Q.2 Write the set {x | x∈ R, x is a solution
G then H is a subgroup of G. to x2=−1} in list form.
Let H be a subgroup of a group G. Solution
Suppose a, b ∈ G. Then the following The set is the empty set because x2
results hold for left cosets of H in G: = −1 has no real number solutions;
1. aH = H if and only if a ∈ H, we can write it as { }.
2. aH is a subgroup of G if and only if a ∈
H, Q.3 Write the set S = {x | x is an even
3. either aH = bH or aH ∩ bH = ∅, positive integer and x≤64} in list
4. aH = bH if and only if a-1b ∈ H. notation.
Similarly one obtains the following Solution
results for right cosets of H in G. The integers in S are the even
1. Ha = H if and only if a ∈ H, integers beginning with 2 and
2. Ha is a subgroup of G if and only if a ∈ H, ending with 64. We can write S =
3. either Ha = Hb or Ha ∩ Hb = ∅, {2, 4, 6, 8 . . . 64}, S = {2, 4, 6 . . . 64},
4. Ha = Hb if and only if ab-1∈ H. or S = {2, 4, 6 . . . 62, 64}, for
Furthermore, aH = Ha if and only if H = example. Note than writing S = {2,
aHa-1 = {aha-1 : h ∈ H} 4 . . . 64} would not be wise
Order of a Group: The number of elements because the pattern in the list is
in G, denoted |G|, is called the not obvious — it could be 2, 4, 8,
order of G. If |G|<∞, then G is called a group 16, 32, 64.
of finite order.
Let H be a subgroup of a finite group G. Q.4 Determine whether each set is finite
Then |H| divides |G|. Moreover, the or infinite:
number of distinct left (right) cosets of H in a) {1, 10, 100, 1000, 10000 . . .}.
G equals |G| / |H|. b) {1, 3, 5, 7, 9 . . . 599}.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
c) The set of all real number list of elements of S. However
solutions to x+ 3+2x = 3(x + 1). {{a}} ⊆ S because every element
d) The set of telephone numbers of of {{a}} belongs to S. (The only
the form “(XXX) XXX-XXXX” in element of {{a}} is {a}, which is
the United States. an element of S.)
e) The set of real number solutions c) ∅∈ S (it is the first element in the
to the equation x2 = −4. list for S) and ∅⊆ S (the empty
f) {x | x an integer, x2 − 9x + 14 < 0}. set is a subset of all sets).
Solution d) {{∅}, a} is neither a subset of S
a) The ellipsis indicates that the nor an element of S. It is not a
pattern continues forever, so the subset of S because {∅} is not an
set is infinite. element of S; it is not an element
b) The set consists of the first 300 of S because it does not appear
odd positive integers, stopping in the list of elements of S.
at 599. Therefore the set is e) {∅} ⊆ S. The set {∅} has one
finite. element, ∅, which is the first
c) The equation can be rewritten as element in the list for S.
3x + 3 = 3x + 3; hence all real However, {∅} is not an element
numbers are solutions. The set is of S.
therefore infinite. f) {∅, a} ⊆ S. The set {∅, a} has
d) The number is quite large, but two elements, each of which is
the number of possibilities is still an element of S. However {∅,
finite. a} is not an element of S
e) There are no real numbers that because it is not one of the
are solutions to this equation. three elements in the list for S.
Therefore the set is empty, that
is, it has size zero, and hence is Q.6 Prove that the following is true for
finite. all sets A, B, and C: if A∩C⊆B∩C
f) The polynomial factors as (x − and A∩C⊆ B ∩ C, then A ⊆ B.
7)(x− 2). This product is positive Solution
if x > 7 or x <2, and is negative if Let x ∈ A. We need to show that x ∈
2 < x < 7. Therefore, the set is B. We will construct a proof by
finite — it is equal to {3, 4, 5, 6}. cases, depending on whether x ∈ C
or x ∉ C.
Q.5 Let S={∅, a, {a}}. Determine Case 1: x ∈ C. If x ∈ C, then by the
whether each of these is an original hypothesis (x ∈ A) we
element of S, a subset of S, neither, know that x ∈ A ∩ C. But it is given
or both. that A ∩ C ⊆ B ∩ C. Therefore x ∈ B
a) {a} b) {{a}} c) ∅ ∩ C, and hence x ∈ B.
d) {{∅}, a} e) {∅} f) {∅, a}
Solution Case 2: x ∉ C. Then x ∈ C. Then by
a) {a} is the third element in the the original hypothesis (x ∈ A) we
list of elements of S. Therefore know that x ∈A ∩ C. But it is given
{a} ∈ S. The set {a} is also a that A ∩ C ⊆ B ∩ C. Therefore x ∈ B
subset of S: {a} has one ∩ C, and hence x ∈B. Therefore, in
element, a, which is also an either case, if x ∈ A, then x ∈ B.
element of S. Therefore A ⊆ B.
b) {{a}} is not an element of S,
because it does not appear in the

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.7 Prove: If A⊆B and C⊆D, then A∩C⊆B 1 1 0 0 
∩D. 1 1 1 0 
Solution  
We assume that A ⊆ B and C ⊆ D, 0 1 1 1 
 
and we must show that A ∩ C ⊆ B ∩ 0 0 1 1 
D. In terms of predicates and ii) R on {−2,−1,0,1,2,} where aRb
quantifiers, the statement we need means a2 = b2.
to prove has the form ∀x (x ∈ A ∩ C 1 0 0 0 1 
→ x ∈ B ∩ D) where the universe for 0 1 0 1 0 
x is the universal set U (any set  
containing A, B, C, and D). 0 0 1 0 0 
 
To show that this statement is true, 0 1 0 1 0 
suppose that x ∈ A ∩ C. (Note that 1 0 0 0 1 
the only thing we know about x is
iii) R on {1,2,4,8,16} where aRb
that it is an arbitrary element of A ∩
means a ≤ b.
C). Therefore, x ∈ A and x ∈ C, by
definition of intersection of sets. 1 1 1 1 1
0 1 1 1 1
Therefore, x ∈ B and x ∈ D (because  
A ⊆ B and C ⊆ D). This says that x ∈ 0 0 1 1 1
B ∩ D. Hence, if x is any element of A  
∩ C, then x is also an element of B ∩ 0 0 0 1 1
D. Therefore, A ∩ C ⊆ B ∩ D. We can 0 0 0 0 1
write the proof more briefly as:
Let x ∈ A ∩ C. ∴x ∈ A and x ∈ C. ∴x ∈ 1 0 1 0
B and x ∈ D. ∴x ∈ B ∩ D. 1 1 0 1 
Q.11 If M R  
1 1 1 0
Q.8 List all the binary relations on the  
set {0, 1}. 1 1 0 1
Solution Determine if R is:
There are 16 binary relations: (a) reflexive
{ } {(0, 0)}{(0, 1)} (b) symmetric
{(1,0)} {(1, 1)}{(0, 0), (1, 1)} (c) ant symmetric
{(0, 0), (1, 1)} {(0, 0), (1, 1)} (d) transitive
{(0, 1), (1, 0)} {(0, 1), (1, 1)} Solution
{(1, 0), (1, 1)} {(0, 0), (0, 1), (1, 0)} (a) Yes.
{(0, 0), (0, 1), (1, 1)}{(0, 0), (1, 0), (b) No.
(1,1)}{(0,1),(1,0), (1,1)} (c) No.
{(0,0),(0,1),(1,0),(1,1)} (d) No.

Q.9 In the questions below find the Q.12 Draw the directed graph for the
matrix that represents the given relation defined by the matrix
relation. Use elements in the order 1 1 1 1
given to determine rows and 0 1 1 1
columns of the matrix.  
Solution 0 0 1 1
 
i) R on {1,2,3,4} where aRb means 0 0 0 1
|a−b| ≤ 1. Solution

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.13 Suppose R is the relation on N
where a Rb means that a ends in the
same digit in which b ends.
Determine whether R is an
equivalence relation on N.
Solution
Yes.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
GATE QUESTIONS
Q.1 Consider the following relations on set A = {1 , 2, 3} is
R1 (a, b) if (a + b) is even over the a) Neither reflexive nor symmetric
set of integers b) Symmetric and reflexive
R2 (a , b) if (a + b) is odd over the c) Transitive and reflexive
set of integers d) Transitive and symmetric
R3 (a , b) if a .b > 0 over the set of [GATE-2002]
non-zero rational numbers
R4 (a , b) if |a – b| ≤ 2 over the set of Q.5 Consider the set  * of all strings
natural numbers over the alphabet   {0,1}.  * with
Which of the following statements is
the concatenation operator for strings
correct?
a) does not form a group
a) R1 and R2 are equivalence
b) forms a non-commutative group
relations, R3 and R4 are not
c) does not have a right identity
b) R1 and R3 are equivalence
element
relations, R2 and R4 are not
d) forms a group if the empty string
c) R1 and R4 are equivalence
relations, R2 and R3 are not is removed from  *
d) R1, R2, R3 and R4 are all [GATE-2003]
equivalence relations
[GATE-2001] Q.6 Let (S , ≤) be a partial order with two
minimal elements a and b, and a
Q.2 Consider the following statements: maximum element c. Let P : S → {True ,
S1: There exist infinite sets A, B, C False} be a predicate defined on S.
such that A ∩ (B ∩ C) Suppose that P(a) = True, P(b) = False
S2: There exist two irrational numbers and P(x)  P(y) for all x , y ∈ S
x and y such that (x + y) is rational. satisfying x ≤ y, where  stands for
Which of the following is true about logical implication. Which of the
S1 and S2? following statements CANNOT be true?
a) Only S1 is correct a) P(x)=True for all x∈S such that x ≠ b
b) Only S2 is correct b) P (x) = False for all x ∈ S such that
c) Both S1 and S2 are correct x ≠ a and x ≠ c
d) None of S1 and S2 is correct c) P (x) = False for all x ∈ S such that
[GATE-2001] b ≤ x such that x ≠ c
d) P (x) = False for all x ∈ S such that
Q.3 Let f : A → B be a function, and let E a ≤ x and b ≤ x
and F be subset of A. Consider the [GATE-2003]
following statements about images.
S1 : f (E ∪ F) = f(E) ∪ f(F) Q.7 Consider the set {a , b, c} with binary
S2 : f (E ∩ F) = f(E) ∩ f(F) operators + & × defined as follows:
a) Only S1 is correct. + a b c
b) Only S2 is correct. a b a c
b a b c
c) Both S1 and S2 are correct. c a c b
d) None of S1 and S2 is correct x a b c
[GATE-2001] a b a c
b b c a
Q.4 The binary relation S = f(empty set) c c c b

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
For Example a + c = c, c + a =a, c × b complete lattice under the partial
= c and b × c = a order defined by set containment?
Given the following set of equations: a) {1}
(a × x) + (a × y) = c b) {1}, {2, 3}
(b × x) + (c × y) = c c) {1}, {1, 3}
The number of solutions (s) (i.e., d) {1}, {1, 3}, {1, 2, 3, 4}, {1, 2, 3, 5}
pair (s) (x , y) that satisfies the [GATE-2004]
equation) is
a) 0 b) 1 Q.12 Let A, B and C be non-empty sets
c) 2 d) 3 and let X = (A - B)–C and Y =(A -C) –
[GATE-2003] (B - C)
Which one of the following is TRUE?
Q.8 Consider the binary relation: a) X = Y b) X ⊂ Y
S=  x.y | y  x  1and x, y {0, 1, 2,} c) Y ⊂ X d) None of these
a) {(x , y) | y > x and x , y ∈ {0, 1, 2, [GATE-2005]
….}} Q.13 The following is the Hasse diagram
b) {(x , y) | y ≥ x and x , y ∈ {0, 1, 2, of the poset [{a, b, c, d, e}, ≤ ]
….}}
c) {(x , y) | y < x and x , y ∈ {0, 1, 2,
….}}
d) {(x , y) | y ≤ x and x , y ∈ {0, 1, 2,
….}}
[GATE-2004] The Poset is
Q.9 The numbers of different n × n a) not a lattice
symmetric matrices with each b) a lattice but not a distributive
element being either 0 or 1 is: (Note: lattice
power c) a distributive lattice but nor a
(2 , X) is same as 2x) Boolean algebra
a) power(2 , n) d) a Boolean algebra
b) power(2 , n2) [GATE-2005]
c) power (2 , (n2 + n)/2) Q.14 The set {1, 2, 4, 7, 8, 11, 13, 14} is a
d) power(2 , (n2 - n)/2) group under multiplications module
[GATE-2004] 15. The inverse of 4 and 7 are
Q.10 The following is the incomplete respectively
operation table of 4-element group a) 3 and 13 b) 2 and 11
* e a b c c) 4 and 13 d) 8 and 14
e e a b c [GATE-2005]
a a b c e
b Q.15 Let R and S be any two equivalent
c relations on a non-empty set A.
The last row of the table is Which one of the following
a) c a e b b) c b a e statements is TRUE?
c) c b e a d) c e a b a) R ∩ S, R ∪ S are both equivalence
[GATE-2004] relations
b) R ∪ S is an equivalence relations
Q.11 The inclusion of which of the c) R ∩ S is an equivalence relations
following sets into S = {{1, 2},{1, 2, d) Neither R ∪ S nor R ∩ S is an
3}, {1, 3, 5}, {1, 2, 4}, {1, 2, 3, 4, 5}} is equivalence relation
necessary and sufficient to make S a [GATE-2005]

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.16 Let f : B → C and g : A → B be two (x ,y)R(u , v) if x < u and y > v. Then
functions and let h = f o g. Given that R is
h is an onto function. Which one of a) Neither a Partial Order nor an
the following is TRUE? Equivalence Relations
a) f and g should both be onto b) A Partial Order but not a Total
functions Order
b) f should be onto but g need not c) A Total Order
be onto d) An Equivalence Relation
c) g should be onto but f not be [GATE-2006]
onto
d) both f and g need not be onto Q.21 Let E, F and G be finite sets.
[GATE-2005] Let X = (E ∩ F) – (F ∩ G) and
Y = (E – (E ∩ G)) – (E - F)
Q.17 Consider the set H of all 3 × 3 Which one of the following is true?
a f e  a) X ⊂ Y
matrices of the type 0 b d  b) X ⊃ Y
  c) X = Y
0 0 c  d) X – Y ≠ ∅ and Y – X ≠ ∅
Where a, b, c, d, e and f are real [GATE-2006]
numbers and abc ≠ 0. Under the Q.22 Let S = {1 , 2 , 3, …, m}, m > 3. Let X1,
matrix multiplication operation, the X2, …., Xn be subsets of S each of size
set H is 3.
a) a group Define a function f from S to the set
b) a monoid but not group of natural numbers as, f(i) is the
c) a semigroup but not a monoid number of sets X that contains the
d) neither a group nor a semigroup element i. That is f(i) = |{ j | i ∈ Xj }|.
[GATE-2005] m
Then is  f(i)
i=1
Q.18 Let X, Y, Z be sets of sizes x, y and z
respectively. Let W = X × Y and E be a) 3m b) 3n
the set of all subsets of W. The c) 2m + 1 d) 2n + 1
number of functions from Z to E is [GATE-2006]
a) z b) z × 2xy
c) 2z d) 2xyz Q.23 Let S be a set of n elements. The
[GATE-2006] number of ordered pairs in the
largest and the smallest equivalence
Q.19 The set {1 , 2 , 3 , 5 , 7 , 8 ,9} under relations on S are
multiplication module 10 is not a a)n and n b) n2 and n
group. Given below are four possible c) n2 and 0 d) n and 1
reasons. [GATE-2007]
Given below are four possible Q.24 Consider the set S = {a , b , c , d}.
reasons. Which one of them is false? Consider the following 4 partitions
a) It is not closed π1, π2 ,π3 ,π4 on
b) 2 does not have an inverse
c) 3 does not have an inverse S : π1 ={ abcd},π2{ ab,cd
d) 8 does not have an inverse π3 ={ abc,d},π4 ={ a,b,c,d}
[GATE-2006] Let ∝ be the partial order on the set
Q.20 A relation R is defined on ordered of partitions S’ = { π1 , π2 ,π3 ,π4}
pairs of integers as follows defined as follow: πi ∝ πj if and only

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
if πi is refines πj. The post diagram Q.28 For the composition table of a cyclic
for (S’ , ∝) is group shown below:
a) b) * a b c d
a a b c d
b b a d c
c c d b a
d d c a b
Which of following choices is
correct?
c) d) a) a, b are generators
b) b, c are generators
c) c, d are generators
d) d, a are generators
[GATE-2009]

Q.29 What is the possible number of


[GATE-2007] reflexive relations on a set of 5
elements?
Q.25 If P , Q , R are subsets of the a) 210 b) 215
universal set U, then c) 220 d) 225
 
 P  Q  R   Pc  Q  R  Qc  R c is [GATE-2010]

a) Qc  R c b) P  Qc  R c Q.30 Consider the set S = {1, ω, ω2},


c) Pc  Qc  R c d) U where ω and ω2 are cube roots of
unity. If * denotes the multiplication
[GATE-2008]
operation, the structure {S, *} forms
a) a group
Q.26 Which one of the following is NOT
b) a rin
necessarily a property of a Group?
c) an integral domain
a) Commutativity
d) a field
b) Associativity
[GATE-2010]
c) Existence of inverse for every
element
d) Existence of identity Q.31 How many onto (or subjective)
[GATE-2009] functions are there from an n-
element (n ≥ 2) set to a 2-element
Q.27 Consider the binary relation set?
R = {(x , y), (x , z), (z , x), (z , y)} on a) 2n b) 2n - 1
the set {x , y , z}. which one of the c) 2 - 2
n d) 2(2n - 2)
following is TRUE? [GATE-2012]
a) R is symmetric but NOT
antisymmetric Q.32 A binary operation  on a set of
b) R is NOT symmetric but integers is defined as X  Y = x2 +
antisymmetric y2. Which one of the following
c) R is Both symmetric and statements is TRUE about  ?
antisymmetric
a) Commutative but not associative
d) R is neither symmetric
b)Both Commutative and associative
norantisymmetric
c) Associative but not commutative
[GATE-2009]
d)Neither commutative nor associative
[GATE-2013]

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
that f(f(i)) = I, for all 0 ≤ i ≤ 2014.
Q.33 Let S denote the set of all functions Consider the following statements.
f:{0 , 1}4 → {0, 1}. Denote by N the P : For each function it must be the
number of functions from S to the case that for every I, f(i) = i.
set {0,1}.The value of log 2 log 2 N is Q : For each such function it must be
_______. the case that some i, f(i) = i.
[GATE-2014] R : Each such function must be onto.
Which one of the following is
Q.34 Consider the following relation on
CORRECT?
subsets of the set S of integers
a) P, Q and R are true
between 1 and 2014. For two
b) Only Q and R are True
distinct subsets U and V of S we say
c) Only P and Q are True
U < V if the minimum element in the
d) Only R is true
symmetric difference of the two sets
[GATE-2014]
in U.
Consider the following two Q.38 There are two elements x, y in a
statements: group (G, *) such that every element
S1: There is a subset of S that is in the group can be written as a
larger than every other subset. product of some number of x’s and
S2: There is a subset of S that is y’s in some order. It is known that
smaller than every other subset. x * x=y * y = x * y *x * y = y * x * y * x
Which of the following is CORRECT? =e
a) Both S1 and S2 are true where e is the identity element. The
b) S1 is true and S2 are false maximum number of element in
c) S2 is true and S1 is false such a group is ________
d) Neither S1 nor S2 is true [GATE-2014]
[GATE-2014]
x
Q.35 Let X and Y be finite sets and f : X → Q.39 If g(x)=1-x & h(x)  ,then
x 1
Y be a function. Which one of the g(h(x))
following statements is TRUE? is
h(g(x))
a) For any subsets A and B of X,
|f(A ∪ B)| = f|f(A)| + |f(B)| h(x) 1
a) b)
b) For any subsets A and B of X, g(x) x
|f(A ∩ B)| = f(A) ∩ f(B) g(x) x
c) d)
c) For any subsets A and B of X, h(x) (1  x) 2
|f(A ∩ B)| = min{|f(A)| , |f(B)|} [GATE-2015]
d) For any subsets S and T of Y,
f 1 S  T  |  f 1 S  f 1  T  Q.40 For a set A, the power set of A is
denoted by 2A.If A{5,{6},{7}}, which
[GATE-2014] of the following options are True?
Q.36 Let G be a group with 15 elements. 1. ϕ ϵ 2A 2. Φ ⊆ 2A
Let L be a subgroup of G. It is known 3. {5{6}} ϵ 2A 4. {5{6}}⊆2A
that L # G and that size of L is at a) 1 and 3 only b) 2 and 3 only
least 4. The size of L is ___________ c) 1,2 and 3 only d)1,2 and 4 only
[GATE-2014] [GATE-2015]
Q.41 Suppose ℒ={p,q,r,s,t} is a lattice
Q.37 Consider the set of all functions f:{0, represented by the following Hasse
1,….., 2014} → {0, 1, ……, 2014} such diagram:

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Boolean variables Consider the
following two statements
S1: (P#Q) # R = P # (Q# R )
S2: Q#R =R#Q
Which of the following is/ are true
for the Boolean variables P,Q, and R?
For any xy ϵ ℒ, not necessarily
a) Only S1 is True
distinct, x ∨ y and x ∧ y are join and
b) S2 is True
meet of x, y respectively. Let ℒ3={(x,
c) Both S1 and S2 are True
y ,z): x, y, z ϵ ℒ} be the set of all
d) neither S1 nor S2 are True
ordered triplets of the elements of ℒ.
[GATE-2015]
Let pr be the probability that an
elements (x, y, z) ϵ ℒ3 chosen
Q.46 Suppose U is the power set of the set
equiprobably satisfies x ∨ (y ∧ z) =
S= {1,2,3,4,5,6} For any T∈ U , let |T|
(x ∨ y) ∧ (x ∨ z). Then
denote the number of elements in T
a) pr =0 b) pr =1
and T’ denote the complement of T.
c ) 0< pr ≤1/5 d ) 1/5< pr<1
For any T, R ∈ U, let T\R be the set of
[GATE-2015]
all element in T which are not in R.
Q.42 Let R be the relation on the set of Which one of the following is true?
positive integers such that a Rb if [GATE-2015]
and only if a and b are distinct and
Q.47 Let R be a relation on the set of
have a common divisor other that 1.
ordered pairs of positive integers
Which one of the following
such that
statements about R is True?
(p, q) (r, s)) ∈ R if and only id
a) R is symmetric and reflexive but
p-s = q.r .Which one of the following
not transitive ‘
is true about R?
b) R is reflex but not reflexive and
a) Both reflexive and symmetric
not transitive
b) Reflexive but not symmetric
c) R is transitive but not reflexive
c) Not reflexive but symmetric
and not symmetric
(d) Neither reflexive nor symmetric
d) R is symmetric but not reflexive
[GATE-2015]
and not transitive
[GATE-2015] Q.48 A function f : ℕ+ → ℕ+, defined on the
set of positive integers N+, satisfies
Q.43 The cardinality of the power set of
the following properties :
{0,1,2,..,10} is ___.
f(n) = f(n+2) if n is even
[GATE-2015]
f(n) = f(n+5) if n is odd
Q.44 Let X and Y denote the sets Let R={i|∃j:f(j) = i}be the set of
containing 2 and 20 distance objects distinct values that/takes .The
respectively and F denote the set of maximum possible size of R is ___.
all possible functions defined from X [GATE-2016]
and Y. Let f be randomly chosen from
F. The probability of f being one- to Q.49 A binary relation R on N×N is
one is __ defined as follows: (a, b) R(c, d) if a
[GATE-2015] ≤ c or b ≤ d. Consider the following
propositions.
Q.45 Let # be a binary operator defined P: R is reflexive Q: R is transitive
as X#Y=X’+Y’ where X and Y are Which one of the following
statements is TRUE?

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
a) Both p and Q are true Q.51 Consider the set x  a, b,c,d,e
b) P is true and Q are false
under the partial ordering
c ) P is false and Q are true
d) Both P and Q are false R   a,a  ,  a, b  a,c  a,d  ,  a,e  ,
[GATE-2016]  b, b  ,  b,c  ,  b,e  ,  c,c  ,  c,e,  ,
Q.50 Consider a set U of 23 different
 d,d  ,  d,e  ,  e,e .
compound in a Chemistry lab. There The Hase diagram of the partial
is a subset S of U of 9 compounds, order (X,R) is shown below:
each of which reacts with exactly 3
compounds of U. Consider the
following statements:
I. Each compound in U\S reacts with
an odd number of compounds.
II. At least one compound in U\S
reacts with an odd number of
compounds.
III. Each compound in U\S reacts with
an even number of compounds
Which one of the above statements is The minimum number of ordered
ALWAYS TRUE? pairs that need to be added to R to
a) Only I b) Only II make (X,R) a lattice is ___.
c ) Only III d) None [GATE-2017]
[GATE-2016]

ANSWER KEY:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
(b) (c ) (a) (d) (a) (d) (c ) (b) (c ) (d) (a) (a) (b) (c)
15 16 17 18 19 20 21 22 23 24 25 26 27 28
(c) (b) (a) (d) (d) (a) (a) (b) (b) (c ) (d) (a) (d) (c)
29 30 31 32 33 34 35 36 37 38 39 40 41 42
(c) (a) (c) (a) 16 (a) (d) 5 (b) 4 (c) (c) (d) (d)
43 44 45 46 47 48 49 50 51
2048 0.95 (b) (d) (c) (b) (b) 0

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
EXPLANATIONS
Q.1 (b) Since R4 is reflexive and symmetric
(I) Relation R1(a, b) (a + b) is even over not transitive, so R4 is not an
the set of integers. equivalence relation.
i) a + a = 2a which is even
So (a, a) belongs to R1 Q.2 (c)
R1 is reflexive relation S1 : Let A = set of integers
ii) If (a + b) is even, then B = set of odd integers
(b + a) is also even C = set of even integers
 R1 is symmetric relation A   B  C    and  is finite set.
iii) If (a + b) and (b + c) are even Therefore, S1 is true.
then a + c = (a + b) + (b + c) – 2b S2 : Let two irrational number x and
= even + even – even= even y are respectively
 R1 is transitive relation.
Since R1 is reflexive, symmetric  
1  2 and 1  2 .  
and transitive so R1 is an So x+y =1+ 2+1-2
equivalence relation.
= 2 which is rational number
(II)R2(a, b)(a + b) is odd over set of
Therefore., S2 is true. Since both S1
integers.
and S2 are true, option (C) is true.
i) a + a = 2a which is not odd
so (a, a) doesn’t belong to R2
 R2 is not reflexive relation. Q.3 (a)
Given a function f: x → y and
Since R2 is not reflexive, it is not
subsets E and F of A then we have
an equivalence relation.
f  E  F =f  E   f  F and
(III)R3(a, b) iff a.b > 0over set of non-
zero relational numbers. f  E  F   E   f  F
i) a.a > 0 for every non-zero Therefore S1 is correct and S2 is
relational number. false.
 R3 is reflexive relation.
ii) if a.b > 0 then b.a > 0 Q.4 (d)
 R3 is symmetric relation. The empty relation on any set is
iii) if a.b >0 and b.c > 0, then a.c > 0 always transitive and symmetric but
 R3 is transitive relation. not
So R3 is an equivalence relation. reflexive.
(IV)R4 (a, b) iff |a-b|≤ over the set of
natural number Q.5 (a)
i) |a – a|≤2   {0,1}
02 *  {0,1}*
 R4 is reflexive relation.
= {ε, 0, 1, 01, 10, 11, 000,…}
ii) If |a –b|≤2 then also |b – a|≤ 2
 R4 is symmetric relation  
So * ,  is an algebraic system,
iii) If |a –b|≤2 and |b – c|≤2 then it is where  (concatenation) is a binary
not necessary that |a – c|≤ 2 operation.
Ex. |3 – 5|≤2 and |5 – 7|≤2 but |3  
So  ,  is a group if and only if the
– 7|≤2
 R4 is not transitive. following conditions are satisfied.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
(Concatenation) is a closed (a × x) + (a × y) = c ---- (i)
operation. (b × x) + ( c × y) = c --- (ii)
is an associative operation. Substitute first (x, y) = (a, a)
There is an identity. LHS of equation (i) becomes
Every element of E* has a left (a × a) + (a × a) = a + a = b
inverse Now RHS of equation (i) = c
Condition 1: * is a closed operation Therefore LHS ≠ RHS. This means
because for any w1   * and that (a, a) is not a Q.ution pair.
w2   * , w1.w2   * Similarly try each of the remaining
seven possible Q.utions pairs.
Condition 2:* For any string x, y, z ∈ It will be found that only two pairs
Ʃ*, x.(y.z) = (x.y).z (b, c) and (c, b) will satisfy both
So it is associative for example let equation (i) & (ii) simultaneously.
X = 01, y = 11, z = 00 then Therefore choice (c) is correct.
L.H.S = x.(y.z)
 01 (11 00)  01 (1100)  011100 Q.8 (b)
R.H.S = (x.y).z S = {(x, y) | y = x+1, and x, y ∈ {0, 1,
 (0111)  00  (0111)  00  011100 2, …}}
Condition 3: the identify is  or = {(0, 1), (1, 2), (2, 3), (3, 4),…}
empty string because for any string Now let T1 be the reflexive closure
w  * , of S.
T1 = {(0, 0), (1, 1), (2, 2), (3, 3)…}∪
εw = wε = w.
{(0, 1), (1, 2), (2, 3), (3, 4)…}
Now, since ε  * , identify exists. = {(0, 0), (0, 1), (1, 1), (1, 2), (2, 2),
Condition 4: There is no inverse (2,3), (3, 3), (3, 4)…}
exist for Ʃ*because any string Let T2 be the transitive closure of S.
w  * , there (0, 1), (1, 2) ∈ S ⇒ (0, 2) ∈ T2
is no string w -1 such that w.w -1 =ε. (0, 2), (2, 3) ∈ S ⇒ (0, 3) ∈ T2
So Ʃ* with the concatenation (0, 3), (3, 4) ∈ S ⇒ (0, 4) ∈ T2
operator for strings doesn’t from a and so on….
group but it Also(1, 2), (2, 3) ∈ S ⇒ (1, 3) ∈ T2
does from a monoid. (1, 3), (3, 4) ∈ S ⇒ (1, 4) ∈ T2
(1, 4), (4, 5) ∈ S ⇒ (1, 5) ∈ T2
Q.6 (d) and so on….
If a ≤ x, since p(x) ⇒p(y) whenever  T2 = {(0, 1), (0, 2), (0, 3),…..(1, 2),
x≤y (1, 3), (1, 4),…}
 p(a) ⇒p(x) Now the reflexive, transitive closure
Now since p(a) = True, p(x) = cannot of S will be T3 = T1  T2 = {(0, 0), (0,
be false. 1), (0, 2),…., (1, 1), (1, 2), (1, 3),….(2,
 (d) cannot be true. 2),
(2, 3), (2, 4),…}
Q.7 (c ) Option (b) is correct.
The possible Q. equation pairs are
(a, a), (a, b), (a, c), (b, a), (b, b), (b, c), Q.9 (c)
(a, c), (c, b) and (c, c). Substitute In a symmetric matrix, the lower
them one by one in both equations triangle must be the mirror image of
and see which of them satisfies both upper triangle using the diagonal as
the equations. mirror. Diagonal elements may be
The given equations are: anything. Therefore, when we are

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
counting symmetric matrices we Step 3:
count how many ways are there to The blank in second column must be
fill the upper triangle and diagonal c (since in a cayley table, every row
elements. since the first row has n and every column is a unique
elements, second (n–1) permutation of the row and column
elements, third row (n – 2) elements headers).
soon up to last row, one element. Now the operation table looks like
Total number of elements in * e a b c
diagonal + upper triangle e e a b c
= n + (n – 1) + (n – 2) + … + 1 a a b c e
= n(n + 1)/2 b b c a e
Now, each one of these elements can c c e - -
be either 0 or 1. So total number of
ways we can fill these elements is Step 4:
n(n+1)
Now the blanks in third row can
2 2
= power (2, (n2 + n)/2) be filled as a, e or e, a.
Since there is no choice for lower Let us try each one in turn.
triangle elements the answer is power If we fill a, e in third row the
(2, (n2 + n)/2)Which is choice (c). operation table will look like
Q.10 (d)
* e a b c
Step 1:
e e a b c
By looking at the row for e, we see
a a b c e
that it is a copy of the column
b b - - -
headers.
c c e - -
So e must be the identify element.
Since right identify and left identify
Now the blank in fourth row and
element must both be same.
third column must be filled by e.
The column corresponding to e
However this is not possible since e
must be a copy of the row headers.
is already entered in fourth row and
We can now say that the operation
Second column. Therefore, filling a,
table is
e in third row blanks is wrong. So let
* e a b c
us filling the third row blanks with
e e a b c
e, a.
a a b c e
* e a b c
b b - - -
e e a b c
c c - - -
a a b c e
b b c e a
Step 2:
c c e - -
From table above we see that a*c = e
 c*a must also be = e (if a is the Now the blanks in fourth row has to
be filled with a, b
inverse of c, then c is the inverse of
The final operation table looks like
a)
* e a b c
Now the operation table looks like
e e a b c
* e a b c
a a b c e
e e a b c
b b c e a
a a b c e
c c e a b
b b c a e
c c e - -

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Which is consistent with all the = (A  C' )-  B  C' 
rules of a Cayley Table.
The last row of this table is e, e, a, b = (AC' )- (BC' )
Therefore the correct answer is (d). =(AC' )  (BC' )'
= (AC' )  (B' +C)
Q.11 (a)
The hasse diagram of the given = (AC' ).(B' +C)
poset is =AC'B' +AC'C
=AC'B'
(since C’C = 0)
 AB' C '
(commutative property)
X=Y

Q.13 (b)

In a complete lattive L, every non


empty subset of L, has both LUB and
GLB.
Now it is necessary to add {1} since
GLB of {1, 2} and {1, 3, 5} is {1}.
The hasse diagram now becomes
The poset [{a, b, c, d, e},  ] is a
lattice (since every pair of elements
has LUB and GLB) but it is not a
distributive lattice. Because
distributive lattice satisfy the
following conditions. For any x, y, z,
x   y  z =  x  y   x  z
x   y  z   x  y   x  z
Where  and  are meet and join
Now the above hasse diagram operations but for given poset
represents a complete lattice, since [{a, b, c, d, e}  ]
every non empty subset has both b  c  d = b  a = b
LUB and GLB. Therefore adding {1}
is not only necessary but it is also
 b  c   b  d  = e  e = e
sufficient to make the given lattice a So it is not distributive. (Also,
complete lattice. element b has 2 complements c and
Therefore the correct choice is (a). d, which is
not possible in a distributive lattice,
Q.12 (a) since, in a distributive lattice,
X=  A-B - C complement if it exists, is always
unique).
=(A  B' )- C
=(A  B' )  C' Q.14 (c)
=AB'C' The set S = {1, 2, 4, 7, 8, 11, 13, 14} is
a group under multiplication
Y=  A-C  -  B-C 
modulo 15.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
The identify element for this group Note; A similar argument cannot be
is = 1 since x  S,1 x mod 15 = x made from R  S .
Now let the inverse of 4 be 4-1.
 
Now 4  41 mod 15 = e = 1 Q.16 (b)
Consider the arrow diagram shown
Since  4  4  mod 15 = 1 below
 41 = 4 (This inverse is
unique)
Similarly let the inverse of 7 be 7 1 .
 
7  71 mod 15 = 1
putting each element of set as 7 1 by
trial and error we get  7  13 mod h(a) = f  g(a) = α
15 = 91 mod 15 = 1 h(b) = f  g(b) = β
 7 1 = 13 here f is onto but g is not onto, yet h
So 4-1 and 7 1 are respectively 4 and is onto.
As can be seen from diagram if f is
13.
not onto, h cannot be onto.
Correct choice is (C).
 f should be onto, but g need not
Q.15 (c) be onto.
 answer is (b).
R ∩ S is an equivalence relation as
can be seen from proof given below.
Q.17 (a)
Let x  A  x,x   R and (x, x) ∈ S
(i) The set H is closed, since
(since R and S are reflective) multiplication of upper triangular
 (x, x) ∈ R ∩ S also  R ∩ S is matrices will result only in upper
reflective. triangular matrix.
Now, (x, y) ∈ R ∩ S (ii) Matrix multiplication is
 (x,y)  R and  x,y   S associative, i.e.
 (y,x)  R and (y, x)  S A* B*C =  A*B *C.
(since R and S are symmetric) (iii) Identity element is
 (y, x)  R  S 1 0 0 
 (x, y)  R  S I  0 1 0 
 (y, x)  R  S 0 0 1
R  S is therefore symmetric
And this belongs to H as I is an
Now consider
upper triangular as will as lower
(x, y) and (y, z) ) ∈ R ∩ S
triangular matrix.
 (x,y) and (y,z)  R
(iv) If A ∈ H, then |A| = abc. Since it
and (x, y) and (y, z) ∈ S is given that abc ≠ 0, this
 (x,z)  R and (x,z)  R means that
(Since R and S are transitive) |A| ≠ 0
 (x,z)  R  S i.e. every matrix belonging to H is
 R  S is transitive also. Since non- singular and has a unique
R  S is reflective, symmetric and inverse.
transitive.  the set H along with matrix
 R  S is equivalence relation. multiplication is a group.

Q.18 (d)

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Given |X| = x, |Y| = y and |Z| = z
W = X ×Y
So |W| = xy
|E| = 2|W| = 2xy
So the number of function for Z to E
= |E||Z|
  2 xy   2 xyz
z

Q.19 (d) Y=  E-  E  G   -  E  F
Let A = {1, 2, 3, 5, 7, 8, 9}
Construct the table for any x, y ∈ A
such that
x * y = (x.y) mod 10

* 1 2 3 5 7 8 9
1 1 2 3 5 7 8 9
2 2 4 6 0 4 6 6
3 3 6 9 5 1 4 7
5 5 0 5 5 5 0 5 So X=Y
7 7 4 1 5 9 6 3 Or alternatively the Q.ution can be
8 8 6 4 0 6 4 2 obtained from boolean algebra as
9 9 8 7 5 3 2 1 follows:
We know that 0 ∉ A. So it is not X=  E  F -  F  G 
closed. =EF-FG
Therefore, (a) is true. =EF   FG 
'

The identity element = 1


1 =EF.  F' +G ' 
 (2  2 ) mod 10 = 1
From the table we see that 2-1 does = EFF' +EFG'
not exist. = EFG '
Since, (3.7) mod 10 = 1 Similarly, Y=  E-  E  G   -  E-F
 7 is the inverse of 3 and 7 ∈ A.
 (c) is false. =  E-EG  -  E.F' 
(d) is true since 8 does not have = E.  EG  -EF'
'

inverse.
=E.  E' +G '  -EF'
Q.20 (a) =EG' -EF'
(x, y) R (u, v) iff x < u and y > v
=EG ' .  EF' 
'
(x, x) R (x, x) since x  x and x ≯ x
So R is not reflexive,  EG ' .  E '  F 
 R is neither a partial order, nor
an equivalent relation. = EE'G' +EFG'
= EFG '
Q.21 (a) Therefore, X = Y
Consider the following Venn Q.22 (b)
diagram for The problem can be Q.ved by
X=  E  F -  F  G  considering the cases m = 4 and m =
5 etc.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
m
Let m = 4
S = {1, 2, 3, 4} Therefore  f (i) =3×
i=1
m
C2 =3n
n = number of 3 elements subsets
= 4C3  4C1  4 Q.23 (b)
Let S be a set of n elements say {1,2, 3,
∴n=4 ….,n}. Now the smallest equivalence
The 4 subsets are {1, 2, 3}, {1, 2, 4}, relations on S must contain all the
{1, 3, 4} and {2, 3, 4} reflexive elements {(1, 1), (2, 2), (3,
f(1) = number of subsets having 1 as 3), …., (n, n)} and its cardinality is
an element = 3 therefore n.
f (2) = number of subsets having 2 The largest equivalence relation on S
as an element = 3 is S × S, which has cardinality of n × n
f (3) = 3 and f(4) = 3 = n2.
4
∴  f (i) = 3 + 3 + 3 + 3 = 12
i 1
∴ The largest and smallest
equivalence relations on S have
Both choice (a) and choice (b) are cardinalities of n2 and n respectively.
matching the answer since Correct choice is (b).
3m = 3n = 12
Now let us try m = 5 Q.24 (c)
∴ n = 10 A partition P1 is called refinement of
The 10 subsets are {1, 2, 3}, {1, 2, 4}, the partition P2 if every set in P1, is a
{1, 2, 5},{1, 3, 4}, {1, 3, 5}, {1, 4, 5}, subset of one of the sets in P2.
{2, 3, 4}, {2, 3, 5}, {2, 4, 5}, {3, 4, 5} π4 is a refinement of π2, π3 and π1
f(1) = f(2) = f(3) = f(4) = f(5) = 6 π2 and π3 are refinements of π1
5 π2 and π3 are not comparable since
 f(i) = 6 + 6 + 6 + 6 + 6 = 30
i=1
neither is a refinement of the other.
So the poset diagram for (S’ , <)
Clearly 3 m = 3 × 5 = 15 {is not
would
matching  f (i) }
But 3n = 3  10 = 30 {is matching
 f (i) = 30}
∴ 3 n is the only correct answer.
Correct choice is (b).
The problem can also be Q.ved in a
more general ways as follows:
m

 f (i) = f (1) + f (2)+....+f (m)


i=1
Which is choice (c)

Since f(1) = f(2)= …=f(m) = m - 1 C2 Q.25 (d)


m The given set theory expression can
Therefore  f (i) = m ×
i=1
(m-1)
C2 be converted into equivalent
Boolean algebra expression as
m × (m -1)×(m - 2) follws:
=
2 (p ∩ q ∩ r) ∪ (pc ∩ q ∩ r) ∪ qc ∪ rc
3 × m × (m -1)×(m -2) = p.q.r + p’.q.r + q’ + r’
= =3× m C3
1×2×3 = qr (p + p’) + q’ + r’
Since n = Number of three elements = qr + q’ + r’
subsets of a set of m elements = (q + q’). (r + q’) + r’
 C3
m = r + q’ + r’

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
= r + r’ + q’= 1 + q’= 1 = U Let the set be S = {a, b, c, d, e}
There are totally 52 = 25 ordered
Q.26 (a) pairs in S × S.
Group properties are closure, Any relation on S must be a subset
associativity existence of identity of S × S.
and existence of inverse for every Since we want reflexive relation, the
element. Commutativity is not five or dered pairs, namely (a, a), (b,
required for a mathematical structure b), (c, c), (d, d) and (e, e) must be
to become a group. included. That is, there is no choice
as far as these five ordered pairs are
Q.27 (d)
concerned. Remaining 52 – 2 = 20
Given R = {(x, y), (x, z), (z, x), (z, y)}
ordered pairs may or may not be
on set {x, y, z},
include (i.e. 2 ways for each ordered
here (x, y) ∈ R and (y, x) ∉ R.
pair).
∴ R is not symmetric.
So total number of possible reflexive
Also (x, z) ∈ R and (z, x) ∈ R.
relations on S is 2×2×2 … 20 times
∴ R is not antisymmetric.
=220
R is neither symmetric nor anti-
symmentric. Q.30 (a)
The set ({1, w, w2}, *) forms a group,
Q.28 (c)
as can be seed by the fact that it
If an element is a generator, all
satisfies the four group properties.
elements must be obtained as
1. Closure
powers of that elements.Try a, b, c, d
one by one to see which are the
* 1 w w2
generators.
1 1 w w2
2 w 2
a=a w 1
w2 w2 1 w
a2 = a.a = a
a3 = a.a2 = a.a = a and so on. From above operation table, we can
∴ a is not the generator. see that given operation is closed,
b=b on the given set.
b2 = b.b = a 2. Associative: ‘*’ is an associative
b3 = b.b2 = b.a = b operation.
b4 = b.b3 = b.b = a and so on. 3. Identify : From operation table,
∴ b is not the generator we can see that the identity
c=c element, is “1”.
c2 = c.c = b 4. Inverse : From operation table
c3 = c.c2 = c.d = d we can see that inverse of 1 is 1,
c4 = c.c3 = c.d = a inverse of w is w2 and inverse of
Since all of a, b, c, d have been w2 is w.
generated as powers of c, So, ({1, w, w2}, *) is a group.
∴ c is a generator of this group. To be ring, integral domain or field,
Similarly we need two binary operations to be
d=d specified, whereas here we have
d2 = d.d = b only one operation given. So, choice
d3 = d.d2 =d.b = c (a) is correct.
d4 = d.d3 = d.c = a
∴ d is the generator. Q.31 (c)
Q.29 (c) Let n = 2. There are only 2 onto
functions as shown below.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.35 (d)
Example:

For n = 2
Options (a) 2n = 22 = 4
Options (b) 2n – 1 = 22 – 1 = 3
Options (c) 2n – 2 = 22 – 2 = 2 Let A = {1, 2}, B = {3, 4}
Options (d) 2(2n – 2) = 2(22 – 2) = 4 (a) |f(A ∪ B) = |f(A) + f(B)|
So only option (c) gives correct  3 = 2 + 2 is false
answer. (b) f(A ∩ B) = |f(A) ∩ f(B)|
 f = {a} is false
Q.32 (a) (c) |f(A ∩ B) = min {|f(A)| , |f(B)|}
x ⊕ y = x2 + y2  0 = 2 is false
y ⊕ x = x2 + y2 (d) Let S = {a, b}, T = {a, c}
As ‘+’ sign in commutative so x2 + y2 f-1(S ∩ T) = f-1(S) ∩ f-1(T)
is equal to y2 + x2 so x ⊕ y is  {1, 3} = {1, 2, 3} ∩ {1, 3, 4}
commutative. Now check  {1, 3} = {1, 3} is true
associativity
x ⊕ (y ⊕ z) = x ⊕ (y2 + z2) Q.36 (5)
= x2 + (y2 + z2)2 Order of subgroup divides order of
= x2 + y4 + z4 + 2y2z2 group (Lagrange’s theorem). 3, 5
(x ⊕ y) ⊕ z = (x2 + y2) ⊕ z and 15 be the order of subgroup. As
= (x2 + y2)2 + z2 subgroup has at least 4 elements
= x4 + y4 +2x2y2 + z2 and it is not equal to the given
x ⊕ (y ⊕ z) ≠ (x ⊕ y) ⊕ z group, also, order of subgroup can’t
So not associative. be 3 and 15.
Hence it is 5.
Q.33 (16)
f : {0 ,1}4 → {0 , 1}  f is 16 Q.37 (b)
elements set to 2 elements set. f (f (i)) = i
|S| = 216 = sell of all functions of f. Number of elements are odd
[ Q Number of functions from S to 2 ∴ ∃i, f(i) = i
16 For every i, f(i) need not be true
elements set {0 , 1} = 22 ]
16
Example: f(f(i)) = i
N = 22 Take i = 2, f(2) = 3 and f(3) = 2
16
∴ log log N=log log 22 =log 216 = 16
 f(f(2)) = 2
 f(3) = 2
 2=2

Q.34 (a) Q.38 (4)


S1 : S itself larger than every other G = {1, a, a-1, a*a-1}
subset.
S2 : ∅ is smaller than every other Q.39 (c)
subset. x
g(x) =1-x , h(x) 
∴ S1 and S2 are correct. x 1

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
 x  x ∴ P (satisfying distributive property)=
g  1 1- p (violate the distributive
g(h(x)) x 1 
   x 1
property)
h(g(x)) h(1  x) 1  x
6
1  x 1  1  3  0.952 which is between
x 1  x 1 5
1/5 and 1.
 x 1  x 1
1 x 1 x
x x Q.42 (d)
x x aRb iff a and b are distinct a and b
  have a common divisor other than 1.
(x  1)(1  x) (1  x) 2
(i) R is not reflexive since a and b
x are distinct i.e (a,a) ∉ R
h(x) x  1 x x (ii) R is symmetric
  
g(x) 1  x (1  x)(x  1) (1  x) 2 If a and b are distinct and have a
g(h(x)) h(x) common divisor other than 1, then b
  and a also are distinct and have a
h(g(x)) g(x)
common divisor other than 1.
(iii)R is not transitive
Q.40 (c)
If (a,b)∈ R and (b,c) )∈ R then (a,c )
A= {5,{6},{7}}
need be in R.
1.  2A is true. Any power set Example : (2,6) )∈ R and (6,2) ∈ R
contains an empty set. but (2,2) ∉ R
2.   2A is true. Empty set is subset ∴ R is symmetric but not reflexive
of any set. and not transitive .
3. {5,{6}  2A is true. Power set of A Q.43
contain {5){6}} as a 2 elements Let X={0,1,2…10}
subset of A. |X|=1
4. {5,{6}  2A is false. Power set of A |P(X)| =211 =2048
not contain 5 and {6} as elements.
So{5,{6}} can not be subset of 2A. Q.44

Q.41 (d)
ℒ has 5 elements ℒ3 has all ordered
triplets of ℒ
⇒ ℒ3 contains
Total possible functions = 202 = 400
5×5×5=53=125elements.
Number of one to one functions
 20P2  20 19
∴ Required probability
20 19
  0.95
20  20

Q.45 (b)
X#Y=X’+Y’
If q,r,s are chosen , then only it will This is the NAND operation. NAND is
violate the distributive property. known to be commutative but not
Number of ways to choose q,r,s in associative So only S2 is true.
any triplet order = 3!=3=3×2×1=6.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.46 (d) ((p,q),(r,s))  R  p  s  q  r
S={1,2,3,4,56} ((r,s),(p,q))  R  r  q  s  p
U is the power set of S ⇒ U=P(S) If p-s = q-r is true, then r-q = s-p is
U={{ } also true by rearranging the
{},{2},…{1,2},{1,3},…{1,2,3},… equation.
{1,2,3,4},,…{1,2,3,4,5}…{1,2,3,4,5,6}} ∴ R is symmetric.
|U| = 26 = 64 elements.
T∈ U ⇒ T’ ∈ U Q.48
R ∈ U,T\R =T-R n
f (n)  f   id n is even
(a) X  U(| X | = | X' |) means that 2
every subset of S has same size as its 
f : N  f (n  5) if n is odd
complements. Clearly this is False.
f : N  N
(For example, {1} ∈ U, and
2
complement of {1} = {2,3,4,5,6} Now f (2)  f    f (1)
(b) X  UY  U 2
(| X | 2,| Y | 5andX  Y  ) 8
f (3)  f (3  5)  f (8)     f (4)
Means that there are two 5 elements 2
subsets of S which have nothing in 4
common. This is clearly False.  f    f (2)  (1)
Since any two 5 elements subsets 2
will have at least 4 elements in So f (1)  f (2)  f (3)  f (4)  f (8)
common. Now let us find
(c ) X  UY  U  10 
f (5)  f (5  5)  f (10)  f  
(| X | 2,| Y | 3andX \ Y  )  2
Means that every 2 elements subset  f (5)f (5)  f (10)
X and every 3 element subset Y will Now let us find f (9)
have X-Y=ϕ i.e. X ⊆ Y.  14 
This is clearly False as can be seen f (9)  f (9  5)  f (14)  f    f (7)
 2
from the example X= {1,2},Y={3,4,5}
where  12 
 f (7  5)  f (12)  f    f (6)
X ⊈ Y-  2
(d X  U Y  U(X \ Y  Y'\ X') So. f (9)  f (7)  f (6)
means that for any two subsets X So the maximum no. of distinct
and Y,X\Y =Y’\X’ i.e. X-Y= Y’-X’. values / takes in only 3.
This is clearly True since by Boolean First is f (1) = f (2) = f (3) = f (4) = f (8)
algebra Second is f (5) = f (10)
LHS = X-Y=XY’ Third is f (6) = f (7)
RHS=Y’-X’=Y’X and therefore All other n value will given only one
LHS= RHS of these three values
For n >10 , it will be equal to one of
Q.47 (c) f(1) f(2) …. F(10)
R ={p, q},{r, s}|p-s = q-r} So the maximum no. of distinct
(i) Check reflexive property value f takes is only 3.
(p,q)  Z  Z ((p,q),(p,q)  R First is f (1) = f (2) = f (3) = f (4) = f (8)
Second is f (5) = f (10)
Is true iff p- q=q-p which is false. So
Third is f (6) = f (7) = f (9)
relation R is not reflexive
All other n values will give only one
(ii) Check symmetry property
of these three values.
If ((p,q),(r,s))  R((r,s),(p,q))  R

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.49 (b)
(a, b) R (c. d) if a ≤ c or b ≤d
P: R is reflexive
Q: R is transitive
Since (a, b) R (a, b) ⇒ a ≤ a or b ≤ b
⇒ t or t
Which is always True, R is reflexive.
Now let us check transitive property
Let (a, b) R (c, d) ⇒ a ≤ c or b ≤ d
And (c, d) R (e, f) ⇒ c ≤ e or d ≤ f
Now let us take a situation
a ≤ c (True) or b ≤ d(false)
and c ≤ e (False) or d ≤ f (True)
Now we can get neither a ≤ e nor b ≤ f
So, (a, b) R (c, d) and (c, d) R (e, f) ⇏
(a, b) R (e,f). So clearly R is not
transitive. So P is true and Q is false.
Choice (b) is correct.

Q.50 (b)
I. If there is a subset of 9 component
out of 23 component each of which
reacts with exactly 3 components, it
does not mean that every
component of U reacts with odd
number of components . So I is false.
II. Since there are 9 components in U
which react with exactly 3 (odd)
components, So II is true.
III. is false, since some of
components in U reacts with odd
number of components.
So only II is true.

Q.51 (0)
Since the given hasse diagram is
already a lattice, three is no need to
add any ordered pair, So answer is 0.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
3 NUMBER THEORY & COUNTING

Number theory is about integers and their This is easy to see: if n is a composite
properties. We will start with the basic integer, it must have at least two prime
principles of divisors. Let the largest two be p1and p2.
• divisibility, Then p1p2<= n.
• greatest common divisors, p1and p2cannot both be greater than,
• least common multiples, and because then p1p2> n.
• modular arithmetic Division Algorithm
Let a bean integer and d a positive integer.
3.1 DIVISION Then there are unique integers q and r,
with 0 r < d, such that a = dq + r. In the
If a and b are integers with a 0, we say that above equation,
a divides b if there is an integer c so that b • d is called the divisor,
= ac. • a is called the dividend,
When a divides b we say that is a factor of • q is called the quotient, and
b and that b is a multiple of a. • r is called the remainder.
The notation a | b means that a divides b.
We write a χ b when a does not divide b. 3.3 GREATEST COMMON DIVISOR
Divisibility Theorems
For integers a, b, and c it is true that Let a and b be integers, not both zero.
• if a | b and a | c, then a | (b + c) The largest integer d such that d | a and d |
b is called the greatest common divisor of
Example: 3 | 6 and 3 | 9, so 3 | 15. a and b.The greatest common divisor of a
• if a | b, then a | bc for all integers c and b is denoted by gcd(a, b).
Example: 5 | 10, so 5 | 20, 5 | 30, 5 | 40 … Example 1:
• if a | b and b | c, then a | c What is gcd(48, 72) ?
The positive common divisors of 48 and 72
Example: 4 | 8 and 8 | 24, so 4 | 24. are 1, 2, 3, 4, 6, 8, 12, 16, and 24, so gcd(48,
72) = 24.
3.2 PRIME NUMBERS
Example 2:
A positive integer p greater than 1 is called
What is gcd(19, 72) ?
prime if the only positive factors of p are 1
The only positive common divisor of 19
and p.
and 72 is1, so gcd(19, 72) = 1.
Note: 1 is not a prime
USING PRIME FACTORIZATIONS:
A positive integer that is greater than 1 and
a = p1a1 p2a2 … pnan , b = p1b1 p2b2 … pnbn ,
is not prime is called composite. The
Where p1< p2< … < pn and ai, bi Nfor 1≤ i
fundamental theorem of arithmetic:
Every positive integer can be written ≤n
uniquely as the product of primes, where gcd(a, b) = p1min(a1, b1 )p2min(a2, b2 ).. pnmin(an, bn )
the prime factors are written in order of
increasing size. Examples:
If n is a composite integer, then n has a a = 60 = 223151
prime divisor less than or equal. B = 54 = 213350
Gcd(a,b) = 213150 = 6

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Relatively Prime Integers: Two integers a Theorem:
and b are relatively prime if gcd(a, b) = 1. a*b = gcd (a, b)*lcm(a, b)

Examples: 3.5 MODULAR ARITHMETIC


Are 15 and 28 relatively prime?
Yes, gcd(15, 28) = 1. Let a bean integer and m is a positive
Are 55 and 28 relatively prime? integer. We denote by a mod m the
Yes, gcd(55, 28) = 1. remainder when a is divided by m.
Are 35 and 28 relatively prime?
No, gcd(35, 28) = 7. Example:
Definition: The integers a1, a2, …, an area 9 mod 4 = 0
pair wise relatively prime if gcd(ai, aj) = 1 -13 mod 4 = 3
whenever 1≤ i < j≤ n.
Congruence:
Examples: Let a and b be integers and m be a positive
Are 15, 17, and 27 pairwise relatively prime? integer. We say that a is congruent to b
No, because gcd(15, 27) = 3. modulo m if m divides (a –b). We use the
Are 15, 17, and 28 pairwise relatively prime? notation a b (mod m) to indicate that a is
Yes, because gcd(15, 17)=1, gcd(15,28) = 1 congruent to b modulo m. In other words: a
and gcd(17, 28) = 1. b (mod m) if and only if a mod m = b
mod m.
THE EUCLIDEAN ALGORITHM
Example:
The Euclidean Algorithm finds the greatest
1. Is it true that 46 68 (mod 22)?
common divisor of two integers a and b.In
Yes, because 22 | (46 –68).
pseudo code, the algorithm can be
2. For which integers z is it true that z 12
implemented as follows:
(mod 10)?
Procedure gcd(a, b: positive integers)
It is true for any z{…,-28, -18, -8, 2, 12,
x := a
22, 32, …}
y := b
while y ≠ 0 Theorem:
begin Let m be a positive integer. The integers a
r := x mod y and b are congruent modulo m if and only if
x := y there is an integer k such that a = b + km.
y := r
end{x is gcd(a, b)} Theorem:
Let m be a positive integer. If a b (mod
3.4 LEAST COMMON MULTIPLES m) and c d (mod m), then a + c b + d
The least common multiple of the positive (mod m) and ac bd (mod m).
integers a and b is the smallest positive
integers that is divisible by both a and b. Theorem:
We denote the least common multiple of a Let m be a positive integer. a b (mod m)
and b by lcm(a,b). iff a mod m = b mod m.
Example: 3.6 BASIC COUNTING PRINCIPLES
l cm(3,7) = 21
l cm(4,6) = 12 Counting problems are of the following
l cm(5,10) = 10 kind:

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
“How many different 8-letter passwords one, and 26 for the last one. So there are
are there?” 26*26*26 = 17576 different license plates.
“How many possible ways are there to pick
11 soccer players out of a 20-player team?” GENERALIZED PRODUCT RULE:
Most importantly, counting is the basis for
computing probabilities of discrete If we have a procedure consisting of
events. sequential tasks T1, T2, …, Tm that can be
(“What is the probability of winning the done in n1, n2, …, nm ways, respectively,
lottery?”) then there are n1*n2*…* nm ways to carry
out the procedure. The sum and product
The sum rule: rules can also be phrased in terms of set
If a task can be done in n1ways and a theory.
second task in n2ways, and if these two
tasks cannot be done at the same time, then SUM RULE:
there are n1+ n2ways to do either task.
Example: Let A1, A2, …, Am be disjoint sets. Then the
number of ways to choose any element
The department will award a free computer from one of these sets is |A1 U A2U… UAm|
to either a CS student or a CS professor. =|A1| + |A2| + … + |Am|.
How many different choices are there, if
there are 530 students and 15 professors? PRODUCT RULE:
There are 530 + 15 = 545 choices.
Let A1, A2, …, Am be finite sets. Then the
GENERALIZED SUM RULE: number of ways to choose one element
from each set in the order A1, A2, …, Am is
If we have tasks T1, T2, …, Tm that can be |A1xA2x… xAm| = |A1| |A2| … |Am|.
done in n1, n2, …, nm ways, respectively, and
no two of these tasks can be done at the 3.7 INCLUSION – EXCLUSION PRINCIPLE
same time, then there are n1+ n2+ … + nm
ways to do one of these tasks. How many bit strings of length 8 either
start with a 1 or end with 00?
THE PRODUCT RULE:
Task 1:
Suppose that a procedure can be broken Construct a string of length 8 that starts
down into two successive tasks. If there are with a 1.
n1 ways to do the first task and n2 ways to There is one way to pick the first bit (1),
do the second task after the first task has two ways to pick the second bit (0 or 1),
been done, then there are n1n2 ways to do two ways to pick the third bit (0 or 1),
the procedure. .
.
Example: two ways to pick the eighth bit (0 or 1).
can be done in 27= 128 ways.
How many different license plates are there
that containing exactly three English Task 2:
letters?
Construct a string of length 8 that ends
Solution: with 00.
There are 26 possibilities to pick the first There are two ways to pick the first bit (0
letter, then 26 possibilities for the second or 1),

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
two ways to pick the second bit (0 or 1),
two ways to pick the sixth bit (0 or 1), Example 1:
one way to pick the seventh bit (0), and If there are 11 players in a soccer team that
one way to pick the eighth bit (0). wins 12-0, there must be at least one player
in the team who scored at least twice.
PRODUCT RULE:
Example 2:
Task 2 If you have 6 classes from Monday to
Can be done in 26= 64 ways. Friday, there must be at least one day on
Since there are 128 ways to do Task 1 and which you have at least two classes.
64 ways to do Task 2, does this mean that
there are 192 bit strings either starting The generalized pigeonhole principle: If
with 1 or ending with 00? N objects are placed into k boxes, then
No, because here Task 1 and Task 2 can be there is at least one box containing at least
done at the same time.  N / K  of the objects.
When we carry out Task 1 and create
strings starting with 1, some of these Example 1:
strings end with 00.Therefore, we In our 60-student class, at least 12 students
sometimes do Tasks 1 and 2 at the same will get the same letter grade (A, B, C, D, or F).
time, so the sum rule does not apply. If
we want to use the sum rule in such a case, 3.8 PERMUTATIONS & COMBINATIONS
we have to subtract the cases when Tasks 1
and 2 are done at the same time. How many ways are there to pick a set of 3
How many cases are there, that is, how people from a group of 6?
many strings start with 1 and end with 00? There are 6 choices for the first person, 5
There is one way to pick the first bit (1), for the second one, and 4 for the third one,
two ways for the second, …, sixth bit (0 or so there are 6.5.4 = 120 ways to do this.
1), one way for the seventh, eighth bit (0). This is not the correct result!
For example, picking person C, then person
PRODUCT RULE: A, and then person E leads to the same
group as first picking E, then C, and then A.
In 25= 32 cases, Tasks 1 and 2 are carried However, these cases are counted
out at the same time. separately in the above equation.
Since there are 128 ways to complete Task So how can we compute how many
1 and 64 ways to complete Task 2, and in different subsets of people can be picked
32 of these cases Tasks 1 and 2 are (that is, we want to disregard the order of
completed at the same time, there are 128 picking)?
+ 64 –32 = 160 ways to does either task. To find out about this, we need to look at
In set theory, this corresponds to sets permutations.
A1and A2 that are not disjoint. A permutation of a set of distinct objects is
Then we have:|A1UA2| = |A1| + |A2| -|A1∩A2| an ordered arrangement of these objects.
This is called the principle of inclusion- An ordered arrangement of r elements of a
exclusion. set is called an r-permutation.
THE PIGEONHOLE PRINCIPLE Example:
Let S = {1, 2, 3}.
If (k + 1) or more objects are placed into k The arrangement 3, 1, 2 is a permutation of S.
boxes, then there is at least one box The arrangement 3, 2 is a 2-permutation of S.
containing two or more of the objects.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
The number of r-permutations of a set with How many ways are there to pick a set of 3
n distinct elements is denoted by P(n,r). people from a group of 6 (disregarding the
We can calculate P (n, r) with the product order of picking)?
rule: C (6, 3)=6! / (3! 3!)=720/(6.6)=720/36= 20
P (n, r) = n (n –1) (n –2) … (n –r + 1). There are 20 different ways, that is, 20
(n choices for the first element, (n –1) for different groups to be picked.
the second one, (n –2) for the third one…)
COROLLARY:
Example:
Let n and r be nonnegative integers with r≤ n.
P(8, 3) = 8.7.6 = 336
Then C (n, r) = C (n, n –r).
= (8.7.6.5.4.3.2.1)/(5.4.3.2.1)
Note that “picking a group of r people
GENERAL FORMULA:
from a group of n people” is the same as
“splitting a group of n people into a
P(n, r) = n!/(n –r)!
group of r people and another group of
Knowing this, we can return to our initial
(n –r) people”.
question:
How many ways are there to pick a set of 3
Example: A soccer club has 8 female and 7
people from a group of 6 (disregarding the
male members. For today’s match, the
order of picking)?
coach wants to have 6 female and 5 male
An r-combination of elements of a set is an
players on the grass. How many possible
unordered selection of r elements from the
configurations are there?
set. Thus, an r-combination is simply a
C (8, 6). C (7, 5) = 8! / (6! 2!). 7! / (5! 2!)
subset of the set with r elements.
= 28.21
= 588
Example:
Let S = {1, 2, 3, 4}.
Pascal’s Identity:
Then {1, 3, 4} is a 3-combination from S.
The number of r-combinations of a set with Let n and k be positive integers with n ≥ k.
n distinct elements is denoted by C(n, r). Then C(n + 1, k) = C(n, k –1) + C(n, k).
Expressions of the form C(n, k) are also
Example: called binomial coefficients.
C (4, 2) = 6, since, for example, the 2- How come?
combinations of a set {1, 2, 3, 4} are {1, 2}, A binomial expression is the sum of two
{1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}. terms, such as (a + b).
How can we calculate C (n, r)? Now consider (a + b)2 = (a + b)(a + b).
Consider that we can obtain the r- When expanding such expressions, we have
permutation of a set in the following way: to form all possible products of a term in
First, we form all the r-combinations of the the first factor and a term in the second
set (there are C (n, r) such r-combinations). factor:
Then, we generate all possible orderings in (a + b)2= a·a + a·b + b·a + b·b
each of these r-combinations (there are P(r, Then we can sum identical terms:
r) such orderings in each case). (a + b)2= a2+ 2ab + b2
Therefore, we have: This leads us to the following formula:
P (n, r) = C (n, r)P(r, r)
C (n, r) = P (n, r)/P(r, r) Binomial Theorem:
= n! / (n –r)! /(r! /(r –r)!) n

= n! /(r! (n –r)!) (a  b)n   C(n, j).a n  jb j


j 0
Now we can answer our initial question:

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
GATE QUESTIONS
Q.1 How many 4 digits even numbers  2n 
have all 4 digits distinct? a)   * 2n b) 3n
n 
a) 2240 b) 2296
c) 2620 d) 4536 (2n)!  2n 
c) n d)  
[GATE-2001] 2 n 
[GATE-2003]
Q.2 The solution to the recurrence
equation T(2k )  3T(2k 1 )  1,T(1)  1 Q.6 Mala has a colouring book in which
is each English letter is drawn two
(3k 1  1) times. She wants to paint each of
a) 2k b) these 52 prints with one of k
2
log 2 k log3 k colours, such that the colour- pairs
c) 3 d) 2 used to colour any two letters are
[GATE-2002] different. Both prints of a letter can
also b coloured with the same
Q.3 The minimum number of colors colour. What is the minimum value
required to colour the vertices of a of k that satisfies this requirement?
cycle with n nodes in such a way a) 9 b) 8
that no two adjacent nodes have the c) 7 d) 6
same colour is [GATE-2004]
a) 2 b) 3
n  Q.7 What is the minimum number of
c) 4 d) n  2    2
2 ordered pairs on non- negative
[GATE-2002] numbers that should be chosen to
ensure that there are two pairs (a,
Q.4 Let A be a sequence of 8 distinct b)and (c, d) in the chosen set such
integers sorted in ascending order. that a ≡ c and b ≡ d mod 5
How many distinct pairs of a) 4 b) 6
sequences, B and C are there such c) 156 d) 24
that (i) each is sorted in ascending [GATE-2005]
order, (ii) B has 5 and C has 3

elements, and (iii) result of merging
B and C gives A? Q.8 Let G(x)  1/ (1  x) 2   g(i)x i
i 0
a) 2 b) 30 where |x|<1 What is g(i)?
c) 56 d) 256 a) i b) i+1
[GATE-2003]
c) 2i d) 2i
[GATE-2005]
Q.5 In couples are invited to a party
with the condition that every
Q.9 For each element in a set of size 2n,
husband should be accompanied by
an unbiased coin it’s tossed. The 2n
his wife. However, a wife need not
coins tossed are independent, an
be accompanied by her husband.
element is chosen if the
The number of different gatherings
corresponding coin toss were head.
possible at the party is

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
The probability that exactly n Q.13 The value of x 5 is
elements are chosen is a) 5 b) 7
2 2 c) 8 d) 13
a)   4n b)   2n
n n [GATE-2008]
2 1
c) 1   d) Q.14 In how many ways can be blue balls
n d
and r red balls be distributed in n
[GATE-2006] distinct boxes?
(n  b  1)!(n  r  1)!
Common Data for Q.10 & Q.11 a)
Suppose that a robot is placed on the (n  1)!b!(n  1)!r!
Cartesian plane. At each step it is allowed (n  (b  r)  1)!
b)
to move either one unit up or one unit (n  1)!(n  1)!(b  r)!
right, i.e. if it is at (I,j) then it can move to n!
either (i+1,j)or (i,j+1) c)
b!r!
d) (n  (b  r) 1)!/ n!(b  r 1)
Q.10 How many distinct paths are there
[GATE-2008]
for the robot to reach the point (10,
10) staring from the initial position
Q.15 A pennant is a sequence of number,
(0, 0)?
each number being 1 or 2. An n-
 20  pennant is a sequence of number
a)   b) 220
 10  with sum equal to n. For example (1,
c) 210 d) None of these 1, 2) s a 4 pennants. The set of all
[GATE-2007] possible 1 pennant is {(1)}, the set
of all possible 2-pennants is
Q.11 Suppose that the robot is not {(2),(1,1} and the set of all 3 –
allowed to traverse the line segment pennants is {2,1),(1,1,1),(1,2}. Note
from (4,4) constraint, to (5,4). With that the pennant (1, 2) is not the
this constraint, how many distinct same as the pennant (2,1) The
paths are there for the robot to number of 10 pennants is ____.
reach (10, 10) staring from (0, 0)? [GATE-2014]
a) 29 b) 219
Q.16 Each of the nine words in the
 8  11  20   8  11
c)      d)         sentence “The quick brown n for
 4 5  10   4   5  jumps over the lazy dog” is written
[GATE-2007] on a separated piece of paper .
These nine pieces of paper are kept
Common Data for Q.12 & Q.13 in a box. One of the pieces is drawn
Let x n denote the number of binary strings at random from the box. The
of length n that contain no consecutives 0s. expected length of the word drawn
is ____ (The answer should be
Q.12 Which of the following recurrences rounded to one decimal place.
does x n satisfy? [GATE-2014]
a) x n  2x n.1 b) x n  x|n/2]  1
Q.17 The Number of distinct positive
c) x n  x|n/2]  n d) x n  x n.1  x n.2 integral factors of 2014 is ___.
[GATE-2008] [GATE-2014]

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
99
1 Q.23 The coefficient of x12 in
Q.18 
x 1 x(x  1)
 ______
(x3  x 4  x 5  x 6  ...)3
[GATE-2015] [GATE-2016]

Q.19 Let a n represent the number of bit Q.24 Consider the recurrence relation
strings of length n containing two a1  8,a n  6n 2  2n  a n 1
consecutive 1s. What is the Let a 99  K 104 The value of K is
recurrence relation for a n ? [GATE-2016]
a) a n 2  a n 1  2n 2
b) a n 2  2a n 1  2n 2 Q.25 The n-bit fixed-point representation
of an unsigned real number X uses f
c) 2a n 2  a n 1  2n 2 bits for the fraction part. Let i = n – f.
d) 2a n 2  2a n 1  2n 2 The range of decimal values for X in
[GATE-2015] this representation is
a) 2f to 2i b)
Q.20 The number of divisors of 2100 is f
2 to 2  2i

f

___
c) 0 to 2i d)
[GATE-2015]
0 to  2i  2f 
Q.21 The number of 4 digits numbers [GATE-2017]
having their digits in non-
decreasing order (from left to right Q.26 The number of integers between 1
) constructed by using the digits and 500 (both inclusive) that are
belonging to the set {1,2,3}is ____. divisible by 3 or 5 or 7 is _______.
[GATE-2015] [GATE-2017]
Q.27 Consider quadratic equation
Q.22 Let a n be the number of n- bit
x 13x  36  0 with coefficients in
2

strings that do NOT contain two a base `b’. The solution of this
consecutive 1s. Which one of the equation in the same base ‘b’ are x
following is the recurrence relation =5 and x= 6. Then b = ______.
for a n ? [GATE-2017]
a) a n  a n 1  2a n 2
b) a n  a n 1  a n 2
c) a n  2a n 1  a n 2
d) a n  2a n 1  2a n 2
[GATE-2016]

ANSWER KEY:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
(b) (b) (d) (c) (b) (d) (c) (b) (a) (a) (d) (d) (d) (a)
15 16 17 18 19 20 21 22 23 24 25 26 27
89 3.9 8 0.99 (a) 36 15 (b) (10 198 (d) 271 8

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
EXPLANATIONS
Q.1 (b) Therefore, the complete solution is
The digits are given to be distinct i.e. 1
T(2k )  C1 (3) k 
no repetition. 4 digit even numbers 2
cannot start with 0 and must end Given T(1)  1
with 0,2,4,6 or 8. 1
Since there is a condition for 0 in 1  C1 (3)0 
starting as well as ending we will 2
1
count the even number ending with 1  C1 
0 separately. 2
So the total number of 4 digit even 3
C1 
number =4 even numbers ending 2
with zero + 4 digit even numbers So the complete solution is
ending with 2,4,6,8 3 1
4 digit even numbers ending with 0 T(2k )  (3) k 
2 2
= k 1
3 1
T(2k ) 
2
4 digit even numbers ending with 2,
Q.3 (d)
4,
The minimum number of colours
required to colour the vertices of a
6, 8= cycle with n nodes
So the total number of 4 digit even =2, when n is even
numbers = 504 +1792 =2296 =3 when n is odd
n 
Q.2 (b) Therefore n  2    2 gives 2 when
2
T(2k )  3T(2k 1 )  1 n is even and 3 when n is odd.
Let T(2k )  x n
 x n  3x n 1  1 Q.4 (c)
This corresponds to an ordered
 x n  3x n 1  1
partition of 8 elements into two
So for Homogenous solution groups, the first with 5 elements and
x n  3x n 1  0 second with 3 elements. The
n 3  0 number of ways of doing this is
n 3 8!
Homogenous solution is P(8;5,3)   56
5!3!
x n  C1 (3)n
T(2k )  C1 (3)k Q.5 (b)
For each of the n couples invited to
For Particular solution
the party one of three thing is
Let d be the particular solution
d  3d  1
possible.
2d  1
1. both husband and wife attend the
party
1
d 2. wife only attends the party
2

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission

3. neither husband nor wife attends
the party Since there are n such   (r 1) C1x r
r 0
couples,total number of possibilities 
= 3n   (r  1)x r
r 0

Q.6 (d)   (i  1)x i
The problem reduces to finding how r 0
many distinct ordered colour pairs (Since r is a dummy variable, r can
(C1 , C2 ) are possible with k colors. be replaced by i)

Since the first color C1 can be any
  g(i)x i
one of the k colours and the second r 0

color C 2 also can be any one of the k  g(i)  i  1


colors ( both prints of a letter can be
colored with same color.) the total Q.9 (a)
no. of such order color pairs is equal The probability that exactly n
to k  k  k 2 elements are chosen = The
Since each pair of letters must be probability of getting n heads out of
colored with different color pairs, at 2n tosses
least 26 color Paris are required to 2n Cn (1/ 2)n (1/ 2)2n n (Binomial
do this. formula)
Therefore the requirement is 2n Cn (1/ 2)n (1/ 2)n
k 2  26 2n
Cn 2n Cn 2n Cn
The minimum value of k that   2 n  n
satisfies this equation is k = 6. 22n (2 ) 4

Q.7 (c) Q.10 (a)


The number of combinations of Consider the following diagram
pairs 9 a mod 2, b mod 5) is 3×5
=15 ( since a mod 3 can be 0,1 , or 2)
and b mod 5 can be 0,1,2,3,or 4)
∴ If 16 different ordered pairs are
chosen at least 2 of them must have
( a mod 3, b mod 5 ) as same ( basic
pigeon hole principle ).
Let such two pairs be (a, b) and (c,
d) then The robot can move only right or up
a mod 3 ≡ c mod 3⟹a ≡ c mod 3 as defined in problem Let us denote
and b mod 5 ≡ d mod 5⟹b ≡ d mod 5 right move by ‘R’ and up move by ‘U’
, Now to reach (3,3) from (0,)) the
Q.8 (b) robot has to make exactly 3‘R’
1  moves and 3’U’moves in any order.
(1  x) n
 
r 0
(n 1 r)
Cr x r Similarly to reach (10, 10) from (
0,0) the robot has to make 10 ‘R’
Put n = 2, moves and 10 ‘U’ moves in any

1
(1  x) n
 
r 0
(2 1 r)
Cr x r order. The number of was this can
be done is same as number of per
 mutations of a word consisting of 10
  (r 1) Cr x r ‘R’s and 10 U’s.
r 0

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Applying formula of permutation
with limited repetitions we get the
20! 20
answer as  C10 .
10!10!
Q.11 (d)
The robot can reach (4,4) from (0,0) x2=3
in ways as argued in previous Let
problem. Now after reaching (4,4), n =3
robot is not allowed to go to (5,4).
Let us count how many paths are
there from (0,0) to (10,10) if robot
goes from (4,4) to (5, 4) and then we
can subtract this from total number
of ways to get the answer.
Now there are 8C4 ways for robot to
reach (4,4) from (0,0) and then X3=5
robot takes the ‘U’ move from (4,4)
to (5,4). Now from (5,4) to (10,10)
the robot has to make 5’U’ moves Now substituting n = 3 in all of the
and 6’R’ moves in any order which answers only choice (d)
11! x n  x n 1  x n 2 satisfies the
can be done ways = 11 C5 ways. numbers obtained from the tree
5!6!
∴ The number of ways robot can counting.
move from (0,0) (10,10) via (4,4) –
(5,4) move is Q.13 (d)
 8  11 x1  2, x 2  3
8
C4 11 C5        x3  x1  x 2  2  3  5
 4 5 
∴ Number of ways robot can move  x 4  x 2  x3  3  5  8
(from (0,0) to(10,10) without using  x5  x3  x 4  5  8  13
(4,4) to (5,4) move is So option (d) correct .
 20   8  11
        ways .which is Q.14 (a)
10   4   5 
option (d) R red balls can be distributed into n
distinct boxes in C(n-1+r,r) = (n-1+
Q.12 (d) r)1 (n-1)!r! b blue balls can be
The √ represents those strings with distributed in C (n-1+ b, b) = n-1+b!/
no consecutive 0’s (n-1)!b!
Let Since they are independent, by
n =1 product rule,
Total ways – (n-1+b)! (n-1+r)! /
(n-1)!b!(n-1)!r!

Q.15 (89)
In a 10-pennant let there we x1
x1=2
ones and x 2 twos So we need to find
n =2
all the solutions of

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
x1  x 2  10 Factorizing 2014 in primes by
Put x1  0  x 2  10 / 2  5 successively dividing by primes, we
get
So, (0,5) is a solution i.e. a 10 –
pennant could have 0 ones and 5 2014  21 191  531
twos . The number of ordered Now we use the formula:
permutations of 0 ones and 5 twos If n  P1n1 .P2n2 ...Prnr is the prime
=5!/5!=1 factorization of n, then the number
Now x1 cannot be 1 since in that of distinct factors of n is given by
case 4.5 (is not an integer). (n1  1)  (n 2  1)...(n r  1)
Put x1  2  x 2  8 / 2  4 Now since the number of distant
So (2,4) is a solution i.e. is 10 – factors of 2014 = (1+1)(1+1)(1+1)
pennant could have 2 ones and 4 =2×2×2=8
twos./ The number of ordered
permutations of 2 ones and 4 twos Q.18 (0.99)
6! 99
1 99
1 1 
2!4!
 15 x 1 x(x  1)
  
x 1  x

x  1 
Similarly (4,3)(8,1) and (10,0) are 1 1   1 1 
the other four solutions and the          ...
1 2   2 3 
number of pennants for each is
respectively 1 1 1 1 1 1 
     
7! 8! 9! 10!  97 98   98 99   99 100 
 35,  28,  9, 1
4!3! 6!2! 8!1! 10!0! 1
 1 (all the terms in above
So the total number of 10-pennants 100
 1  15  35  28  9  1  89 series except the first and last terms
99
Q.16 (3.9) cancels out)   0.99
100
“The quick brown n for jumps over
the lazy dog” Q.19 (a)
(3) (5) (3) (5) (4)
a1  0 [no strings of length 1
(3) (4) (3)
Now let x be the number of letters in contain two consecutive 1’s]
the word that is randomly picked a 2  1 [∴ strings =11]
Now, we make a probability a 3  3 [∴ strings are : 011,110,111]
distribution table for x. a 4  8 [∴ strings are : 0011, 0110,
From this table we can easily find
x 3 4 5
the expected value of x .
P(x) 4/9 2/9 3/9
(after rounding to one decimal
accuracy)
0111,1011,1100,1101,1110,1111]
4 2 3
E(x)   xp(x)  3   4   5  Option (a)
9 9 9 a n  a n 2  a n 1  2n 2
35
  3.88  3.9  a 4  a 42  a 41  242
9
(after rounding to one decimal  a 2  a 3  22  1  3  4  8
accuracy.) which is True.
Option (b) :
Q.17 (8) a n  a n 2  2a n 1  2n 2
 a 4  a 2  2a 3  22

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
 1  2  3  4  11 which is False. = Number of tick marks =15
Option ( c ): Q.22 (b)
a n  2a n 2  a n 1  2n 2 Let a n be the number of n- bit
 a 4  2a 2  a 3  22 strings that do nor contain two
consecutive 1’s. we wish to develop
 2 1  3  4  9 which is False .
a recurrence relation for a n .
Option (d):
a n  2a n 2  a n 1  2n 2 Consider 2 bit strings 0, 1,
So a1  2
 a 4  2a 2  2a 3  22
Consider 2 bit strings 00,01,10,11
 2 1  2  3  4  12 Out of minimum only 00,01,10 do
which is False. not contain two consecutive 1’s
∴ Option (a) : a n  a n 2  a n 1  2n 2 So a1  3
is correct. Consider of minimum six stings
only000,001, 010 100 and 101 five
Q.20 (36) strings satisfy do not contain two
Dividing 2100 successively by consecutive 1’s
prime numbers, we get that, the So a1  5 Three numbers a1 , a 2 , a 3
prime factors of 2100 are
satisfy clearly only (b)
2×2×3×5×5×7
a n  a n 1  a n 2 is correct.
 22  31  52  71
If N  pk1  pk2  pk3 ..  pkn t
Q.23 (10)
then the number of factors of N are We wish to find coefficient of x12 in
(k1  1)(k 2  1)....(k n  1)
(x 3  x 4  x 5  ...)3
For 2100 we have
 (x3 (1  x  x 2 ...))3
(2+1)(1+1)(2+1)(1+1)= 36 factors
 x9 (1  x  x 2 ...)3

Q.21 (15) x9
The satisfy the non- decreasing 
(1  x) 3
 x 9

r 0
31 r
Cr X r
order condition allow 1,2,3 after 1, 
allow only 2,3 after 2 and allow only  x 9  r  2 Cr X r
3 after 3. The following tree r 0

diagram gives all the allowed Now to make x12 we needed to put r
numbers satisfying the given = 3 So coefficient of x12 is
condition. 3 2
C3 5 C3 5 C3 5 C2  10 .

Q.24 (198)
Given a n  6n 2  2n  a n 1 and a1  8
We wish to find a 99
Now a 2  6  2 2  2  2  a1
a 3  6  32  2  3  a 2
 6  32  2  3  6  22  2  2  a1...
a 99  6  992  2  99  6  982  2  98...
All the tick marked numbers satisfy ...  6  22  2  2  a1
the non-decreasing order condition. Since a1  8
 Number of 4- digit numbers

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
a 99  6  992  2  99  6  982  2  98... In base b 36  3  b1  6  b0
...  6  22  2  2  8  3b  6
So the equation becomes
 6  992  2  99  6  982  2  98...
x 2   b  3 x   3b  6   0
...  6  22  2  2  6 12  2 1
 6(12  22  32...992 )  2.(1  2  2...99) Now since it is given that x = 5 is a
solution, so
(99(99  1)(2  99  1))  99(99  1) 
 6.  2  52   b  3 5   3b  6   0
6  2 
 99 100 199  99 100
⟹ 2b  16  0
 100  99(199  1) ⟹b=8
Same can be obtained by putting x =
 100  99  200
6 also.
 2  99 104
 198 104
So if a 99  K 104 then K  198

Q.25 (d)
Let n = 5 bit
f = 2 bit
So I = 5-2 = 3 bit
Min value : 000.00
⟹ 0
Max value : 111.11
⟹ 7.75
 2i  2 f 
⟹  23  22 
⟹ 8-0.25 = 7.75

Q.26 (271)
Let A   by 3
B   by 5
C   by 7
n  A  B  C  n  A   n  B  n(C)
n  A  B 
n  A  C   n  B  C   n  A  B  C 
 500   500   500   500   500 
    
 3   5   7   15   21 
 500   500 
 
 35   105 
 166  100  71  33  23  14  4
= 271

Q.27 (8)
x 2 13x  36  0
In base b 13  1 b1  3  b0  b  3

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
4 GRAPH THEORY

DEFINITION:  A loop (or self-loop) is an edge joining


a vertex to itself.
A simple graph G = (V, E) consists of V, a  The endpoints of an edge are the
nonempty set of vertices, and E, a set of vertices that it joins. A loop has only
unordered pairs of distinct elements of V one endpoint.
called edges.  An incidence rule specifies the
For each eE, e = {u, v} where u, v  V. endpoints of every edge.
An undirected graph may contain loops. An  An edge e is incident with a vertex v if
edge e is a loop if e = {u, u} for some uV. v is an endpoint of e.
 A graph is a set V of vertices and a set E
DEFINITION: of edges (both sets finite unless
declared otherwise) such that all the
A directed graph G = (V, E) consists of a endpoints of edges in E are contained in
set V of vertices and a set E of edges that V. It is often denoted G = (V, E), or (VG,
are ordered pairs of elements in V. EG), or (V (G), E (G)). Sometimes, each
For each eE, e = (u, v) where u, v  V. edge is regarded as a pair of vertices.
An edge e is a loop if e=(u, u) for some uV.  An isolated point of a graph G = (V,E) is
A simple graph is just like a directed graph, a vertex in V that is not the endpoint of
but with no specified direction of its edges. any edge in E.
Finite& Infinite Graphs: A graph with a  Vertices u and v are adjacent if there is
finite number of vertices as well as finite an edge whose endpoints are u and v.
number of edges is called a finite graph:  Two edges are adjacent if they have a
otherwise, it is an infinite graph. common endpoint.
 A neighbor of a vertex is any vertex to
which it is adjacent.
 An attribute of the edge-set or vertex-
set is a feature such as length, cost, or
color sometimes attached to graphs.
 A graph model is a graph which (quite
frequently, in applications) may have
additional attributes on its edges
and/or vertices. The vertices and edges
of the model may represent arbitrary
objects and relationships from the
context of the application.
 A weighted graph is a graph model in
which each edge is assigned a number
called the weight or the cost.
 A node is sometimes a synonym for a
vertex and sometimes refers to
whatever is modeled by a vertex in a
Portion of two infinite graphs graph model.
 A line is sometimes a synonym for an
4.1 TERMINOLOGY OF GRAPH THEORY edge and sometimes refers to whatever
is modeled by an edge in a graph model.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
 A multi-edge in an undirected graph is in a drawing, it is the number of edge-
a set of more than one edge with the endings at v.
same end points, and in a digraph a set  The valence of a vertex is a synonym
of more than one edge such that each for degree adapted from terminology in
edge in the set has the same head and chemistry.
each edge in the set has the same tail. A  The degree sequence of a graph is the
graph with a multi-edge is also said to sequence of the degrees of its vertices,
have multiple edges or parallel edges. most often sorted into size order,
 A multi-edge of multiplicity n is a set ascending or descending.
of n edges with the same endpoints.  A regular graph is a graph such that all
 A set of parallel edges is a set of edges vertices have the same degree. It is
with the same end points, i.e., a multi- called k-regular if the vertices all have
edge. A pair of anti-parallel arcs is a degree k.
pair of oppositely directed arcs between  A graphical sequence is a sequence of
the same two endpoints. nonnegative integers that is the degree
 A multi-graph is another name for a sequence of some simple graph.
graph with multi-edges but no self-  The number of vertices of a graph is
loops, used for emphasis when the sometimes called the order.
context is largely restricted to simple  The number of edges of a graph is
graphs. sometimes called the size.
 A pseudo-graph (or general graph) is  The empty graph is the graph whose
another name for a graph in which vertex set and edge set are both empty.
loops and multi-edges are permitted,  This is also called the null graph (and is
used for emphasis when the context is sometimes not considered to be a
largely restricted to loop less graphs. graph).
 A direction on an edge is an ordering  The trivial graph is the graph with one
for its endpoints so that the edge goes vertex and no edges.
from one endpoint and to the other. Any
edge, including a self-loop, can be EXAMPLE TO ILLUSTRATE TERMINOLOGY:
directed by giving it a sense of forward
progression, e.g., in a graph drawing, by Description
placing an arrowhead to show which i) It is a connected graph with 5 nodes
way is forward, or by ordering the and 7 edges.
endpoints.
 An arc is another name for a directed ii) There are two simple paths of length 2
edge. from B to E:
 The tail of an arc is the vertex at which (B, A, E) and (B, C, E). There is only one
the arc originates. simple path of length 2 from B and D:
 The head of an arc is the vertex at (B, C, and D).
which the arc terminates. 1.
 A directed graph or digraph is a graph
in which every edge is directed. (See
§8.3.)
 A strict digraph has no self-loops and
no pair of arcs with the same tail and
head. There are two 4- cycles in the graph [A, B,
 The degree of vertex v, deg(v),is the C, E, A] and [A, C, D, E, A]
number of proper edges plus twice the
number of loops incident with v. Thus,

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
iii) deg(A) = 3, since A belong to 3 edges Cycles Length
deg(C) = 4, deg(D) = 2
1561 3
2.
123451 5
1234561 6
6.

I) It is not a graph but a multigraph

ii) It has multiple edges –e4 = [B, C] and e5 Distance denoted by d(u, v) between two
= [B, C] and it has a loop, e6 = [D, D] vertices u and v is defined as the length of
the shortest path joining u and v.
(To definition of a graph usually does not A path is said to be a directed path if all
allow either multiple edges or loops) arcs of the path are directed towards the
3. same direction.
7.

A tree graph with 6 nodes and 5 edges and


there is a unique simple path between any In this, v2e2v4e3v3 is a directed path but
two nodes of the tree graph. v1e1v2e2v4 is not a directed path.Also v2 and
4. v4 are adjacent vertices but v2 and v3 are
not adjacent.

4.2 DIRECTED GRAPHS

Directed graph G, also called a diagraph or


graph, is the same as a multigraph except
This graph is same as that of 1(Graph) that each edge e in G is assigned a direction
except that now the graph is weighted, P1 = or in other way, each edge e is identified
(B, C, D) and P2 = (B, A, E, D) are both path with an ordered pair (u, v) of nodes in G
from node B to node D. Although P2 rather than an unordered pair [u, v]
contains more edges than P1, the weight W  Suppose G is a directed graph with a
(P2) = 9 is less than the weight W(P1) = 10. directed edge e = (u, v). Then e is also
5. called an arc and moreover the
following terminology is used.
a) e begins or initial point of e and v is the
destination or terminal point of e.
b) u is the origin or initial point of e and v
is the destination or terminal point of e.
c) u is predecessor of v and v is a
This graph has 3 cycles of lengths 3, 5,6 successor or neighbor of u.
d) u is adjacent to v and u is adjacent to u.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
 The out degree of a node u in G(denoted
as outdeg (u)) the number of edges  Let T be any nonempty tree graph.
beginning at u. Suppose we choose any node R in T.
The in degree of u (denoted as indeg (u)), is Then T with this designated node R is
the number of edges ending at u. called a rooted tree and R is called its
A node u is called a source if it has a root. This defines a direction to the
positive out degree but zero in degree. edges in T, so the rooted tree T may be
Similarly, u is called a sink if it has a viewed as a directed graph.
zero out degree but a positive in degree  Suppose we also order the successors of
 A node V is said to be reachable from a each node v in T. Then T is called an
node u if there is a (directed) path from ordered rooted tree. Ordered trees are
u to v. almost same as the general trees.
A directed graph G is said to be connected  A directed graph G is said to be simple if
or strongly connected if for each pair u, v of G has no parallel edges. A simple graph
nodes in G there is a path from u to v and G may have loops, but it cannot have
there is also a path from v to u.A graph G is more than one loop at a given node.
said to be unilaterally connected if for any A non directed graph G may be viewed
pair u, v of nodes in G there is a path from u as a simple directed graph by assuming
to v or a path from v to u. that each edge [u, v] in G represents two
directed edges (u, v) and (v, u)In
Example: degrees and out degrees of vertices
of a digraph:

Consider the following graph :

The above graph consists of:


1. 4 nodes and 7 (directed) edges
2. The edges e2 and e3 are said to be in
parallel, since each begins at B and ends
at A. Let us consider a vertex U of a digraph D.
3. The edge e7 is a loop, since it begins and The in degree of U is defined as the number
ends at the same point B. of area for which U is head and out degree
4. The sequence P1 = (B, C, B, A) is not a is the number of arcs of which u is the tail.
path, since (C, B) is not an edge, i. e., the Note: indeg (U)  d D  (U)  in degree of
direction of the edge e5 = (B, C) does not U in graph D
agree with direction of the path P1 on Outdeg(U)  d D (U)  out deg ree of U in
the other hand P2 = (D, B, A) is a path graph D
from D to A, since (D, B) and (B, A) are
edges. Thus A is reachable from D. NULL GRAPH:
5. There is no path from C to any other
node, so G is not strongly connected. A graph is said to be null if all its vertices
However, G is unilaterally connected. are isolated.
Also, indeg (D) = 1 and outdeg (D) = 2 For example:
Node C is a sink, since indeg (C) = 2 but In the figure above
 
outdeg (C) = 0. d D (U)  0, d D (U)  3
No node in G is a source.
IMPORTANT ABOUT DIRECTED GRAPH: FINITE GRAPHS:

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
The sum of the degrees of edges of all the
A multigraph is said to be finite if it has a vertices of a graph G is twice the number of
finite number of vertices and a finite edges into
number of edges.
Theorem:
Note: The number of vertices of adds degree in a
A graph with a finite number of vertices graph is always even
must automatically have a finite number of
edges and so must be finite. ORDER OF A GRAPH:
TRIVIAL GRAPH: The number of vertices of a graph G, is
called its order
The finite graph with one vertex and no
edges i. e. a single point is called the trivial SIZE OF A GRAPH:
graph.
The number of edges of a graph G is called
4.3 SUBGRAPH its size. In calculating the size of a graph, a
Consider a graph G = G (V, E). A graph H = H self loop is treated to be of size 2.
(V`, E`) is called a subgraph of G if the
vertices and edges of H are contained in the n-graph:
vertices and edges of G, i. e.
If V` Vand E` E. A multigraph is called an n-graph if no edge
has multiplicity greater than n.
Important about subgraph
Degree sequence of a graph:
i) A subgraph H(V`, E`) of G(V, E) is called If we find the degree of each vertex of a
the subgraph induced by its vertices V` graph and write the degrees of all the
if its edges set E` contains all edges in G vertices in an ascending order, the sequence
whose endpoints belong to vertices in H. so obtained is called the degree sequence of
ii) If v is vertex in G, then G–v is the the graph.
subgraph of G obtained deleting v from Special Graphs
G and deleting all edges in G which
contain v. 1. Complete Graph kn:
iii) If e is an edge in G, then G–e is the
subgraph of G obtained by simply A simple graph G on n vertices is called a
deleting the edge e from G. full graph or a complete graph if every
vertex is adjacent with all the remaining (n-
REGULAR GRAPH: 1) vertices.
A graph in which all vertices one of equal is In the complete graph kn, the size i.e. no of
called a regular graph n(n  1)
its edges = nC2=
2

Regular graph of degree three (regular 2. The CycleGraph Cn, n  3, consists of n


graph) vertices v1, v2, …, vn and edges {v1, v2},
Theorem: {v2, v3}, …, {vn-1, vn}, {vn, v1}.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
These graphs are not isomorphic as in (a)
vertex (4) of degree 3 is connected to the
vertices 5 k 6 of degree 1 and 3 of degree 2.
3. Wheel: We obtain the wheel Wn when But in (b), vertex (c) of degree 3 is connected
we add an additional vertex to the cycle to the vertices b, d of degree 2 and f of
Cn, for n  3, and connect this new degree1. This, incidence relationship is not
vertex to each of the n vertices in Cn by preserved.
adding new edges. The sufficient conditions are the conditions
of adjacency and non-adjacency of vertices
in the graphs under the mapping  defined
between the two graphs.
Show that the graphs G1 and G2 are
isomorphic to each other.

COMPLIMENT OF A GRAPH:

Let G be a loop free undirected graph on n


vertices. The complement of G, denoted by
G is the subgraph of kn consisting of all n
Solution:
vertices of G and all edges which are not in
No. of vertices in G1= 4 = No. of vertices in G2
G, but are in kn.
-------edges-------=3=---------edges-------------
Let us define a mapping
4.4 GRAPH ISOMORPHISM
(1)  a, (2)  b, (3)  c & (4)  d
Two graphs G and G` are said to be and ((1), (2))  (a, b)  e11  E(G 2 )
isomorphic to each other if these is a one- Now, We haveedge(1, 2)  1 E(G1
to-one correspondence between their (2,3)  e2  E(G1 ) and ((2), (3))  (b,c)  e12  E(G 2 )
vertices and between their edges such that
(3, 4)  e3  E(G1 ) and ((3), (4))  (c,d)  e13  E(G 2 )
the incidence relationship is preserved
Or further,(1, 4)  E(G1 ) and ((1), (4)  (a,d) also E(G 2 )
Two graphs G1(V1E1) and G2(V2, E2) are said (1,3)  E(G1 ) and ((1), (3))  (a,c)
to be isomorphic to each other if these (2, 4)  E(G1 ) and ((2), (4))  (b,d)
exists a bijection f from V1 to V2 i.e. Thus  is one-one, and preserves adjacency
f: V1  V2
as well as non-adjacency. Hence  is an
s. t. for each of the vertices vi, vj of V1, (vi, vj)
 E1 iff (f(vi,) f(vj))  E 2 isomorphism from G1 to G2.
SUB GRAPHS:
The function f is called an isomorphism
from G1 to G2
A graph H = H (V1, E1) is called a sub graph
Isomorphic graphs have-
of G = G (V, E) if V1  E. and E1  E In
i) equal no. of vertices
ii) equal no. of edges particular.
iii) an equal no. of vertices with a given i) If V is a vertex in G, then G-V is the
degree i. e. same degree sequence. subgraph obtained by deleting V from G
These conditions are necessary but not and deleting all edges in G which
sufficient contains V.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
ii) If e is an edge in G, then G-e = Ge is a
subgraph of G obtained by simply
deleting edge e from G.

In a connected graph G the distance


between its vertices u and V is the length of
the shortest path and is denoted by d(u, V).
In a connected graph G the maximum
distance between any two vertices is called
SPANNING SUBGRAPH:
diameter and is denoted by diam (G).
Eg: In G, diam (G) = 2
A graph H is called spanning subgraph of
the given graph G if H contains all vertices
THEOREM:
of G.
If a graph (connected or disconnected) has
DISJOINT GRAPHS: exactly two vertices of odd degree, these
must be a path joining these two vertices.
Let G(V1 E) be a graph and S1 (V1, E1), S2
(V2, E2) be two subgraph of G. Then, CUT-SET:
S1& S2 are called, (i) vertex disjoint if In a connected graph G, a cut-set is a set of
V1  V2  . (ii) edge----------- E1  E2   edges whose removal from G leaves G
The vertex disjoint graph are always edge Disconnected, provided removal of no
disjoint. proper subset of these edges disconnects G
In G, the cut-set are →{k}, {a, c, d, b}, {a, b,
LINEAR GRAPH: g) etc. While the set {a, c, h, d} is not a cut
set, because one of its proper subset {a, c,
A graph with n vertices {V1, V2,……….,Vn} h} is a cut-set.
and edges (Vi, Vi+1) for 1  i  n denotes by BRIDGE:
Ln is known as linear graph on n vertices
Whenever a cutest consists of any one
CONNECTED GRAPHS AND DISCONNECTED edge, that edge is called a bridge for the
GRAPHS: graph. In the above graph {k} is a bridge.
EDGE CONNECTIVITY:
A graph is said to be connected if these
exists at least one path between every pair The number of edges in the smallest cut-set
of its vertices, otherwise it is disconnected. (i. e. cut-set with fewest no. of edges)
A disconnected graph consists of two or is defined as the edge connectivity of G.
more connected graphs. Each of these
connected subgraphs is called a component VERTEX CONNECTIVITY:
The vertex connectivity (or simply
connectivity) of a connected graph G is
defined as the minimum number of vertices
whose removal from G leaves the
remaining graph disconnected. In the
above graph G, the vertex connecting is one
DISTANCE AND DIAMETER: as the deletion & the vertex V4 leaves the
graph G disconnected.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
SEPARABLE GRAPH: INTERSECTION:
A connected graph is said to be separable if The ring sum of two graphs G1 and G2 is a
its vertex connectivity is one. graph G consisting only of those vertices
and edges that are in both G1 and G2.
CUT-VERTEX:
In a separable graph a vertex whose RING SUM:
removal disconnects the graph is called a
cut-vertex, a cut-node or an articulation point The ring sum of two graphs G1 and G2
 The edge connectivity & a graph will writer as G1  G 2 , is a graph consisting of
never be more than the degree of the the vertex set V1  V2 and of edges that are
vertex with the smallest degree in G.
either in G1 or G2, but not in both.
 The vertex connectivity of any graph G
will never be more than the edge DIFFERENCE OF TWO GRAPHS:
connectivity of G.
 The maximum vertex connectivity in The difference of two graphs G1& G2, writer
graph G, with n vertices and (e  n  1) as G1 – G2, is a graph consisting of all the
edges is the integral part of the number edges which are in G1 but not in G2. G1-G2 is
2e  2e  also called the complement of G2 in G1.
i.e.   
n n
DECOMPOSITION OF A GRAPH:

A graph G is said to have been decomposed


into subgraph g1 and g2 i
g1  g2  G and g1  g 2  a nullgraph

 Vertex is the maximum vertex


(G) (g1) (g2)
connectivity and the edge connectivity
for the graph.
FUSION:
Theorem:
A pair of vertices a, b in a graph are said to
Prove that a simple graph with n vertices
be fused (merged or identified) if the two
and k components can have at most
vertices are replaced by a single new vertex
(n  k)(n  k  1)
edges. such that every edge that was incident on
2 either a or b or on both is incident on the
4.5 OPERATIONS ON A GRAPH new vertex. Thus fusion of two vertices
does not alter the number of edges, but it
UNION OF TWO GRAPHS: reduces the number of vertices by one.
The union of two graphs G1 = (V1, E1) and
G2 = (V2, E2) is another graph G3 (G1  G2)
whose vertex set V3 = V1  V2 and the edge
set E3 = E1 E 2 .

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
WALK: UNICURSAL GRAPH:

A walk is a finite alternating sequence of An open Euler line i.e. an open walk that
vertices and edges, begins with a vertex includes all edges of a graph exactly once is
and ends in a vertex. If the terminal called a unicursal line and a graph that has
vertices (i. e. the first and the last vertex) a unicursal line is called a unicursal graph.
are same, then walk is called closed
otherwise called an open walk.
Walk may repeat both vertices and edges.
TRAIL:

A trail is an open walk in which neither on THEOREM:


edge is repeated.
A given connected graph G is an Euler
graph iff all vertices of G are of even degree.
PATH:
4.6 KONIGSBERG BRIDGE PROBLEM
A path is an open walk in which neither on
edge nor a vertex is repeated.
CIRCUIT:

A closed walk in which no edge is repeated This problem is perhaps the best known
is called a circuit. example in graph theory. It was a long
CYCLE: standing problem until solved by Euler in
1736 by means of a graph. The problem is
A closed path is called a cycle. So in a closed depicted in the following figure. Two
path the terminal vertices are same. Eg- islands, C and D, formed by the Pregal River
in Kongsberg (in west soviet Russia) were
connected to the banks A and B with 7
bridges, as shown in the above figure.
The problem was to start at any of the four
land areas of the city A, B, C, or D, walk over
each of the server point (without
swimming across the river).
Euler proved that a solution for this
EULER LINE OR EULER CIRCUIT (CHAIN): problem does not exist.
The graph of the problem is as follows
An Euler line in a graph G is a circuit
In this graph, not all of its vertices are of
consisting of all the edges of G exactly once.
ever degrees.
EULERIAN GRAPH:
Thus it is not on Euler graph. Thus it is not
an Euler graph.
A graph which has an Euler line is called
Thus it is not possible to walk over each of
Eulerian graph.
the seven bridges exactly once and return
to the starting point.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
IMPORTANT RESULTS: 3. If G is a simple connected (p, q) graph
where P≥3 and q≥(P-1)+2, then G is
1) If a graph G has a vertex of odd degree, Hamiltonian.
then these can be no Euler line in G. 4. If G is a simple (p, q) graph where P  2
2) If a graph G is connected and each and for every pairs of non-adjacent
vertex has even degree, then G is an Euler vertices u and vdeg (u) + deg (v)  p-1,
graph then G has a Hamiltonian path.
3) If a graph G has more than two vertices 5. The number of edge –disjoint
of odd degree, then there can be no Hamiltonian cycles in a complete graph
Euler path in G. kn, where n is an odd number n  3, is
4) If a graph G is connected and has (n  1)
exactly two vertices of odd degree, then .
there is an Euler path in G. Any Euler 2
path in G must begin at one vertex of IMPORTANT RESULTS:
odd degree and end at the other.
1) The connected graph G has a
Hamiltonian circuit if each vertex has a
n
 ; n is number of vertices.
degree 2
2) The connected graph G has a
HAMILTONIAN PATH: Hamiltonian circuit if no. of edges,
1
In a connected graph G, if a path uses each m   n 2  3n  6  ,
vertex of the graph exactly once, then such 2
a path is called Hamiltonian path. n is the no. of vertices
3) In a complete graph G with n vertices
HAMILTONIAN (CIRCUIT): (n  1)
these are edges disjoint
2
A circuit in a graph G is called a Hamilton Hamilton cycle, if n is an old number  3.
cycle circuit if it includes every vertex of G.
Eulerian circuit uses every edge exactly 4.7 COLORING PROBLEM
once but may repeat vertices, while
Hamiltonian circuit uses each vertex Painting vertices of a graph with color’s
exactly once (except for the first & the last) such that no two adjacent vertices have the
but may slip edges. same color is called vertex coloring of a
graph. The coloring in which the adjacent
IMPORTANT RESULTS ABOUT vertices are colored with different colors is
HAMILTONIAN GRAPH: called the propercoloring.

1. If G is a (p, q) graph p > 3, and for every


pair of non adjustment vertices u and v,
deg(u)+deg(v)  p, then G is Hamiltonian.
2. A simple ( ,q) graph G is
Hamiltonian if P  3 and CHROMATIC NUMBER:
P
(G)  ; (G)  The minimum number of colours required
2
deg ree of a vertex with thesmallest deg ree. for proper colouring of a graph G is called
the chromatic number of G and is denoted

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
by x(G). If x(G)=k the graph is called a k- P(G,λ)= (  1)(  2)    (n  1)
chromatic graph.
&P(G, )  0 when min  n
In colouring a graph we do not have to
consider:- (G)  n
3) If the graph G is linear with n vertices
1) Disconnected graphs, as colouring of then- P(G, )  (  1)n 1
vertices in one component do not have &P(G, )  o when min  2
any effect on colouring of vertices in
other. THEOREM:
2) Multiple graphs, as all parallel edges
between 2 vertices can be replaced by The degree of a vertex in a simple graph G
0- single edge without affecting on n-vertices cannot be greater than n-1.
adjacency of vertices. Self loops must be THEOREM:
disregarded. Thus for colouring
problems we need to consider only The chromatic number of a graph will not
simple, connected graphs. A Complete exceed by more than one, the maximum
graph of n-vertices is n-chromatic. degree of the vertices in a graph.
Or
WELCH-POWELL ALGORITHM:
Let  (G) be the vertices in a graph is
denoted by V. If V=1,
It is an algorithm developed by Welch and
then (G)  o and x(G)  1+(G)
Powell for finding minimum colours
needed to paint graph steps-
1) Arrange vertices in a sequence COMPLETE DIGRAPH:
according to the descending order of
their degrees. i) Complete Symmetric digraph:
2) Assign colour C1 to the first vertex of It is a simple digraph in which these is
the sequence and then assign C1 in the exactly one edge directed from every
sequential order to each vertex which is vertex to every other vertex.
not adjustment to previous vertex
assigned with colour C1.
3) Assign next colour C2 to the next
coloured vertex in the sequence and
repeat the process pointing for
previously unpainted vertices.
4) Repeat the procedure until all vertices
have been painted. ii) Complete Asymmetric digraph:
A complete asymmetric diagraph of is one
CHROMATIC POLYNOMIAL: that has exactly one edge between every
pair of vertices
Let G be an undirected graph and let λ be
the number of colours available for
properly coloring the vertices of G. A
polynomial function P(G, λ), in the variable
λ is called the chromatic polynomial of G.
1) If G has n isolated vertices then P(G,λ)
THEOREM:
 n  ofor   1 ∴X (G)  1
2) If G = kn then The complete digraph with n nodes has the
maximum no. of edges i.e. n(n-1) edges.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Assuming these are no loops.  A tree with n vertices has n–1 edges.
 Any connected graph with n vertices
4.8 BIPARTITE GRAPH and n–1 edges is a tree.
 A graph is a tree if and only if it is
A bipartite graph is one whose vertices can
minimally connected.
be partitioned into two disjoint sets V1and
V2, called bipartition set, in such a way that  A graph G with n vertices, n–1 edges,
every edge of G has one end in V1 and one and no circuits is connected.
end in V2.
In particular these are no edges within V1or A graph G with n vertices is called a tree if
within V2.
1. G is connected and is circuit less, or
A Complete Bipartite Graph is a bipartite 2. G is connected and has n–1 edges, or
graph in which every vertex in V1 joined to 3. G is circuit less and has n – 1 edges, or
every vertex in V2.The complete bipartite 4. There is exactly one path between
graph on bipartition sets with n vertices every pair of vertices in G, or
and m vertices, respectively is denoted by 5. G is a minimally connected graph.
kn,m.  In any tree (with two or more vertices),
there are at least two pendant vertices.
 The distance between vertices of a
connected graph is a metric.
 Every tree has either one or two
centers.

ROOTED AND BINARY TREES

A tree in which one vertex (called the root)


G1 Bipartite graph is distinguished from all the others is called
G2 Complete bipartite graph a rooted tree.
 The number of labelled trees with n
PLANAR GRAPHS: vertices (n≥2) is nn-2.
 An edge in a spanning tree T is called a
A graph G is said to be planar if these exists branch of T. An edge of G that is not in a
some geometric representation of G which given spanning tree T is called a chord.
can be drawn on a plane such that no two  Then k, the number of components G
of its edges interact each other. has. rank r = n – k, nullity μ = e – n + k.
Region: rank of G = number of branches in any
A plane representation of a graph divides spanning tree (or forest) of G, nullity of
the plane into region also called windows G = number of chords in G, rank +
or faces. nullity = number of edges in G.The
nullity of a graph is also referred to as
4.9 TREES its cyclomatic number.
 This generation of one spanning tree
A tree is a connected graph without any
from another, through addition of a
circuits.
chord and deletion of an appropriate
 There is one and only one path between branch, is called a cyclic interchange or
every pair of vertices in a tree, T. elementary tree transformation.
 If in a graph G there is one and only one In a connected graph G, a cut-set of
path between every pair of vertices, G is edges whose removal from G leaves G
a tree. disconnected, provided removal of no

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
proper subset of these edges vertices x and y in G such that every
disconnects G. Sometimes a cut-set is path between x and y passes through v.
also called a co cycle.  The edge connectivity of a graph G
 Every cut-set in a connected graph G cannot exceed the degree of the vertex
must contain at least one branch of with the smallest degree in G.
every spanning tree of G.  The vertex connectivity of any graph G
 In a connected graph G, any minimal set can never exceed the edge connectivity
of edges containing at least one branch of G.
of every spanning tree of G is a cut-set.
 Every circuit has an even number of COROLLARY
edges in common with any cut-set. Vertex connectivity ≤ edge connectivity
2e

EDGE CONNECTIVITY n
 A connected graph G is k- connected if
Each cut-set of a connected graph G and only if every pair of vertices in G is
consists of a certain number of edges. The joined by k or more paths that do not
number of edges in the smallest cut-set intersect, and at least one pair of
(i.e., cut-set with fewest number of edges) vertices is joined by exactly k
is defined as the edge connectivity of G. nonintersecting paths.
Equivalently, the edge connectivity of a  The edge connectivity of graph G is k if
connected graph can be defined as the and only if every pair of vertices in G is
minimum number of edges whose removal joined by k or more edge-disjoint paths
(i.e., deletion) reduces the rank of the graph (i.e., paths that may intersect, but have
by one. The edge connectivity of a tree, for no edges in common), and at least one
instance, is one. The edge connectivity of pair of vertices is joined by exactly k
the graphs in two and three, respectively. edge disjoint paths.
 The maximum flow possible between
VERTEX CONNECTIVITY two vertices a and b in a network is
equal to the minimum of the capacities
On examining the graph, we find that of all cut-set with respect to a and b.
although removal of no single edge (or
even a pair of edges) disconnects the graph, 1 – ISOMORPHISM
the removal of the single vertex v does.
Therefore, we define another analogous Two graphs G1 and G2 are said to be 1-
term called vertex connectivity. The vertex isomorphic if they become isomorphic to
connectivity (or simply connectivity) of a each other under repeated application of
connected graph G is defined as the the following operation.
minimum number of vertices whose
removal from G leaves the remaining graph Operation 1:
disconnected. Again, the vertex “Split” a cut-vertex into two vertices to
connectivity of a tree is one. The vertex produce two disjoint subgraphs.
connectivity’s of the graphs, respectively.
Note that from the way we have defined it  If G1 and G2 are two 1-isomorphic
vertex connectivity is meaningful only for graphs, the rank of G1 equals the rank of
graphs that have three or more vertices G2 and the nullity of G1 equals the
and are not complete. nullity of G2.
 A vertex v in a connected graph G is a
cut-vertex if and only if there exist two 2 – ISOMORPHISM

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Operation 2: “Split” the vertex x into x1 and e  3n  6
x2 and the vertex y into y1 and y2 such that
G is split into g1and g1 . Let vertices x1 go DETECTION OF PLANARITY
with g1 and x2 and y2with g1 . Two graphs
Step 1:
are said to be 2 – isomorphic if they Since a disconnected graph is planar if and
become isomorphic after undergoing only if each of its components is planar, we
operation 1 or operation 2, both operations need consider only one component at a
any number of times. time. Also, a separable graph is planar if
Two graphs are 2-isomorphic if and only if and only if each of its blocks is planar.
they have circuit correspondence. Therefore, for the given arbitrary graph G,
determine the set
4.10 PLANAR & DUAL GRAPHS G = {G1, G2…Gk}
Where each Gi is a nonseparable block of
A graph G is said to be planar if there exists G. Then we have to test each Gi for
some geometric representation of G which planarity.
can be drawn on a plane such that no two
of its edges intersect. A graph that cannot Step 2:
be drawn on a plane without a crossover Since addition or removal of self-loops does
between its edges is called nonplanar. not affect planarity, remove all self-loops.
 The complete graph of five vertices is Step 3:
nonplanar.A complete graph with five Since parallel edges also do not affect
vertices is the first of the two graphs or planarity, eliminate edge in parallel by
Kuratowski. The second graph of removing all but one edge between every
Kuratowski is a regular connected pair of vertices.
graph with six vertices and nine edges,
 Recall that a graph in which all vertices Step 4:
are of equal degree is called a regular Elimination of a vertex of degree two by
graph. merging two edges in series does not affect
 Region: A region is characterized by the planarity. Therefore, eliminate all edges in
set of edges (or the set of vertices) series. Repeated application of steps 3 and
forming its boundary. Infinite Region: 4 will usually reduce a graph drastically.
the infinite, unbounded, outer, or Let the nonseparable connected graph Gi be
exterior region. reduced to a new graph Hi after the
 A graph can be embedded in the surface repeated application of steps 3 and 4. What
of a sphere if and only if it can be will graph Hi look like?
embedded in a plane.  Graph Hi is
 A planar graph may be embedded in a 1. A single edge, or
plane such that any specified region 2. A complete graph vertices
(i.e., specified by the edges forming it) 3. A nonseparable, graph with n ≥ 5 and
can be made the infinite region. e ≥7.
 A connected planar graph with n  A necessary and sufficient condition for
vertices and e edges has e–n+ 2 regions. a graph G to be planar is that G does not
contain either of Kuratowski’s two
COROLLARY graphs or any graph homeomorphic to
either of them.
f regions, n vertices, and e edges
GEOMETRIC DUAL
3
e  f, 1. An edge forming a self-loop in G yields a
2 pendant edge in G*.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
2. A pendant edge in G yields a self-loop in 3. A complete graph of n vertices is n –
G*. chromatic
3. Edges that are in series in G produce 4. A graph consisting of circuit with n  3
parallel edges in G*. vertices is 2-chromatic if n is even and
4. Parallel edges in G produce edges in 3-chromatic if n is odd.
series in G*.  Two or more vertices is 2-chromatic
5. Remarks 1-4 are the result of the  A graph with at least one edge is 2-
general observation that the number of chromatic if and only if it has no circuits
edges constitution the boundary of a of odd length.
region Fi in G is equal to the degree of  Chromatic number of G  1 + dmax.
the corresponding vertex pi in G*, and
vice versa. 4.11 MINIMUM SPANNING TREE
6. Graph G* is also embedded in the plane A spanning tree of a graph G is a subgraph
and is therefore planar. of G that is a tree and contains every vertex
7. Considering the process of drawing a of G. Spanning trees are very useful in
dual G* from G, it is evident that G is a searching the vertices of a graph and in
dual of G*. Therefore, instead of calling communicating from any given node to the
G* a dual of G, we usually say that G and other nodes.
G* aredual graphs. An undirected network is a weighted
8. If n, e, f, r, and u denote as usual the graph G=(V,E), where V is the set of
numbers of vertices, edges, regions, vertices, E is the set of undirected edges,
rank, andnullity of a connected planar and each edge (i, j)∈E has an associated
graph G, and if n*, e*, f*, r*, and u* are cost (or weight, length) cij . Let n= |V | and
the corresponding number in dual m = |E|.
graph G*, then If T=(V,F) is a spanning tree of G=(V,E),
n* = f, then every edge in F⊆E is a tree edge and
e* = e, every edge in E − F is a nontree edge (or
f* = n chord).
r* = u A minimum spanning tree (MST) of G is a
u* = r spanning tree of G for which the sum of the
 All duals of a planar graph G are 2- edge costs is minimum.
isomorphic; and every graph 2- A maximum spanning tree of G is a
isomorphic to a dual of G is also a dual spanning tree of G for which the sum of the
of G. edge costs is maximum.
 A graph has a dual if an only if it is A cut of G= (V, E) is a partition of the vertex
planar. set V into two parts, S and S= V −S. Each cut
defines the set of edges [S, S]⊆E having one
CHROMATRIC NUMBER endpoint in S and the other endpoint in S.
Painting all the vertices of a graph with FACTS:
colors such that no two adjacent vertices
have the same color is called the proper 1. Every spanning tree T of a network G
coloring (or sometimes simply coloring) of with n vertices contains exactly n−1
a graph. A graph G that requires k different edges, and every two vertices of T are
colors for its proper coloring, and no less, connected by a unique path.
k-chromatic. 2. Adding an edge to a spanning tree of G
1. A graph consisting of only isolated produces a unique cycle, called a
vertices is 1-chromatic. fundamental cycle.
2. 2-chromatic (also called bichromatic) 3. Every cut [S, S] is a disconnecting set of
edges. However, not every disconnecting

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
set of edges can be represented as a cut other nontree edges, namely (2, 3), (4,
[S, S]. 5), and (5, 6), satisfy the path optimality
4. Removing an edge from a spanning tree conditions, establishing by Fact 5 that
of G produces two subtrees, on vertex T∗is a minimum spanning tree. By Fact
sets S and S, respectively. The 7 this is the unique minimum spanning
associated cut [S, S] is called a tree.
fundamental cut.
5. Path optimality conditions: A spanning
tree T∗is a minimum spanning tree of G
if and only if for each nontree edge (k, l)
of G, cij ≤ ckl holds for all tree edges (i,j)
in the fundamental cycle determined by
edge (k, l).
6. Cut optimality conditions: A spanning
tree T∗is a minimum spanning tree of G
if and only if for each tree edge (i, j)
∈T∗, cij ≤ ckl holds for all nontree edges
(k, l) in the fundamental cut determined
by edge (i, j).
7. If all edge costs are different, then the
minimum spanning tree is unique.
8. The minimum spanning tree can be
unique even if some of the edge costs
are equal;
9. Adding a constant to all edge costs of an
undirected network does not change
the minimum spanning tree(s) of the
network. Thus, it is sufficient to have an
algorithm that works when all edge
costs are positive.
10. Multiplying each edge cost of an
undirected network by −1 converts a
maximum spanning tree into a minimum
spanning tree, and vice versa. Thus, it is
sufficient to have algorithms to find a
minimum spanning tree.

EXAMPLES: Algorithm 1: Kruskal’s algorithm.


1. Part (a) of the following figure shows an input: connected undirected network G
undirected network G, with costs output: minimum spanning tree T∗
indicated on each edge. Part (b) shows a Order the edges (i1, j1), (i2, j2), . . . , (im, jm) so
spanning tree T∗of G. Adding the that ci1j1 ≤ ci2j2≤ ・・・ ≤ cimjm T∗:= ∅
nontree edge (3, 5) to T∗produces the for k : = 1to m do
fundamental cycle [3, 1, 2, 5, 3]; see part if T∗∪ {(ik, jk)} does not contain a cycle
(c). Since each tree edge in this cycle then T∗:= T∗∪ {(ik, jk)}
has cost no more than that of the Algorithm 2: Prim’s algorithm.
nontree edge (3, 5), the path optimality input: connected undirected network G,
condition is satisfied by edge (3, 5). vertex i0
Similarly, it can be verified that the output: minimum spanning tree T∗

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
T∗:= the tree consisting of vertex i0 a) A simple graph with 6 vertices,
while |T∗| < n− 1 do whosedegrees are 2, 2, 2, 3, 4, 4.
(i, j) : =nearest neighbor(T∗) Solution
T∗:= T∗∪ {(i, j)} None. It is not possible to have one
vertex of odd degree.
Examples:
1. For the network shown in part (a) of b) A simple graph with 8 vertices,
the following figure, ordering edges by whose degrees are 0,1,2,3,4,5,6,7.
nondecreasing cost produces the Solution
following sequence of edges:(2 , 4), (3, None. It is not possible to have a
5), (3, 4), (2, 3), (4, 5) (1, 2), (1, 3). vertex of degree 7 and a vertex of
Kruskal’s algorithm adds the edges (2, degree 0 in this graph.
4), (3, 5), (3, 4) to T∗; discards the edges
(2, 3) and (4, 5); then adds the edge (1, c) A simple graph with degrees 1,2,2,3.
2) to T∗and terminates. Part (b) of the Solution
figure shows the resulting minimum
spanning tree, having total cost 80.

d) A simple graph with degrees 2,


3,4,4,4.
Solution
None. It is not possible to have a
graph with one vertex of odd
degree.

e) A simple graph with degrees 1,1,2,4.


Solution
None. In a simple graph with 4
2. Prim’s algorithm (Algorithm 2) is vertices, the largest degree a vertex
applied to the network of part (a) of the can have is 3.
figure of Example 1, starting with the
initial vertex i0= 3. The minimum cost f) A simple digraph with in degrees
edge out of vertex 3 is (3, 5), so T∗= {(3, 0,1,2,4,5 and out degrees 0, 3,3,3,3.
5)}. Next, the minimum cost edge Solution
emanating from T∗is (3, 4), giving T∗= None. In a simple graph with five
{(3, 5), (3, 4)}. Subsequent iterations add vertices, there cannot be a vertex
the edges (2, 4) and (1, 2), producing the with in degree 5.
minimum spanning tree T∗= {(3, 5), (3, 4),
(2, 4), (1, 2)}. Starting from any other g) A simple digraph with in degrees
initial vertex i0would give the same 0,1,1,2 and out degrees 0,1,1,1.
result. Solution
4.12 PRACTICE SET None. The sum of the out degrees
must equal the sum of the in
Q.1 In the questions below either give degrees.
an example or prove that there are
none. h) A simple digraph with in degrees:

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
0,1,2,2,3,4 and out degrees: Q.6 A graph with 4 vertices that is not
1,1,2,2,3,4. planar.
Solution Solution
None. The sum of the out degrees None. The largest such graph, K4, is
must equal the sum of the in planar.
degrees.
Q7 A planar graph with 10 vertices.
i) A simple graph with 6 vertices and Solution
16 edges. C10.
Solution Q.8 A graph with vertex-chromatic
None. The largest number of edges number equal to 6.
in a simple graph with six vertices is Solution
15. K6.

j) A graph with 7 vertices that has a Q.9 A graph with 9 vertices with edge-
Hamilton circuit but no Euler circuit. chromatic number equal to 2.
Solution Solution
W6. C9 with one edge removed.

Q.2 A graph with 6 vertices that has an Q.10 A graph with region-chromatic
Euler circuit but no Hamilton number equal to 6.
circuit. Solution
Solution None. The 4-color theorem rules
this out.

Q.11 A planar graph with 8 vertices, 12


edges, and 6 regions.
Solution
Q3.

Q.3 A graph with a Hamilton path but no Q.12 A bipartite graph with an odd
Hamilton circuit. number of vertices that has a
Solution Hamilton circuit.
K1,1. Solution
None. Any bipartite Hamilton graph
Q.4 A graph with a Hamilton circuit but must have an even number of
no Hamilton path. vertices.
Solution
None. Every Hamilton circuit is a Q.13 Are these two graphs isomorphic?
Hamilton path. Solution
The graph are isomorphic
Q-5 A connected simple planar graph A-7, B-4, C-3, D-6, E-5, F-2, G-1
with 5 regions and 8 vertices, each
of degree 3.
Solution
None. The graph would have 12
edges, and hence v – e + r = 8 – 12 +
5 = 1, which is not possible.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
graph indicate the multiplicities of
the edges.

Q.14 Are these two graphs isomorphic?


Solution
The graphs are not isomorphic: the
graph on the left is planar, but the Q-18 Suppose G is a graph with vertices
graph on the right is isomorphic to a,b,c,d,e,and f with adjacency matrix
K3,3

Q.15 Are these two digraphs isomorphic? Find


Solution a) the number of vertices in G.
The digraphs are isomorphic: label b) the number of edges in G.
the center vertex 4, the top vertex 2, c) the degree of each vertex.
the left vertex 1 and the right vertex d) the number of loops.
3. e) the length of the longest simple
path in G.
f) the number of components in G.
g) the distance between vertex a
and vertex c.
Solution
a) 6.
Q.16 If a simple graph G has v vertices 9.
and e edges, how many edges does 2,4,2,3,4,3.
G have? 0.
Solution 9 (G has an Euler circuit).
v (v-1)/2 – e 1.
3.
Q.17 Draw the undirected graph with
0 1 3 0 4 Q.19 Draw a cubic graph with 8 edges, or
1 2 1 3 0  else prove that there are none.
  Solution
adjacency matrix  3 1 1 0 1  None. If e = 8, then 3v = 2e = 16,
  which is not possible.
0 3 0 0 2
 4 0 1 2 3 
Q.20 In K5 find the number of paths of
Solution length 2 between every pair of
The numbers on the edges of the vertices.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Solution
3.

Q.21 In K5 find the number of paths of


length 3 between every pair of
vertices.
Solution
13.

Q.22 In K5 find the number of paths of


length 6 between every pair of
vertices.
Solution
819.

Q.23 In K3,3 let a and b be any two


adjacent vertices. Find the number
of paths between a and b of length 3.
Solution
9.

Q.24 In K3,3 let a and b be any two


adjacent vertices. Find the number
of paths between a and b of length 4.
Solution
0.

Q.25 In K3,3 let a and b be any two


adjacent vertices. Find the number
of paths between a and b of length 5.
Solution
81.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
GATE QUESTIONS

Q.1 How many undirected graphs (not


necessary connected) can be
constructed out of a given set V =
{v1, v2,…. Vn} of n vertices?
n(n-1)
a) b) 2n a) 2 b) 3
2 c) 4 d) 5
n(n-1)
c) n! (d) 2 2 [GATE-2004]
[GATE-2001]
Q.7 How many graphs on n labeled
Q.2 Maximum number of edges in a n- vertices exist which have at least (n2
node undirected graph without self – 3n)/2 edges?
loops is  n -n /2
2

a) n2 b) n(n – 1)/2 a) C n2 -3n /2


c) n - 1 d) (n + 1) (n)/2 n 2

-3n /2
[GATE-2002] b)  n
k=0
2
-3n  /2
Q.3 Let G be an arbitrary graph with n
 n -n /2
2

nodes and k components. if a vertex c) Cn


is removed from G, the number of n  n -n 
3

components in the resultant graph


must necessarily lie between.
d) k=0
2
Ck

a) k and n b) k-1 and k+1 [GATE-2004]


c) k - 1 and n - 1 d) k+1 and n– k
[GATE-2003] Q.8 Let G be a simple connected planar
graph with 13 vertices and 19 edges.
Q.4 How many perfect matchings are Then, the number of faces in the
there in a complete graph of 6 planar embedding of the graph is
vertices? a) 0 b) 8
a) 15 b) 24 c) 9 d) 13
c) 30 d) 60 [GATE-2005]
[GATE-2003]
Q.5 A Graph G = (V, E) satisfies |E| ≤3 Q.9 Which one of the following graphs is
|V| - 6. The min-degree of G is NOT planar?
defined as min {degree(v)}. a) b)
vV

Therefore, min-degree of G cannot


be
a) 3 b) 4
c) 5 d) 6 c) d)
[GATE-2003]
Q.6 The minimum number of colours
required to colour the following
graph, such that no two adjacent
vertices are assigned the same
[GATE-2005]
colour, is

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Common Data for Q.10, Q.11 & Q.12 Q.15 which of the following graphs has an
The 2n vertices of graph G correspond to all Eulerian circuit?
subsets of a set of size n, for n ≥ 6. Two a) Any k-regular graph where k is
Vertices of G are adjacent if and only if the an even number
corresponding sets intersect in exactly Two b) A complete graph on 90 vertices
elements. c) The complement of a cycle on 25
vertices
Q.10 The number of connected d) None of the above
components in G is [GATE-2007]
a) n b) n + 2
2n Q.16 What is the chromatic number of an
c) 2n/2 d)
n n-vertex simple connected graph
[GATE-2006] which does not contain any odd
length cycle? Assume n≥2.
Q.11 The maximum degree of a vertex in
a) 2 b) 3
G is
c) n – 1 d) n
a)  2  2n/2
n/2
b) 2n - 2 [GATE-2009]
 
c) 2n – 3 × 3 d) 2n Q.17 Which one of the following is TRUE
[GATE-2006] for any simple connected undirected
graph with more than 2 vertices?
Q.12 The number of vertices of degree
a) No two vertices have the same
zero in G is
degree
a) 1 b) n
b) At least two vertices have the
c) n + 1 d) 2n
same degree
[GATE-2006]
c) At least three vertices have the
Q.13 Let G be the non-planar graph with same degree
the minimum possible number of d) All vertices have the same degree
edges. Then G has [GATE-2009]
a) 9 edges and 5 vertices
b) 9 edges and 6 vertices Q.18 Let G = (V, E) be a graph. Define
c) 10 edges and 5 vertices ξ  G  = i d ×d , where id is the
d) 10 edges and 6 vertices d

[GATE-2007] number of vertices of degree d in G.


Q.14 Consider the DAG with V= {1, 2, 3, 4, If S and T are two different trees
5, 6}, shown below with ξ S = ξ  T  , then
a) |S| = 2|T| b) |S| = |T| - 1
c) |S| = |T| d) |S| = |T| + 1
[GATE-2010]
Q.19 In a binary tree with n nodes, every
node has an odd number of descen-
dants. Every node is considered to
Which of the following is NOT a be its own descendant. What is the
topological ordering? number of nodes in the tree that
a) 1 2 3 4 5 6 b) 1 2 3 4 5 6 have exactly one child?
c) 1 3 2 4 5 6 d) 3 2 4 1 6 5 a)0 b) 1
[GATE-2007] c) ( n-1 )/2 d) n – 1
[GATE-2010]

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.20 The degree sequences of a simple
graph is the sequence of the degrees
of the nodes in the graph in
c) d)
decreasing order. Which of the
[GATE-2012]
following sequences cannot be the
degree sequence of any graph? Q.24 Let G be a complete undirected
I. I.7, 6, 5, 4, 4, 3, 2, 1 graph on 6 vertices. If vertices of G
II. 6, 6, 6, 6, 3, 3, 2, 2 are labeled, then the number of
III. 7, 6, 6, 4, 4, 3, 2, 2 distinct cycles of length 4 in G is
IV. 8, 7, 7, 6, 4, 2, 1, 1 equal to
a)I and II b) III and IV a) 15 b) 30
c) IV only d) II and IV c) 90 d) 360
[GATE-2010] [GATE-2012]

Q.21 K4 and Q3 are graphs with the Q.25 Consider an undirected random
following structures: graph of eight vertices the probability
that there is an edge between a pair
of vertices is ½. What is the expected
numbers of unordered cycles of
length three?
a) 1/8 b) 1
c) 7 d) 8
Which one of the following [GATE-2013]
statements is TRUE in relation to
these graphs? Q.26 Which of the following statements
a) K4 is planar while Q3 is not is/are TRUE for undirected graph?
b) Both K4 and Q3 are planar P:Number of odd degree vertices is
c) Q3 is planar while K3 is not even.
d) Neither K4 not Q3 is planar Q:Sum of degrees of all vertices is
[GATE-2010] even.
a) P only b) Q only
Q.22 Let G be a simple undirected c) Both P and Q d)Neither P nor Q
planner graph on 10 vertices. With [GATE-2013]
15 edges. If G is a connected graph, Q.27 Let G=(V,E) be a directed graph
then the number of bounded faces in where V is the set of vertices and E
any embedding of G on the plane is the set of edges. Then which one of
equal to the following graphs has the same
a) 3 b) 4 strongly connected components as G?
c) 5 d) 6 a) G1=(V, E1) where E1 = {(u,
[GATE-2012] v)|(u,v)∉E}
Q.23 Which one of the following graphs is b) G2=(V,E2) where E2 = {(u,
isomorphic to v)|(u,v)∉E}
c) G3 = (V, E3) where E3 = {(u, v)|
there is a path of length ≤ 2 from
u to v in E}
d) G4 = (V4, E) where V4 is the set of
vertices in G which are not
isolated
[GATE-2014]
a) b)

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.28 Consider an undirected graph G n
number of faces is at least+2 .
where self- loops are not allowed. 2
The vertex set of G is {(i, j): 1 ≤ i ≤ b) In any planner embedding, the
12, 1 ≤ j ≤ 12). There is an edge n
between (a, b) and (c, d) if |a –c|1 ≤ number of faces is less than +2
2
1. and |b-d|≤ 1. The number of edges
c) There is a planner embedding in
in this graph is__.
which the number of faces is less
[GATE-2014]
n
than +2 .
Q.29 An ordered n-tuple (d1,d2...dn) with 2
d1 ≥ d2 ≥…dn is called graphic if there d) There is a planner embedding in
exists a simple undirected graph which the number of faces is at
with n vertices having degrees n
d1,d2…dn respectively. Which of the most
δ+1
following 6-tuples is NOT graphic? [GATE-2014]
a) (1, 1, 1, 1, 1, 1) b)(2,2,2,2, 2, 2)
c) (3, 3, 3, 1, 0, 0) d) (3,2,1,1, 1,0) Q.35 Let G be a connected planar graph
[GATE-2014] with 10 vertices . if the number of
edges on each face is three, then
Q.30 The maximum number of edges in a the number of edges in G is ____.
bipartite graph on 12 vertices is____. [GATE-2015]
[GATE-2014]
Q.36 A Graph is self- complementary if it
Q.31 A cycle on n vertices is isomorphic is isomorphic to its complement. For
to its component. The value of n is__. all self – complementary graphs on
[GATE-2014] n vertices, n is
Q.32 The number of distinct minimum a) A multiple of 4
spanning trees for the weighted b) Even
graph below is______ c) Odd
d)Congruent to 0 mod 4, or 1 mod 4
[GATE-2015]
Q.37 In a connected graph, bridge is an
edge whose removal disconnects a
graph. Which one of the following
statements is True?
[GATE-2014] a) A tree has no bridges
b) A bridge cannot be part of a
Q.33 If G is a forest with n-vertices and k simple cycle
connected components, how many c) Every edge of a clique with size ≥
edges done G have? 3 is a bridge (A clique is any
a)  nfk  b)  nfk  compete sub graph of a graph)
c) n – k d) n – k + 1 d) A graph with bridges cannot
[GATE-2014] have a cycle
[GATE-2015]
Q.34 Let δ denote the minimum degree of
a vertex in a graph. For all planer Q.38 Consider a binary tree T that has
graphs on n vertices with d ≥3 200 leaf modes Then, the number of
which one of the following is TRUE? nodes in T that have exactly two
a) In any planner embedding the children are___.
[GATE-2015]

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.39 Let G be connected undirected Q.40 The minimum number of colours
graph of 100 vertices and 300 edges. that is sufficient to vertex- colour
The weight of a minimum spanning any planar graph is ________.
tree of G is 500. When the weight of [GATE-2016]
each edge of G is increased by five,
the weight of a minimum spanning
tree becomes ____.
[GATE-2015]

ANSWER KEY:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
(d) (b) (c) (a) (d) (c ) (d) (b) (a) (b) (c ) (c) (b) (d)
15 16 17 18 19 20 21 22 23 24 25 26 27 28
(c) (a) (b) (c) (a) (d) (b) (d) (b) (c) (c) (c ) (b) 506
29 30 31 32 33 34 35 36 37 38 39 40
(c) 36 5 6 (c) (a) 24 (d) (b) 199 995 -

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
EXPLANATIONS
Q. 1 (d) components will result if the node
In a graph G with n vertices, being removed is a lone vertex in
maximum number of edges possible which case, the number of
n(n-1) components will be k – 1.
= .  The number of components must
2
There are two ways for a edge, (the necessarily lie between k–1 and n–1.
edge may appear in graph or may
absent in graph). So there are two Q. 4 (a)
options for each edge. The number of perfect matchings in
Total number of graphs with n a complete graph of n vertices,
n(n-1) where n is even, reduces to the
vertices =2 2
. problem of finding unordered
partitions of the vertex set of the
Q. 2 (b) type p(2n; 2, 2, 2, …n times)
The graph containing maximum
=
 2n !
number of edge in a n-node
 2! n!
n
undirected graph without self loops
is complete graph.The number of For n = 3, 2n = 6, i.e. complete graph
edges in complete graph with n- K6, we have Number of perfect
n(n-1) 6!
node, kn is . matchings =
 2! n!
3
2
6  5  4  3  2 1
Q. 3 (c)   15
2 2 2 6
Maximum components will result
after removal of a node if graph G is
Q. 5 (d)
a star graph as shown below
Given |E| ≤ 3|V| - 6 ----- (i)
Let δ cannot exceed the average
degree of the graph.
Now δ cannot exceed the average
degree of the graph.
2|E|
Or a null graph of n vertices as So, δ  ------ (ii)
shown below: |V|
Substitute eq. (i) in eq. (ii) and get
2
δ   3|V|-6 
|V|
 δ  6 - 12
|V|
in either case, if node v is removed, Clearly the minimum degree has to
the number of components will be n be less than 6 always and hence
– 1, where n is the total number of cannot be equal to 6.
nodes in the star graph.
 n – 1 is the maximum number of Q. 6 (c)
components possible. Minimum

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
An assignment of the colors 1, 2, 3 n
n 2 -n
and 4 to the vertices of the graph is = Ck
k=0 2
shown below such that the graph is
property colored.
Q. 8 (b)
Given V = 13, E = 19
Let R be the number of regions.
R=E–V+2
 R = 19 – 13 + 2 = 8

Q. 9 (a)
So 4 colours are required. G1 is same as K3,3 which is known to
be non planar. G2 ,G3 and G4 can be
Q. 7 (d) redrawn as follows so that they are
Take number of edges available in n planar.
labelled vertices is
2
n(n-1) n -n
nC2 = = edges
2 2
Now from this we need to choose
n 2 -3n
Edges or more up to a
2
n 2 -n
maximum of edges. Each such Q. 10 (b)
2
choice of edges represents a distinct The number of connected
graph on n labelled vertices. component of G is determined by
Total number of such graphs the degree and edges of vertices
there are n + 1 vertices whose
n2  n n2  n n2  n
 C n2 3n  C n 2 3n ...  C n 2 n degree is zero, so they canform n + 1
2 2
2 2
1 2 2 connected component. The
Now since n Cr n Cn  r remaining vertices of the graph G
are all connected as a single
n 2 -n n 2 -n
= 2 = C n 2 -n   n 2 -3n  component. So total number of
2 n 2-3n 2 
2
 -
2

connected component is n + 2.
   
2
n -n
= Cn Q. 11 (c)
2 Let the set be S = {1, 2, 3, 4, …n}
Similarly, Consider a subset containing 2
n 2 -n n 2 -n elements of the from {1,2}. Now
C n 2 -3n  Cn-1
2 
2
+1 2 {1,2} will be adjacent to any subset
 
2 2 with which it has exactly 2 elements
n -n n -n in common.
C n 2 -n C0
2 2
2 These sets can be formed by adding
So the required summation reduced zero or more elements from
n 2 -n n 2 -n n 2 -n remaining n – 2 elements, to the set
Cn + Cn-1 +...+ C0 {1, 2}. Since each of these elements
2 2 2
may be eitheradded or not added,
n 2 -n n 2 -n n 2 -n number of ways of making such sets
 C0 + C1 +...+ Cn
2 2 2 containing 1 and 2is 2n-2.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
 Vertices with 2 elements will the number of vertices whose
have 2n-2 degrees. degree is zero is n + 1.
Now consider subsets of 3 elements
say {1, 2, 3}. Since we want exactly 2 Q. 13 (b)
elements in common, we choose K5 and K3,3 are the smallest non
these in 3C2 ways and then we can planar graphs. K3 has 5 vertices and
add or not add remaining n-3
5
C2  10
elements. This can be done in 2n-3 edges and K3,3 has 6 vertices and 3 ×
ways. 3 = 9 edges. So, the non planar graph
 Total number of subsets with at with minimum number of edges is
least 2 elements common with {1, 2, K3,3 with 9 edges and 6 vertices.
3} is given by 3C2  2n 3 . Note: K3 is the non planar graphs
Similarly, we can argue that the with minimum number of vertices.
number of degrees of 4 element
subsets is 4 C2 ×2n-4 and for 5 element Q. 14 (d)
In topological sorting the partial
subsets is 5 C2 ×2n-5 and so on. ordering of the DAG, must be
Out of these 2n  2  2.2n 3 is less than preserved i.e., a ≤ b in the DAG, then
3
C2 ×2n-3 =3×2n-3 . in the topological order, b must
Then 3C2  2n 3  3  2n 3 is same as come after a, not before. Consider
4
the ordering 3 2 4 1 6 5.
C2 ×2n-4 =6×2n-4 =3×2n-3 and 1≤4 in the given DAG but 4 is
4
C2 ×2n-4 =3×2n-3 is greater than coming before 1 in 3 2 4 1 6 5 order
5 which means that 3 2 4 1 6 5 is not a
C2 ×2n-5 =10×2n-5 =2.5×2n-3
topological order of the given DAG.
 maximum degree in this graph is
occurring for 3 element and 4 Q. 15 (c)
element Subsets both of which have Whenever in a graph all vertices
3×2n-3 degree. have been degrees, it will surely
have an Euler circuit.
Q. 12 (c) (a) Since in a k-regular graph, every
Let S contain n elements then S have vertex has exactly k degrees and
2n subsets. Graph G contains 2n if k iseven, every vertex in the
vertices. graph has even degrees, k-
Let S = {v1, v2,…vn}. Two vertices of regular graph need not be
G are adjacent if and only if the connected, hence k-regular may
corresponding sets intersect in not contain Euler circuit.
exactly two elements. (b) Complete graph on 90 vertices
So |{Vi}  {Vj}| = 2 not contains an Euler circuit,
For this to happen, the subset must because every vertex degree is
have at least 2 elements. odd (89)
There are n sets which contains (c) The complement of a cycle on 25
single elements for V1 to Vn who vertices must contains Euler
doesn’t intersect another set such circuit, where each vertex degree
that it contains two elements. is even (22)
Therefore the degree of all these n
vertices is zero. G also contains a Q. 16 (a)
vertex φ whose degree is zero. So If a n-vertex simple connected graph
contains no cycle of odd length, then

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
its chromatic number is two, since A tree with 1 not possible, since it is
the vertices can be alternatively given that every node has exactly 1
colored with the first color, then the child.
second color, then the first color Now consider a tree with 2 nodes (a
& then the second color and so on. is the root)
Alternatively, since a simple
connected graph with no cycles of
odd lengthmust be bipartite, and
since the chromatic number of a
biparatite graph is always 2(in a Now a has exactly one child.
biparatite graph each partition Number of descendents of a = 2. But
requires one color( there are no this contradicts the given fact that
edges within a partition of a every node has an odd number of
bipartite graph) and there are only descondents.
two partitions). Now consider a tree with 3 ndes,
since, every-node has exactly one
Q. 17 (b) child, it must be of the form,
In a simple connected undirected
graph(with more than two vertices),
atleast 2 vertices must have same
degree, since if this is not true, then
all vertices would have different
degrees. A graph with all vertices Here a has 3 descendents, b has 2
having different degrees is not descendents and c has one. Again we
possible to construct. Notice that it have Contradiction in that b does
is possible to construct graphs not have odd number of
satisfying choices a, c and d. descendents.
Similarly can show that for tree has
Q. 18 (c) 0 nodes, i.e., choice (a).
Given, ξ(G)= id ×d = Sum of
d
Q. 20 (d)
degrees Havell-Hakimi algorithm can be
By handshaking theorem, used to check whether a given degree
 (G)  2 EG where, |EG| is the sequence is a graph or not.
number of edges in G. The algorithm is
If S and T are two trees with 1. remove top node of the
ξ(G)=ξ(T) . sequence.
 2 ES =2 ET 2. subtract “1” from as many nodes
in remaining sequences as the
 ES = E T degree of top node that was
In a tree,  ES = S -1 and removed.
3. rearrange this sequence is non
ET = T -1
increasing order.
Where |S| is number of vertices of 4. Check if resulting sequences is a
tree S and |T| is number of vertices graph.
of tree T. 5. processed again to step 1.
 S -1= T -1  S = T If the given sequences is not a
graph we will see a violation in
Q. 19 (a) step 4, such as presence of

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
negative degrees in the II is cannot be the degree sequences
sequence. Otherwise the of any graph.
algorithm will bottom out with a Similarly we can show that III is
degree sequences consisting of degree sequences of some graph
only even number of 1’s and any and IV is not a degree sequence of
number of 0’s.Now applying the any graph.
algorithm to the degree
sequence I, II, III and IV, one by Q.21 (b)
one: The planar embedding of K4 and Q3
I. 7, 6, 5, 4, 4, 3, 2, 1 is shown below:
6, 5, 4, 4, 3, 2, 1 (Step 1)
5, 4, 3, 3, 2, 1, 0 (Step 2)
5, 4, 3, 3, 2, 1, 0 (Step 3)
Sequence is a graph (Step 4)
4, 3, 3, 2, 1, 0 (Step 1)
3, 2, 2, 1, 0 ,0 (Step 2) So both graphs are planar.
3, 2, 2, 1, 0, 0 (Step 3)
Sequence is a graph (Step 4) Q. 22 (d)
Now, the algorithm ends, since the n = 10
sequences has only 0’s and even e = 15
number of 1’s.the final sequences In a simple connected planar graph,
corresponds to following valid graph Euler’s formula gives the total
number
of regions as e – n + 2 = 15 – 10 + 2 =
7.
Similiarly for seqeunce II. Out of this, one region is unbounded
II. 6, 6, 6, 6, 3, 3, 2, 2 and the other 6 are bounded.
6, 6, 6, 3, 3, 2, 2 (Step 1) So correct answer is 6, which is
5, 5, 5, 2, 2, 1, 2 (Step 2) option(d).
5, 5, 5, 2, 2, 2, 1 (Step 3)
Sequence is a graph (Step 4) Q. 23 (b)
5, 5, 2, 2, 2, 1 (Step 1) Check invariants are one by one.
4, 4, 1, 1, 1, 1 (Step 2) Step 1: All 4 choice have same
4, 4, 1, 1, 1, 1 (Step 3) number of vertices and edges as
Sequence is a graph (Step 4) given graph.
4, 1, 1, 1, 1 (Step 1) Step 2: So we find degree sequence
3, 0, 0, 0, 1 (Step 2) of given graph which is
3, 1, 0, 0, 0 (Step 3) (1,1,2,2,2,2,2,4).
Sequence is a graph (Step 4) Degree sequence of graph in option
1, 0, 0, 0 (Step 1) (a) is ( 1, 1, 1, 2, 2, 2, 3, 4).
0, -1, -1, 0 (Step 2) Degree sequence of graph in option
0, 0, -1, -1 (Step 3) (b) is (1, 1, 2, 2, 2, 2, 2, 4).
Degree sequence of graph in option
The sequences is not a graph (Step (c) is(1, 1, 2, 2, 2, 2, 3, 3).
4), since negative degrees not Degree sequence of graph in option
possible in a Valid graph. So, (d) is (1, 1, 2, 2, 2, 2, 2, 4).
algorithm ends. So only options (a) and (c) are not
isomorphic to given graph, since

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
degree sequence of these graphs is handshaking theorem lets suppose
not same as given graph. we take contradiction of P and Q.
Step 3: Now to decide between P’: There are odd vertices of odd
options (b) and (d), which one is degree. Then total sum will be odd
isomorphic to given graph, we so it will Contradict handshaking
check the number of cycles. In given theorem so odd vertices of odd
Graph there isone cycle of length 5 degree is not possible.
but in Graph(d), there is no cycle of Q’: Sum of degree is not even. It will
length 5.Graph(b) has one cycle of also contradict the handshaking
length 5. theorem because total sum should
So only graph(b) can be isomorphic be even.
to given Graph.
Q. 27 (b)
Q. 24 (c) G = (V, E) is directed graph
The graph given is K6. G2 = (V, E2) where
In K6, every cycle of length 4 E2 = {(u, v) |(v, u)∈ E}
corresponds to selecting 4 vertices G and G2 has same strongly
out of 6 Vertices, which can be done connected components only the
in 6C4 ways and then ordering the 4 difference in G2 is that all edges of G
vertices in Circular permutation in have been reversed the direction.
3! Ways (since vertices are labeled).
Q. 28 506
So final answer is C3  3!  90 .
6

Q. 25 (c)
We need to find unordered cycle of
length 3 so we choose any 3 vertices
from 8 vertices. This can be done in
8
C3 ways To make cycle we need to
choose edge between the selected (i) E1={{(a,b),(c,d)}|a=c and d = b + 1}
vertices probability of choosing any ⟹ | E1 | = 11*12 = 132
edge is 1/2.
1 1 1 Example:
So for three edges =   (1, 1)----(1, 2)------(1, 3)----- ...(1, 12)
2 2 2 (2, 1)----(2, 2)------(2, 3)----- (2, 12)
Expected no of cycle = ƩxP(x)
8
C3 (ii) E2 = {{(a, b),(c, d)}}|c = a + 1 and
7
8 b = d}
⟹ | E2 | = 11 × 12 = 132
Q. 26 (c)
Handshaking theorem: Example:
In a simple graph with e edges and n (1, 1) (1, 2) (1, 12)
vertices where vi be the ith vertices | | |
n
of the graph we have v
i 1
i  2e (2, 1)
|
(2, 2)
|
(2, 12)
|
i.e., sum of degrees of all vertices (3, 1) (3, 2) (3, 12)
will be twice of the number of edges. | | |
Statements P and Q both are true. (12, 1) (12, 2) (12, 12)
This can be proved with the help of

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
(iii) E3 = {{(a, b),(c, d)}|c = a + 1 and Q. 30 (36)
d= b+1} Bipartite graph {u, v} where u and
⟹ | E3 | 121 v are partition on vertices:
Example: (a) {1, 11} ⟹ 1 × 11 ⟹ 11 edges
(1, 1) (1, 2) ------- (1, 12) maximum
(b) {2, 10} ⟹ 2 × 10 ⟹ 20 edges
(2, 2) (2, 3) (2, 12) maximum
(c) {3, 9} ⟹ 3 × 9 ⟹ 27 edges
(3, 3) (3, 4) -------(3, 12) maximum
(d) {4, 8} ⟹ 4 × 8 ⟹ 32 edges
(12, 1) (12, 2) (12, 12) maximum
(e) {5, 7} ⟹ 5 × 7 ⟹ 35 edges
(iv) E4 = {{(a, b),(c, d)|a = c + 1 and maximum
d= b+1} (f) {6, 6} ⟹ 26 × 6 ⟹ 36 edges
 | E4 | = 121 maximum
(1, 1) (1, 2) (1, 3) (1,4)  Maximum number of edges in
a biparatite graph on 12 vertices
(2, 1) (2, 2) (2, 3)  = 36 edges.
Q. 31 (5)
(3, 1) (3, 2) 

(4, 1) 

From (i), (ii), (iii) and (iv):


Total edges = 132 + 132 + 121 + 121
= 506 edges G and G’ are complement and
isomorphic to each other when G
Q. 29 (c) has five vertices.

(1, 1, 1, 1, 1, 1) is simple graph


Q. 32 (6)
(2, 2, 2, 2, 2, 2) is simple graph
(2, 2, 2, 2, 2, 2) ⟹ (0, 1, 1, 2, 2, 2)
⟹ (2, 2, 2, 1, 1, 0)

⟹ (0, 1, 1, 1, 1, 0)
⟹ (1, 1, 1, 1, 0, 0) is
simple graph
(3, 3, 3, 1, 0, 0) is not graphic Total there are six possible
(3, 3, 3, 1, 0, 0) ⟹ (0, 2, 2, 0, 0, 0) minimum spanning trees. [3 × 2 = 6]
⟹ (2, 2, 0, 0, 0, 0) cannot be a Q. 33 (c)
graph Assume that there are k connected
(3, 2, 1, 1, 1, 0) is simple graph components where each is having
(3, 2, 1, 1, 1, 0) ⟹ (0, 1, 0, 0, 1, 0)
n1 , n 2 , n 3 .n k vertices respectively.
⟹ (1, 1, 0, 0, 0, 0) is simple graph Total number of edges in a forest
3 with n vertices and k connected
Components:

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
= (n1 – 1) + (n2 –1)+ (n3 – 1) +…(nk – 1) so removal of an edge from a cycle
=(n1+n2 +… + nk) – (1 + 1 +…k times) does not disconnect the cycle, So a
=n–k bridge cannot be part of a simple
cycle.
Q. 34 (a)
Ʃdeg = 2e Q.38
Given d ≥ 3 ⇒ 3n ≤ 2e ……..(1) n 0 : Number of leaf nodes (degree 0)
For planar graph: n+r=2+ e………(2) n1 : Number of nodes with degree 1
3n n 2 :Number of nodes with degree 2
From (1) and (2): n + r ≥ 2 + We have following two equations
2
3n n for binary tree n  n 0  n1  n 2
 r  2+ -n  r  2+ (where n is the total number of
2 2
nodes in the tree) …(1)
 Number of faces is at least n+2 . Accounting for total nodes as sum of
2 those nodes which are children and
the rot which is not a child of any
Q.35 Ans: node,
Number of vertices (n) =10 We get n  n1 1  n 2  2  1
d(r1 )  3
 n1  2n 2  1
Number of edge (0) = ?
R = e –v + 2 (euler’s formula for Combining equation (1) and (2) we
connected planar graphs) get
R = e – 10 + 2=e – 8 … (1) n 0  n1  n 2 = n1  2n 2  1
Since every region is bounded by  n 2  n0 1
exactly 3 edges and since every edge Therefore the number of nodes of
is exactly double counted, we have degree two in any binary tree =
the equation number of leaf nodes -1
E=3r/2 ⇒ r = 2e/3 n 2  200  1  199
Substituting this in equation (1) we
get, Q.39
2e/3=3- 8 G has |V=100 vertices and |E| =300
2e = 3e - 24 ⇒ e =24 edges
The weight of MST of G = 500
Q.36 (d) In MST:
An n-vertex self – complementary Number of vertices = 100
graph has exactly half number of Number of edges =99
edges of the complete graph i.e. If each edge of G is increased by 5
n(n-1)/4 edges. then MST weight also increased .
Since n(n-1) must be divisible by 4, For each edge of old MST increased
n must be congruent to 0 mod 4 or with 5.
1 mod 4. Total 99 edges, So 99×5=445 is
increased Total weight of new MST
Q.37 (b) =500 + 445 =995
An edge is called bridge iff it’s Q.40
removal will disconnect the graph Four color theorem says that every
into components. planar graph can color with 4 colors
In a cycle there are two paths i.e. four colors are sufficient to
between every pair of vertices and properly color any planar graph

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
ASSIGNMENT QUESTIONS
Q.1 The recurrence relation capturing Q.7 Consider an undirected random
the optimal execution time of the graph of eight vertices. The
Towers of Hanoi problem with n Probability that there is an edge
discs is between a pair of vertices is ½.
a) T(n)=2T(n-2)+2 What is the expected number of
b) T(n)=2T(n-1)+n unordered cycles of length three?
c) T(n)=2T(n/2)+1 a) 1/8 b) 1
d) T(n)=2T(n-1)+1 c) 7 d) 8
Q.2 In a class of 200 students, 125 Q.8 What is the chromatic number off an
students passed physics,85 students n-vertex simple connected graph
passed chemistry,65 students passed which does not contain any odd
maths. 50 students passed both length cycle? Assume n≥2
physics and chemistry, 35 students a) 2 b) 3
passed both physics and maths, 30 c) n-1 d) n
students passed both chemistry and
maths. 15students passed 3 subjects. Q.9 Let G be a simple connected planner
How many students have not passed graph with 13 vertices and 19 edges.
any of the three subjects? Then, the number of faces in the
a) 15 b)20 planner embedding of the graph is:
c) 25 d) 35 a) 6 b) 8
c) 9 d) 13
Q.3 The solution to the recurrence
equation T(2k)= 3T(2k-1)+1; T(1)=1 Q.10 Which of the following statements
is: are TRUE for Undirected Graphs?
a) 2k b) (3k+1-1)/2 P: Number of Odd degree vertices is
c) 3logk2 d) 2logk3 even
Q: Sum of degrees of all vertices is
Q.4 Maximum number of edges in a n- even.
node undirected graph without self a) P only b) Q only
loops is c) Both P and Q d)Neither P nor Q
a) n2 b) n(n-1)/2
Q.11 Let G= (V, E) be a directed graph
c) n-1 d) (n+1)(n)/2
where V is the set of Vertices and E
Q.5 If all the edge weights of an the set of Edges. Then which one of
undirected graph are positive, then the following graphs has the same
any subset of edges that connects all strongly connected components as G?
the vertices and has minimum total a) G1=(V,E1) where
weight is E1={(u,v)|(u,v)∉E}
a) Hamiltonian cycle b) Grid b) G2=(V,E2) where E2={(u,v)|(u,v)ϵ
c) Hypercube d) Tree E}
c) G3=(V,E2) where E3={(u,v)|there
Q.6 What is the size of the smallest MIS is a path of length≤ 2 from u to v
(Maximal Independent Set) of a in E}
chain of nine nodes? d) G4= (V4, E) where V4 is the set of
a) 5 b) 4 vertices in G which are not
c) 3 d) 2 isolated.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.12 A non-planner graph with minimum Q.19 Let S be a set of n elements. The
number of vertices has number of ordered pairs in the
a) 9 edges, 6 vertices largest and the smallest equivalence
b) 6 edges, 4 vertices relations on S are:
c) 10 edges, 5 vertices a) n and n b) n2 and n
d) 9 edges, 5 vertices c) n and 0
2 d) n and 1
Q.13 How many undirected graphs(not Q.20 A relation R is defined on ordered
necessary connected) can be pairs of integers as follows:
constructed out of a given set (x,y)R(u,v) if x<u and y>v, Then R is
V={v1,v2,....,vn} of n vertices? a) Neither a Partial Order nor an
n(n  1) equivalence relation
a) b) 2n
2 b) A Partial Order but not a Total
n (n 1)
order
c) n! d) 2 2
c) A total order
d) An equivalence relation
Q.14 The number of elements in the
power set P(S) of the Set
Q.21 Let X and Y be finite sets and f: X ⇢
S={{Φ},1,{2,3}} is
a) 2 b) 4
Y be a function. Which one of the
c) 8 d) None following statements is TRUE?
a) For any subsets A and B of X,|f(A
∪ B)| = | f(A)| + | f(B) |
Q.15 The number of binary relations on a b) For any subsets A and B of X, |f(A
set with n elements is: ∩ B)| = f(A) ∩ f(B)
a) n2 b) 2n
c) For any subsets A and B of X, |f(A
c) 2n2 d)None of the above ∩ B)| = min{ | f(A)|, | f(B)|}
Q.16 A binary operation ⊕ on a set of d) For any subsets S and T of Y, f -
1(S ∩ T) = f -1(S) ∩ f -1(T)
integers is defined as x ⊕ y = x2 + y2.
Which one of the following Q.22 Which one of the following is NOT
statements is TRUE about ⊕? necessarily a property of a Group?
a) Commutative but not associative a) Commutativity
b) Both commutative &associative
b) Associativity
c) Associative but not commutative c) Existence of inverse for every
d) Neither commutative nor element
associative d) Existence of Identity
Q.17 What is the possible number of Q.23 The number of different m × m
reflexive relations on a set of 5 symmetric matrices with each
elements? element being either 0 or 1 is(Note:
a) 210 b) 215 power(2, x) is same as 2x)
c) 220 d) 225 a) Power(2,n)
Q.18 The set {1,2,4,7,8,11,13,14} is a b) Power(2,n2)
group under multiplication modulo c) Power(2,(n2+n)/2)
15. The inverse of 4 and 7 are d) Power(2,(n2-n)/2)
respectively: Q.24 Which one of the following is TRUE
a) 03 and 13 b) 2 and 11 for any simple connected undirected
c) 4 and 13 d) 8 and 14 graph with more than 2 vertices?

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
a) No two vertices have the same denotes the multiplication operation,
degree the structure { S, *} forms
b) At least two vertices have the a) A group b) A ring
same degree c) An integral domain d) A field
c) At least three vertices have the
same degree Q.31 The set of all real numbers under
d) All vertices have the same the usual multiplication operation is
degree not a group since
a) multiplication is not a binary
Q.25 Let G be the non-plannar graph with operation
minimum possible number of edges. b) multiplication is not associative
Then G has c) identity element does not exist
a) 9 edges and 5 vertices d) zero has no inverse
b) 9 edges and 6 vertices
c) 10 edges and 5 vertices Q.32 Let A and B be any two sets. The
d) 10 edges and 6 vertices symmetric difference of A and B is
the set A + B is defined by
Q.26 Let G be a simple graph with 25 a) (A-B) ∪ (B- A) b) (A-B)∩(B-A)
vertices and 100 edges. The size of c) A – B d) B – A
the minimum vertex cover of G is 10.
Then the size of the maximum Q.33 A Graph has 3 even vertices and 2
independent set of G is: odd vertices. Does that graph has?
a) 12 b) 15 a) An Euler Path but not an Euler
c) Less than 15 d) None circuit
b) An Euler circuit
Q.27 What is the maximum number of c) Neither an Euler path nor an
edges in an acyclic undirected graph Euler circuit
with n vertices? d) None of the above.
a) n-1 b) n
c) n+1 d) 2n-2 Q.34 The number of simple digraphs with
|V| =3 is
Q.28 Suppose X and Y are sets and |X| and a) 29 b) 28
|Y| are their respective cardinalities. c) 27 d) 26
It is given that there are exactly 80
functions from Y to X. From this one Q.35 The minimum number of spanning
can conclude that trees in a connected graph with “n”
a) |X|= 80 and |Y|= 1 nodes is…..
b) |X|= 1 and |Y|=80 a) n-1 b) n/2
c) |X|=80 and |Y|=80 c) 2 d) 1
d) None
Q.36 A complete graph has 6 vertices.
Q.29 Let A, B and C be non-empty sets How many Hamilton circuits does it
and let X=(A-B)-C and Y=(A-C)-(B-C). have
Which one of the following is TRUE? a) 60 b) 120
a) X=Y b) X ⊂ Y c) 80 d) 100
c) Y ⊂ X d) None of these
Q.37 The maximum number of edges in a
Q.30 Consider the set S={1,ω,ω2}, where simple graph with n vertices
ω and ω2 are cube roots of unity. If * a) n(n-1) b) n(n-1)/2
c) n(n+1) d) None of these

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.38 A vertex having no Incident edge Q.45 How many onto (or subjective)
is.............. functions are there from an n-
a) End vertex b)Isolated vertex element (n≥2) set to a 2-element
c) Pendent vertex d) None of these set?
a) 2n b) 2n-1
Q.39 How many vertices are needed to c) 2 -2
n d) 2(2n-2)
construct a graph with 6 edges in
which each vertex is of degree 2. Q.46 Consider the set of all functions
a) 8 b) 4 f:{0,1,.......2014} ⇢ {0,1,.2014} such
c) 2 d) 6 that f(f(i)) = i,for all 0≤i≤2014.
Consider the following statements:
Q.40 It is possible to draw a simple graph P: For each such function it must be
with 4 vertices and 7 edges? the case that for every i,f(i) = i.
a) Yes b) No Q: For each such function it must be
c) May be d) None the case that for some i, f(i)=i.
R: Each such function must be onto.
Q.41 What is the chromatic number of the Which one of the following is
following graph? CORRECT?
a) 2 b) 3 a) P,Q and R are TRUE
c) 4 d) 5 b) Only Q and R are TRUE
c) Only P and Q are TRUE
d) Only R is TRUE

Q.47 How many perfect matching are


there in a complete graph of 6
vertices?
a) 15 b) 24
c) 30 d) 60
Q.42 A relation R on a set A is called an
Equivalence Relation, iff it is Q.48 In a binary tree with n nodes, every
a) Reflexive, transitive but not node has an odd number of
symmetric descendants. Every node is
b) Reflexive, not transitive , considered to be its own descendant.
symmetric What is the number of nodes in the
c) Reflexive, transitive, symmetric tree that have exactly one child?
d) Symmetric. Not reflexive, a) 0 b) 1
transitive c) (n-1)/2 d) n-1

Q.43 The number of equivalence relations Q.49 In a multigraph, loops are allowed
on the set {1,2,3,4} is are not?
a) 15 b) 16 a) Allows
c) 24 d) 4 b) Not allows
c) Allows for starting vertex
Q.44 Which of the following relation on set d) Sometimes allows
{1,2,3,4} satisfies antisymmetric
relation? Q.50 The minimum number of colours
a) {(1,1),(2,3),(3,4),(2,2),(3,2)} required to colour the vertices of a
b) {(1,1),(2,2),(3,3),(4,3),(3,4)} cycle with n nodes in such a way
c) {(1,1),(2,3),(3,4),(1,3)} that no two adjacent nodes have the
d) {(1,2),(2,1),(1,3),(3,3)} same colour is

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
a) 2 b) 3 a) Reflexive b) Irreflexive
c) 4 d) n-2[n/2]+2 c) Symmetric d)Anti-symmetric

Q.51 Let A be a finite set of size ‘n’. The Q.58 For a function to be inveritible, it
number of elements in the power has to be
set of A × A is a) One-one
a) 22n b) 2n2 b) Onto
c) (2 )
n 2 d) n2 c) Both one-one and onto
d) None
Q.52 Let S={1,2,3,4}. A Relation R defined
in S as, Q.59 T is a graph with ‘n’ vertices. If T is
R={(1,2),(4,3),(2,2,),(2,1),(3,1)}is connected and has exactly n-1
a) Transitive edges, then
b) Symmetric a) T is a tree
c)Anti-symmetric b) T contains no cycles
d) None of the above c) Every pair of vertices in T is
connected by exactly one path
Q.53 Choose the correct statements
d) All of the above
a) If two graphs G1 and G2 are
isomorphic, then they should Q.60 Manoj has 4 pairs of black shoes and
have the same number of 5 pairs of green shoes in a box. With
vertices and edges. his eyes closed, he took them out
b) If two graphs have the same one by one. How many shoes should
number of nodes and edges, they he take out before he has a matching
have to be Isomorphic. pair?(assume that what is taken out
c) Loop’s can’t be present in an is not put back)
Isomorphic graph. a) 5 b) 6
d) None of the above c) 10 d) 14
Q.54 The sum of degree of n vertices of a Q.61 The number of substrings that can
tree is equal to be formed from a character string of
a) n-1 b) 2n-1 length n is
c) 2n-2 d) 2n a) N b) n2
c) n(n-1)/2 d) n(n+1)/2
Q.55 The maximum number of trees that
can be formed with 3 unlabeled Q.62 Solve the Recurrence equations
nodes is T(n)=T(n-1)+n
a) 1 b) 5 T(1)=1
c) 4 d) 3 What is the generating function G(z)
for the sequence of Fibonacci
Q.56 Which of the following graphs has numbers?
an Eulerian circuit? a) n b) n+1
a) Any k- regular graph where k is c) n(n+1) d) n(n+1)/2
even number
b) A complete graph on 90 vertices Q.63 The exponent of 11 in the prime
c) The complement of a cycle on 25 factorization of 300! Is
vertices a) 27 b) 28
d) None of the above c) 29 d) 30
Q.57 In the set of integers, a relation R is Q.64 Let G1 = (V, E1) and G2=(V, E2) be
defined asaRb, iff b=|a|. This connected graphs on the same
relation is vertex set V with more than two

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
vertices. If G1 ∩ G2 = (V, E1 ∩ E2) is b) X ⊃ Y
not a connected graph, then the c) X = Y
graph G1∪ G2 = (V, E1 ∪ E2) d) X –Y ≠ ∅ and Y – X ≠ ∅
a) Cannot have a cut vertex
b) Must have a cycle Q.71 The minimum number of colours
c) Must have a cut-edge (bridge) required to colour the following
d) Has chromatic number strictly graph, such that no two adjacent
greater than those of G1 and G2 vertices are assigned the same
colour is,
Q.65 If (G, .) is a group such that (ab)- 1 =
a-1b-1, ∀ a, b ∈ G, then G is a/an
a) commutative semi group
b) abelian group
c) non-abelian group a) 2 b) 3
d) None of these c) 4 d) 5
Q.66 The minimum number of colours Q.72 Which of the following statement is
required to colour the vertices of a TRUE for every planar graph on n
cycle with “n” nodes in such a way vertices?
that no two adjacent nodes have a) The graph is connected
the same colour is…....... b) The graph is Eulerian
a) n-2[n/2]+2 b) 4 c) The graph has a vertex-cover of
c) 3 d)2 size at most 3n/4
d) The graph has an independent
Q.67 Let P(S) denote the power set of a
set of size at least n/3
set S. Which of the following is
always TRUE?
Q.73 A graph is plannar if and only if,
a) P(P(S) = P(S) a) It contain subgraphs
b) P(S) ∩ P(P(S)) ={∅}
homeomorphic to K5 and K3,3
c) P(S) ∩ S = P(S)
b) It does not contain subgraphs
d) S∉ P(S)
homeomorphic to K5 and K3,3
Q.68 Find the reflexive relation on the set c) It does not contain subgraphs
A if A={a,b,c} isomorphic to K5 and K3,3
a) R1={{a,b},{b,c},{a,a},{c,c}} d) It contain subgraphs isomorphic
b) R2={{a,a},{b,c},{c,c}} to K5 and K3,3
c) R3= {{a,a},{a,c},{c,a},{b,b},{c,c}}
d) R4={{a,a},{c,c},{a,c},{c,a}} Q.74 How many Perfect matching’s are
there in a complete graph of 6
Q.69 A graph which allows more than one vertices?
edge to join a pair of vertices is a) 15 b) 24
called c) 30 d) 60
a) Simple graph b) Multigraph Q.75 Consider the undirected graph G
c) null graph d)weighted graph defined as follows. The vertices of G
are bit strings of length n. We have
Q.70 Let A,B and C be finite sets. Let X= (A an edge between vertex u and
∩ B)-(B ∩ C) and Y= (A-(A ∩ C))- (A vertex v if u and v differ in exactly
–B). Which one of the following is one bit position. The ratio of the
TRUE? chromatic number of G to the
a) X ⊂ Y diameter of G is

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
a) 1/2n-1 b) 1/n
c) 2/n d) 3/n

Q.76 The number of elements in the


power set of set {{{}},1,{6,3}} is
a) 2 b) 4
c) 8 d) 3

Q.77 Given the relation R={(1,2),(2,3)}.


The minimum number of ordered
pairs that must be added to this set
so that the enlarged relation is
Reflexive, symmetric and transitive is
a) 4 b) 5 a) i and iv only b)ii and iii only
c) 6 d) 7 c) iii only d)i, ii and iv only
Q.78 A relation R is defined in N × N, such
Q.83 Let R be a Reflexive and symmetric
that (a,b)R(c,d) if a+d=b+c. The
relation defined on a set D. A new
relation R is
relation E is defined on set D such
a) Reflexive but not transitive
that E = {(a,b) | (a,b) ∈ R and (b,a)
b) Reflexive and transitive but not
∈ R} A relation ≤ is defined on the
symmetric
equivalent classes of E such that E1 ≤
c) An equivalence relation
E2 if there exists a,b such that a ∈ E1,
d) A partial order
b ∈ E2 and (a,b) ∈ R. This relation is
Q.79 A relation R is defined as xRy, if x ≠ a) A partial order
y, This Relation R is b) A total order
a) Symmetric but not Reflexive c) An equivalence relation
b) Symmetric andtransitive but not d) None of the above
Reflexive
c) not Symmetric not transitive and Q.84 How many different non-isomorphic
not Reflexive Abelian groups of order 4 are there?
d) an Equivalence relation a) 2 b) 3
c) 4 d) 5
Q.80 Cube roots of unity form a cyclic
Group under multiplication. For this
Q.85 Let R be a non-empty relation on a
group,
a) ω is the only generator collection of sets defined by A R B iff
b) ω,ω2 are the only generators A ∩ B = ∅. Then, which is correct?
c) ω2 is the only generator a) R is reflexive and transitive
d) none of the above b) R is symmetric and not transitive
c) R is an Equivalence relation
Q.81 (G, *) is an abelian group. Then d) R is not Reflexive and not
a) x=x-1, for any x belonging to G symmetric
b) x= x2, for any x belonging to G
c) (x*y)2=x2*y2, for any x,y Q.86 The recurrence relation
belonging to G T(1) =1
d) G is of finite order T(n) = 2T(n-1) + n,n≥2
Evaluates to
Q.82 Consider the following Hasse a) 2 n+1 – n-2 b) 2 n – n
diagrams c) 2 n+1 -2n-2 d) 2 n + n

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.87 How many 4 digit even numbers vertices of G are adjacent iff the
have all digits distinct? corresponding sets intersect in exactly two
a) 2240 b) 2296 elements.
c) 2620 d) 4536
Q.93 The number of vertices of degree
Q.88 G is a simple undirected graph. zero in G is
Some vertices of G are of odd a) 1 b) n
degree. Add a node v to G and make c) n+1 d) 2n
it adjacent to each odd degree
vertex of G. The resultant graph is Q.94 The maximum degree of a vertex in
sure to be G is
a) Regular b) Complete a) (2 n/2) 2 n/2 b) 2 n-2
c) Hamiltonian d)Euler c) 2 n-3×3 d) 2 n-1

Q.89 The binary relation R = Q.95 Let f: B ⇢ C and g: A ⇢ B be two


{(1,1),(2,1),(2,2),(2,3),(2,4),(3,1),(3, functions and let h=fog. Given that h
2),(3,3),(3,4)} on the set A = is an onto function which one of the
{1,2,3,4} is following is TRUE?
a) Reflexive, symmetric and a) f and g should both be onto
transitive functions
b) Neither reflexive, nor irreflexive b) f should be onto but g need not
but transitive be into
c) Irreflexive, symmetric and c) g should be onto but f need not
transitive be onto
d) Irreflexive and antisymmettric d) Both f and g need not be onto

Q.90 The binary relation S = ∅(empty set) Q.96 Let R and S be an two equivalence
on set A = {1,2,3} is relations on a non-empty set A.
a) Neither reflexive nor symmetric Which one of the following
b) Symmetric and reflexive statements is TRUE?
c) Transitive and reflexive a) R ∪ S, R ∩ S are both equivalence
d) Transitive and symmetric relations
b) R ∪ S is an equivalence relation
Statement for linked answer questions c) R ∩ S is an equivalence relation
91 and 92. d) Neither R ∪ S nor R ∩ S is an
Let xn denote the number of binary strings equivalence relation
of length n that contain no consecutive 0s.
Q.97 Let A be the set of all non-singular
Q.91 Which of the following recurrences matrices over real numbers and let *
does xn satisfy? be the matrix multiplication
a) xn= 2xn-1 b) xn= x[n/2] +1 operator. Then
c) xn= x[n/2] +2 d) xn= xn-1 +x n-2 a) A is closed under * but <A, *> is
not a semi group.
Q.92 The value of x5 is b) <A,*> is a semigroup but not a
a) 5 b) 7 monoid.
c) 8 d) 13 c) <A, *> is a monoid but not a
Common data for Questions 93 and 94 group.
The 2n vertices of a graph G correspond to d) <A, *> is a group but not an
all subsets of a set of size n, for n≥6. Two abelian group.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.98 What is the number of vertices in an a) 15 b) 30
undirected connected graph with 27 c) 90 d) 360
edges, 6 vertices of degree 2, 3
vertices of degree 4 and remaining Q.100 In how many ways can we
of degree 3? distribute 5 distinct balls, b1, b2, b3,
a) 10 b) 11 b4, b5 in 5 distinct cells, c1, c2, c3,
c) 18 d) 19 c4, c5, such that ball bi is not in cell
ci, ∀ i=1,2,.5 and each cell contains
Q.99 Let G be a complete undirected exactly one ball?
graph on 6 vertices. If vertices of G a) 44 b) 96
are labelled, then the number of c) 120 d) 125
distinct cycles of length 4 in G is
equal to

ANSWER KEY:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
(d) (c) (b) (b) (d) (c) (c) (a) (b) (c) (b) (c) (d) (c)
15 16 17 18 19 20 21 22 23 24 25 26 27 28
(c) (a) (c) (c) (b) (a) (d) (a) (c) (b) (b) (b) (a) (a)
29 30 31 32 33 34 35 36 37 38 39 40 41 42
(a) (a) (d) (a) (a) (a) (a) (b) (b) (b) (d) (b) (b) (c)
43 44 45 46 47 48 49 50 51 52 53 54 55 56
(a) (c) (c) (b) (a) (a) (b) (d) (b) (d) (a) (c) (a) (a)
57 58 59 60 61 62 63 64 65 66 67 68 69 70
(d) (c) (d) (c) (d) (d) (c) (b) (b) (a) (b) (c) (b) (c)
71 72 73 74 75 76 77 78 79 80 81 82 83 84
(c) (c) (b) (a) (c) (c) (d) (c) (a) (b) (c) (a) (a) (c)
85 86 87 88 89 90 91 92 93 94 95 96 97 98
(b) (a) (b) (d) (b) (d) (d) (d) (c) (c) (b) (c) (d) (d)
99 100
(a) (a)

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
EXPLANATIONS
Q.1 (d) Q.7 (c)
Recurrence equation of Towers of We will find the unordered cycle of
Hanoi T(n)=2T(n-1)+1 length 3. So we choose 3 vertices
from 8 vertices. This can be done in
Q.2 (c) 8c3 ways.
APPLY principle of mutual inclusion The probability that any three
and exclusion. vertices form cycle is 1/2 * 1/2 *
Number of students who passed 1/2 = 1/8
atleast one of 3 subjects=125+85+65- Expected number of Cycles=∑x P(x)
50-35-30+15 =175 1
= 8c3 * = 7
Students have not passed any 8
subject= Total no of students –
students who passed atleast one Q.8 (a)
subject In a simple connected graph, if all
=200-175 =25 the cycles are of even length ( no
cycles of odd length), then it is a
Q.3 (b) bipartite graph. Chromatic number
Let T(2k)=Xk of a bipartite graph is 2. There are
The recurrence relation reduces to no edges within a partition of a
Xk-3Xk-1=1 where X0=1. bipartite graph and there are only
Complementary function= C1.3k two partitions.
Particular solution =
1 1k 1k 1 Q.9 (b)
  
E  3 E  3 1 3 2 By using Euler’s Formula

Q.4 (b) Q.10 (c)


The graph containing maximum By sum of degrees of vertices
number of edges in a n-node theorem, both the statements are
undirected graph without selfloops true.
is complete graph.
Each edge corresponds to a pair of Q.11 (b)
distinct vertices. So, Maximum G= (V, E) is directed graph
number of edges in complete graph G2=(V,E2) where E2={(u,v)|(u,v)ϵ E}
n(n  1) G and G2 have same strongly
with n-node, kn is =C(n,2)=
2 connected components. Only the
difference in G2 is that all edges of G
Q.5 (d) have been reversed the direction.

Q.12 (c)
K5 is the smallest non-planner graph
in terms of number of vertices. So,
number of vertices in k5 is 5 and
number of edges in k5is n(n-1)/2 =
Q.6 (c) 5* 4
The smallest MIS= {b, e, h}  10 , where n=5.
2

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.13 (d) Q.23 (c)
In a graph G with n vertices, In a symmetric matrix aij = aji (i ≠ j)
maximum number of edges possible Each element we can choose in two
n(n  1) ways we can choose the elements in
=
2 the diagonal and above the diagonal.
There are two ways for a edge,(the Number of elements in the diagonal
edge may appear in graph or may and above the diagonal =
absent in graph). So there are two  n2  n)  n(n  1)
n 
options for each edge.  2  2
Total number of graphswith n ∴ required number of matrices =
n(n  1) power(2, n(n+1)/2)
vertices= 2
2
Q.24 (b)
Q.14 (c) In a simple non directed graph, if all
If a set has n elements the its power the vertices are of different degrees
set has 2n elements. then the degree sequence is of the
form {0,1,2,....,n-1}. This degree
Q.15 (c) sequence cannot represent a simple
Number of elements in A × A=n2 non directed graph ,because is there
Every subset of A × A is a relation on exists a vertex of degree n-1 then a
A. vertex with degree 0 does not exist.

Q.16 (a) Q.25 (b)


x⊕ y = (x2 + y2) A non planar graph with minimum
y⊕ x = (y2 + x2) number of edges is the complete
∴x⊕ y = y ⊕ x. bipartite graph K 3,3.
Hence ⊕ is commutative. K 3,3 has 6 vertices and 9 edges.
x⊕( y⊕ z)=x⊕(y2+z2)= x2+(y2+ z2)2
(x⊕y)⊕ z=(x2+ y2)⊕z =(x2+y2)2+ z2 Q.26 (b)
∴x⊕ (y ⊕ z) ≠(x ⊕ y) ⊕ z. The size of minimum vertex cover+
i.e., ⊕ is not associative. the size of maximum independent
vertex set= number of vertices.
Q.17 (c) ∴The size of maximum independent
Number of reflexive relations on a vertex set= 25-10 = 15
set with n elements = 2 n(n-1) = 2 5(5-1)
= 2 20 Q.27 (a)
An acyclic undirected graph with
Q.19 (b) maximum number of edges is a tree.
Largest equivalence relation on A is A tree with n vertices has n-1 edges.
A×A
Number of elements in A × A = n2 Q.28 (a)
Smallest equivalence relation on A is If |X|= m and |Y|= n , the the number
the diagonal relation with n of functions from Y to X = mn
elements.
Q.29 (a)
Q.20 (a) From the venndiagram , we can see
R is not Reflexive that X and Y represent same region.
∴ R is neither a partial order nor an
equivalence relation.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.35 (a) Therefore, the simple graph with 4
There may be several minimum vertices cannot have 7 edges.
spanning trees of the same weight Hence such a graph does not exist.
having a minimum number of edges;
in particular, if all the edge weights Q.41 (b)
of a given graph are the same, then The graph has cycle of odd length.
every spanning tree of that graph is By Welch Powel’s algorithm 3
minimum. colorings is possible.
If there are n vertices in the graph, So, chromatic number = 3
then each tree has n-1 edges.
Q.42 (C)
Q.36 (b) A relation R on a set A is called an
Formula for the number of Hamilton Equivalence Relation, if it is
circuits in a complete graph : (n-1) Reflexive, transitive and symmetric.
!= (6-1)! = 120
Q.43 (a)
Q.37 (b) The number of equivalence relations
The maximum number of edges is on an n-sets equal to the number of
simply the number of pairs of partitions on the n-set. The number
distinct vertices; if there are n of equivalence relations on the set
vertices, then no of edges= n(n- {1,2,3,4} is 15.
1)/2s
Q.44 (c)
Q.38 (b) A relation R on A is Antisymmetric if
A Vertex having no incident edge is iRj implies jRi is false.
called isolated vertex. Isolated
vertices are those with zero degree. Q.45 (c)
Let n=2.There are only two onto
Q.39 (d) functions as shown below.
Consider, there are P vertices with
degree of each 2.
By handshaking lemma,
p

 deg(vi)  2.q  2.6 ,


i 1
where q=

number of edges
d(v1)+d(v2)+...d(vn)=12
2+2+...+2=12
2.p=12
P=6

Q.40 (b)
In a simple graph with n-vertices,
the maximum number of edges will For n=2,
n(n  1) Option a) 2n = 22 =4
be
2 Option b) 2n-1 = 22-1 = 4
Hence a simple graph with 4 Option c) 2n-2 = 22-2 = 2
vertices will have at most 4.3/2 =6 Option d)2( 2n-2) = 2(22-2) = 4
edges. S0, option (c) is correct.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
Q.46 (b) Q.52 (d)
f(f(i))= i, number of elements are We have 1 R 2 and 2 R 1, but 1 R 1
odd. is not there. So, R is not transitive.
∴ ∃i, f(i)=i We have 4 R 3, but 3 R 4 is not there.
For every i, f(i) = i need not be true. So, r is not symmetric.
Ex: take i=2, f(2)=3 ,f(3)=2 Also, 1 R 2 and 2 R 1 , but 1≠ 2. So, r
⇒ f(f(2)= 2 is not anti-symmetric.
⇒ f(3) = 2
⇒2=2 Q.56 (a)
Every such function must be onto. If k is even then all vertices of k-
regular graph are of even degree. So
Q.47 (a) Eulerian circuit exists.
The number of perfect matching’s in
a complete graph of n vertices, Q.57 (d)
where n is even, reduces to the It is not reflexive as -3 R -3 is not
problem of finding unordered true, not irreflexive as 3 R 3 is true,
partitions of the vertex set of the not symmetric as 3 R -3, but -3 R
type p(2n; 2,2,2,....n times) 3 is not true. It is anti- symmetric as
=(2n)!/(2!)n n! aR b and b R a are both true so a=b.
For n=3, 2n=6,i.e., complete
graphK6,we have Q.61 (d)
Number of perfect matching’s = Number of substrings of length 1=n
Number of substrings of length 2=n-1
6!/(2!)3 3! = 15
Number of substrings of length 3=n-
2 and so on
Q.48 (a)
Required number of sub
A tree with one node is not possible.
strings=n+(n-1)+(n-2)+..............+1=
It is given that every node has
n(n+1)/2
exactly one child.
Consider a tree with 2 nodes,
Q.62 (d)
T(n)=T(n-1)+n
T(1)=1
T(2)= T(2-1)+2= T(1)+2= 1+2
T(3)= T(3-1)+3= T(2)+3=1+2+3
T(n)=1+2+3+..............+n= n(n+1)/2
Now A has exactly one child.
Number of descendants of a=2. It is
Q.63 (c)
given that every node has odd
In the set{1,2,3....300}
number of descendants. Similarly
Number of integers divisible by
show for 3,4,5... nodes.
11=[300/11]= 27
It is not possible to have all nodes
But 121=(11)2
with odd number of descendants.
242=2.(11)2
So, exponent of 11 in the prime
Q.51 (b) factorization of 300!=29
The number of elements in the
power set of a set with n elements is Q.64 (a)
2 n. From the given data, we can
The given set A has n elements. So, A conclude that G1 and G2 are not
× A has n × n elements = n2. same. Suppose G1 is not
So, its power set will have (2) n2.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
having any cycle. The G1 is a Q.72 (c)
spanning tree of G.
∴ G1 ∪ G2must contain atleast one Q.73 (b)
cycle. From Kuwratoski’s Theorem, A
graph is non-plannar, if and only ifit
Q.67 (b) contain a subgraph homeomorephic
∅ always present in any power set of to K3,3or K 5.
a set and ∅is the only common
element between P(S) and P(P(S)) Q.74 (a)
∴ P(S) ∩ P(P(S))= { ∅ } Number of perfect matching’s with
Q.68 (c) 2nvertices=(2n-1).(2n-3).(2n5)... 5.
A Relation R on a set A is Reflexive if 3. 1s
every a ∈ A is related to itself.
A= {a,b,c} Q.75 (c)
R must contain {a,a}, {b,b}, {c,c} Chromatic number of graph=2
Diameter=n
Q.69 (b)
A graph which allows more than one Q.76 (c)
edge to join a pair of vertices is The set has 3 elements. So power set
called multi graph. = 2 3 =8
Formally, a multigraph G is an
ordered pair G:=(V, E) with Q.77 (d)
 V a set of vertices or nodes, Relation R={(1,2),(2,3)}
 E a multiset of unordered pairs of R is Reflexive, transitive and
vertices, called edges or lines. symmetric by adding the ordered
Q.70 (c) pairs={(1,2),(2,3),(2,1),(3,2),(1,1),(2,
2),(3,3),(1,3),(3,1)}.
So minimum ordered pairs added=7

Q.79 (a)
We have 2R5 and 5R2. If it is
transitive, then 2R2, but it is not, as
2R2 means 2 is not equal to 2, which
is wrong.

Q.80 (b)
ω is the generator, as all the cube
roots of unity can be expressed as
powers of ω. For similar
Q.71 (c) reasons,ω is also a generator, as
2

The given graph is planar graph. By ω=(ω2)2 and 1= (ω2)3


four color theorem the chromatic
number of the graph is ≤ 4. Using Q.81 (c)
Welch-powell’s algorithm, we can (x *y)2 = (x *y)(x *y) = (x*y)(y*x) =
color the graph with 4 colors. The x*(y*y) *x = x* y2 *x = x* x* y2 = x2 *
interior four vertices can be colored y2
with two colors, but 3- colouring is
not possible.S0, chromatic Q.85 (b)
number=4. A∩A=A≠∅

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
⇒ A is not related to A If the first bit is 0, then the second
∴ R is not Reflexive. bit should be 1.
Let A R B ⇒ (A ∩ B) = ∅ The remaining (n-2) bits we can
⇒ ( B ∩ A) = ∅ choose in xn-2 ways.
⇒BRA The recurrence relation for xn is xn =
∴ R is Symmetric. xn-1 + xn-2 where x1=2 and x2=3.

Q.86 (a) Q.92 (d)


Given that T(n)=2T(n-1)+n.............(1) Using the recurrence relation for xn
Complementary function = C1.2n is xn = xn-1 + xn-2, we have
Let T(n) = A n +B X3 = x2+x1 = 5
Substituting in (1), we have X4 = x3 + x2 = 8
(A n + B) = 2{(A(n-1)+B}+n X5= x4 + x3 =13
Comparing coefficient of n and The value of x5 = 13
constants, we get A= -1 and B=2
The solution is T(n) = C1.2n – n- 2 Q.93 (c)
Applying initial condition we get C1=2 Vertices denoting empty set and 1
element subsets have degree 1.
Q.87 (b) Number of vertices of degree 0=
Number of 4-digit even numbers n+1.
ending with zero=9.8.7 = 504
Number of 4-digit numbers not Q.94 (c)
ending with zero= 8.8.7 = 1792 Degree of a vertex representing any
Required 4-digit even numbers= two element subset = 2 n-2
504+1792 = 2296 Degree of a vertex representing any
three element subset = 3c2 .2n-3
Q.88 (d) Degree of a vertex representing any
Number of vertices with odd degree four element subsets =4c2 .2 n-4 and
is even. If we add a new vertex to all so on.
the vertices of odd degree, then For n≥6, C(3,2)2n-3 is maximum.
degree of every vertex in the graph Maximum degree of a vertex in G=
is even. So, the graph is a Euler graph. 3.2n-3

Q.89 (b) Q.95 (b)


(4,4) does not belongs to R. So R is Given f: B ⇢ C and g: A ⇢ B,
not reflexive. h=f o g: A ⇢ C
(1,1) belongs to R. So R is not if h is onto function then every
irreflexive. element of c is mapped by some
element of A via B.
Q.90 (d) ∴ f is onto.
The empty relation on a finite set is But , the function g need not be onto
symmetric and transitive but not Ex:
reflexive.
Q.91 (d)
Xn = number of binary strings of
length n with no consecutive zeros
If the first bit is one , then the
remaining (n-1) bits we can choose
in xn-1 ways.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission
The, fog is onto and f is onto but g is
not onto.

Q.96 (c)
Let A = {1,2,3}
Let R = {(1,1),(2,2),(3,2),(1,2),(2,3)}
and
S = {(1,1),(2,2),(3,3),(2,3),(3,2)}.
Now R and S are equivalence
relations but R ∨ S is not an
equivalence relation.
Now prove R ∩ S is an equivalence
relation.
For any element x ∈ A,(x,x) ∈ R and
(x,x) ∈ S
∴ (x,x) ∈ ( R ∩ S)
∴R ∩ S is reflexive.
Let (x,y) ∈ R ∩ S
⇒ (x,y) ∈ R and (x,y) ∈ S
⇒ (y,x) ∈ R and (y,x) ∈ S
⇒ (y,x) ∈ R ∩ S
∴R ∩ S is symmetric.
lly , we can prove that R ∩ S is
transitive. R and S is an equivalence
relation.

Q.97 (d)
Matrix multiplication is not
commutative.

Q.98 (d)
Sum of degrees of vertices=
2(number of edges)
2*6+4 * 3+(n-9)*3 = 2 * 27
n=19= number of vertices

Q.99 (a)
In a complete undirected graph on 6
vertices, any 4 vertices form a cycle
of length 4.
So, the number of distinct cycles of
length 4 in G = 6c4 =15

Q.100 (a)
Required number of ways = number
of rearrangements of 5 objects =D5
=44.

© Copyright Reserved by Gateflix.in No part of this material should be copied or reproduced without permission

You might also like