Discrete mathematics & graph theory : Computer Science Engineering, THE GATE ACADEMY

Page 1


DISCRETE MATHEMATICS & GRAPH THEORY For

Computer Science & Information Technology By

www.thegateacademy.com


Syllabus

DMGT

Syllabus for Discrete Mathematics & Graph Theory Connectivity; spanning trees; Cut vertices & edges; covering; matching; independent sets; Colouring; Planarity; Isomorphism.

Analysis of GATE Papers (Discrete Mathematics & Graph Theory)

Year

Percentage of marks

2013

9.00

2012

10.00

2011

10.00

2010

7.00

2009

10.66

2008

18.00

2007

17.33

2006

16.67

2005

20.00

2004

19.33

2003

23.33

Overall Percentage

14.66 %

THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750,  info@thegateacademy.com © Copyright reserved. Web: www.thegateacademy.com


Content

DMGT

CONTENTS

#1.

#2.

#3.

Chapter

Page No.

Mathematical Logic

1 - 24

        

1 1-4 5-7 7 8 - 16 17 - 18 19 - 20 21 21 - 24

Syntax Propositional Logic First order logic Disjunction Normal Form Solved Examples Assignment 1 Assignment 2 Answer Keys Explanations

Combinatorics

25 - 52

         

25 26 – 29 29 – 31 31 - 32 32 – 37 38 - 40 41 - 43 43 - 46 47 47 - 52

Introduction Permutations The Inclusion-Exclusion Principle Derangements Recurrence Relations Solved Examples Assignment 1 Assignment 2 Answer Keys Explanations

Sets and Relations

53 - 92

       

53 - 55 55 - 58 58 - 60 60 - 64 64 - 67 67 - 68 68 - 72 73 - 77

Sets Venn Diagram Poset Binary Relation Lattice Functions Groups Solved Examples

THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750,  info@thegateacademy.com © Copyright reserved. Web: www.thegateacademy.com Page i


Content

   

#4.

Assignment 1 Assignment 2 Answer Keys Explanations

DMGT

78 - 81 81 - 85 86 86 - 92

Graph Theory

93 - 130

              

93 - 94 94 – 95 95 – 97 97 - 99 99 - 100 101 101 - 103 104 104 - 106 107 108 - 113 114 - 117 118 - 123 124 124 - 130

Introduction Degree The Handshaking Theorem Some Special Graph Cut vertices & Cut Edges Euler Path & Euler Circuit Hamiltonian Path & Circuits Kuratowski Theorem Four Colour Theorem Rank & Nullity Solved Examples Assignment 1 Assignment 2 Answer Keys Explanations

Module Test

131 - 143

Test Questions

131 - 137

Answer Keys

138

Explanations

138 - 143

Reference Books

144

THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750,  info@thegateacademy.com © Copyright reserved. Web: www.thegateacademy.com Page ii


Chapter 1

DMGT

CHAPTER 1 Mathematical Logic Logic is a formal language. It has syntax, semantics and a way of manipulating expressions in the language.

Syntax Set of rules that define the combination of symbols that are considered to be correctly structured.     

Semantics give meaning to legal expressions. A language is used to describe about a set Logic usually comes with a proof system which is a way of manipulating syntactic expressions which will give you new syntactic expressions The new syntactic expressions will have semantics which tell us new information about sets. In the next 2 topics we will discuss 2 forms of logic 1. Propositional logic 2. First order logic

Propositional Logic   

Sentences are usually classified as declarative, exclamatory interrogative, or imperative Proposition is a declarative sentence to which we can assign one and only one of the truth values “true” or “false” and called as zeroth-order-logic. Prepositions can be combined to yield new propositions

Assumptions about propositions  For every proposition p, either p is true or p is false  For every proposition p, it is not the case that p is both true and false.  Propositions may be connected by logical connective to form compound proposition. The truth value of the compound proposition is uniquely determined by the truth values of simple propositions.  An algebraic system ({F, T}, V, ∧, -) where the definitions of components are. -A tautology corresponds to the constant T and a contradiction corresponds to constant F. The definitions of ∧, V and  are given below. V F

T

∧ F T

F

T

F

F

T T T  

F F

T F T

 F

T

T F

The negation of a propositions p can be represented by the algebraic expression p The conjunction of two propositions p and q can be represented as an algebraic expression “p∧q” THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750,  info@thegateacademy.com © Copyright reserved. Web: www.thegateacademy.com Page 1


Chapter 1

DMGT

Truth Table

 

p

q

p∨q

T

T

T

T

F

F

T

F

T

F

T

F

F

T

T

F

F

F

F

F

F

p

q

T

T

T

p

q

The disjunction of two propositions p and q can be represented as an algebraic expression “pVq” Compound propositions can be represented by a Boolean expression

The truth table of a compound proposition is exactly a tabular description of the value of the corresponding Boolean expression for all possible combinations of the values of the atomic propositions. Example-1 “I will go to the match either if there is no examination tomorrow or if there is an examination tomorrow and the match is a championship tournament” Solution p = “there is an examination tomorrow” q = “the match is a championship tournament” ∴ I will go the match if the position p V (p ∧ q)is true 

A proposition obtained from the combination of other propositions is referred to as a compound propositions.

Let p and q be two propositions, then define the propositions as “p then q”, denoted as (p→q) is (“p implies ”q)

This is true, if both p and q are true or if p is false.

It is false if p is true and q is false specified as in the table

p

q

p⟶q

T

T

T

T

F

F

F

T

T

F

F

T

Truth Table THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750,  info@thegateacademy.com © Copyright reserved. Web: www.thegateacademy.com Page 2


Chapter 1

DMGT

Example-2 “The temperature exceeds 700C” and “The alarm will be sounded” denoted as p and q respectively.  “If the temperature exceeds 700C then the alarm will be sounded “ = r i.e. it is true if the alarm is sounded when the temperature exceeds 700C (p & q are true) and is false if the alarm is not sounded when the, temperature exceeds 700C. (p is true & q is false).  p ↔ q is true if both p and q are true or If both p and q are false  It is false if p is true while q is false and if p is false while q is true.  If p and q are 2 propositions then “p bi implication q” is a compound proposition denoted by

p

q

p

q

T

T

T

T

F

F

F

T

F

F

F

T

Truth Table Example-3 p = “a new computer will be acquired” q = “additional funding is available” Consider the proposition, “A new computer will be acquired if and only if additional funding is available” = r. ‘‘r’’ is true if a new computer is indeed acquired when additional funding is available (p and q are true) the proposition r is also true if no new computer is acquired when additional funding is not available (p and q are false) The r is false if a new computer acquired. Although no additional funding is available. (P is true & q is false) “r” is false if no new computer is acquired although additional funding is available (p is false & q is true)  Two compound propositions are said to be equivalent if they have the same truth tables. Replacement of an algebraic expressions involving the operations ⇢ and ↔ by equivalent algebraic expressions involves only the operations ∧, V and Equation p

q

p→ q

~p

~p V q

T

T

T

F

T

T

F

F

F

F

F

T

T

T

T

F

F

T

T

T

∴p→q=pvq Similarly p ↔ q = (p∧q) V (~p ∧ ~q) THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750,  info@thegateacademy.com © Copyright reserved. Web: www.thegateacademy.com Page 3


Chapter 1

DMGT

Example-4 p → q = (~p v q) = ~ ~ (q) v ~p = ~q → ~ p Given below are some of the equivalence propositions. ~(~( )) ~( ∨ ) ~ ∧ ~ ~( ∧ ) ~ ∨ ~ ⟶ ~ ∨ (~ ∨ ) ∧ (~ ∨ ) ( ∧ ) ∨ ( ) ( → )∧( → ) ∧  A propositional function is a function whose variables are propositions  A propositional function p is called tautology if the truth table of p contains all the entries as true  A propositional function p is called contradiction if the truth table of p contains all the entries as false  A propositional function p which is neither tautology nor contradiction is called contingency.  A proposition p logically implies proposition q. If ⟶ is a tautology.  Inference will be used to designate a set of premises accompanied by a suggested conclusion. (p ∧ p ∧ p p )⟶Q Here each p is called premise and Q is called conclusion.  If (p ∧ p ∧ p p ) ⟶ Q is tautology then we say Q is logically derived from p ∧ p p i.e., from set of premises, otherwise it is called invalid inference.

Rules of Inference for Propositional Logic Inference rule ∴

Tautology

Name

(p∧(p→q)) → q

Modus ponens (mode that affirms)

(q∧(p→q))→p

Modus tollens (mode that denies)

((p→q) ∧(q→r)) →(p→r)

Hypothetical syllogism

((p∨q)∧(p))→q

Disjunctive syllogism

p→(p ∨ q)

Addition

(p ∧ q)→p

Simplification

((p) ∧(q)) →(p∧q)

Conjunction

((p ∨q) ∧(p∨r) →(q∨r)

Resolution

∴ ∴ ∴

∴ ∴ ∴ ∴

→  → → → ∨ 

∨q

∧ ∨  ∨ ∨

THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750,  info@thegateacademy.com © Copyright reserved. Web: www.thegateacademy.com Page 4


Chapter 1

DMGT

First Order Logic 1.

2. 3. 4. 5. 6. 7.

Let A be a given set. A propositional function (or an open sentence or condition) defined on A is an expression p(x) which has the property that p(a) is true or false for each ‘a’ in A. That is, p(x) becomes a statement (with a truth value) whenever any element a ∈ A is substituted for the variable x. The set A is called the domain of p(x), and the set Tp of all elements of A for which p(a) is true is called the truth set of p(x). Tp = {x | x ∈ A, p(x) is true} or Tp = {x | p(x)}. Frequently, when A is some set of numbers, the condition p(x) has the form of an equation or inequality involving the variable x. The symbol ∀ which reads “for all” or “for every” is called the universal quantifier. The expression (∀x∈A) p(x) or ∀x p(x)is true if and only if p(x)is true for all x in A. The symbol ∃ which reads “there exists” or “for some” or “for at least one” is called the existential quantifier. The expression (∃x ∈ A)p(x) or ∃x, p(x) is true if and only if p(a) is true for at least one element x in A. Sentence

Abbreviated Meaning

∀ x, F(x)

all true

∃x, F(x)

at least one true

~,∃x, F(x)]

none true

∀ x, ,~F(x)-

all false

∃x, ,~F(x)-

at least one false

- (∃x,[~F(x)])

none false

~(∀ x,,F(x)-)

not all true

~(∀ x, ,~F(x)-)

not all false

“all true”

∀x, F(x)=~,∃x,~F(x)-

“none false”

“all false”

(∀x, ,~F(x)-+=*~, ∃x, F(x)-)

“none true”

“not all true”

(~,∀x, F(x)-)=(∃x, ,~F(x))

“at least one false”

“not all false”

(~,∀x,~F(x)])= ∃x, F(x)

“at least one true”

Statement

Negation

“all true”

∀x, F(x)

∃x, ,~F(x)-

“ at least one is false”

“at least one is false”

∃x, ,~F(x)-

∀x, F(x)

“all true”

“all false”

∀x, ,~F(x)-

∃x, F(x)

“at least one is true”

“at least one is true”

∃x, F(x)

∀x, ,~F(x)-

“all false”

THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750,  info@thegateacademy.com © Copyright reserved. Web: www.thegateacademy.com Page 5


Chapter 1

DMGT

We see that to form the negation of a statement involving one quantifier, we need to only change the quantifier from universal to existential, or from existential to universal and negate the statements which it quantifies. Sentences with Multiple Quantifiers In general if P (x, y) is any predicate involving the two variables x and y, then the following possibilities exist (∀x)(∀y)P (x,y) (∃x)(∀y)P (x,y)

(∃x)(∃y) P (x,y)

(∀y)(∀x)P (x,y) (∀y)(∃x)P (x,y) Rules of Inference For Quantified Propositions “Universal Instantiation” If a statement of the form ∀x, P(x) is assumed to be true then the universal quantifier can be dropped to obtain that P(c) is true for any arbitrary object c in the universe. This rule may be represented as ∀ , ( ) ∴ P(C) “Universal Generalization” If a statement P(c) is true for each element c of the universe, then the universal quantifier may be prefixed to obtain ∀x, P(x), In symbols, this rule is ( ) ∴ ∀ , ( ) This rule holds provided we know P(c) is true for each element c in the universe. “Existential Instantiation” If ∃x, P(x) is assumed to be true, then there is an element c in the universe such that P(c) is true This rule takes the form. ∃ , ( ) ∴ ( )

c

“Existential Generalization” If P(c) is true for some element c in the universe, then ∃x, P(x) is true In symbols, we have P(c)for some c ∴ ∃x, P(x) Generally speaking, in order to draw conclusions from quantified premises, we need to remove quantifiers properly, argue with the resulting propositions, and then properly prefix the correct quantifiers. THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11 : 080-65700750,  info@thegateacademy.com © Copyright reserved. Web: www.thegateacademy.com Page 6



Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.