Sei sulla pagina 1di 5

Discrete Mathematics: Theory and

Applications
(Revised Edition)
Students Solutions Manual
D. S. Malik
Creighton University

M.K. Sen
Calcutta University

2010 Cengage Learning Asia Pte Ltd


ALL RIGHTS RESERVED. No part of this work covered by the copyright hereon may be
reproduced in any form or by any means graphic, electronic, or mechanical, including
photocopying, recording, taping, Web distribution, or information storage and retrieval
systems without the written permission of the publisher.
1.2. Mathematical Logic 9

15.
p q pq pq (p q) (p q)
T T T T T
T F T F F
F T T F F
F F F F T

ED
Hence, (p q) (p q) is not a tautology.

17.

M D
p q r pq qr (p q) (q r) (p q) (q r) (p r)

R
T T T T T T T

ES U E
T T F T F F T

BE
T F T F T F T

IS -N IL
ER D E E
T F F F T F T
F T T T T T T

L
C D TA
F T F T F F T
EX O E, P F F T T T T T
F F F T T T T
M
Hence, (p q) (q r) (p r) is a tautology.
D
S ET A

19. Let A denote the statement formula (p q) q.


N L S

p q pq q (p q) q
T T T F F
T F F T F
O
F T F F F
F F F T F

Hence, (p q) q is a contradiction.
O P

21. See Exercise 17.


T
TI M

23. (a) We construct the truth table for A B.


O

p q pq (p q) q p ( q) AB
T T T F F F T
LU C

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

Hence, A logically implies B.

(b) We construct the truth table for A B.

p q pq p AB
SO

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

Hence, A logically implies B.


150 11. Graph Theory

37. The graph is shown in Figure Ch11Sec1Ex37.

ED
M D
K 4,3 (K 4,3 )'

R
Figure Ch11Sec1Ex37

ES U E
BE
IS -N IL
11.2 Walks, Paths, and Cycles

ER OD DE LE
1. (a) (v2 , e3 , v3 , e4 , v5 , e5 , v6 , e6 , v7 ) is a walk of length 4. Yes it is a trail because it has no repeated

C D TA
edges. It is a path because it has no repeated vertices.
EX O E, P
(b) (v2 , e2 , v2 , e7 , v4 , e8 , v7 , e10 , v1 , e1 , v2 ) is a closed walk of length 5. Yes it is a circuit because it has
no repeated edges.
M
(c) (v2 , e3 , v3 , e4 , v5 , e5 , v6 , e6 , v7 , e8 , v4 , e7 , v2 ) is a circuit of length 6. Yes it is a cycle because it has
no repeated vertices.
S ET A

(d) (v2 , e7 , v4 , e8 , v7 , e10 , v1 , e1 , v2 ) is a 4-cycle.


N L S

3. G1 = ({v3 , v4 }, {e3 }), G2 = ({v4 , v5 , v6 }, {e4 , e5 , e6 }), and G3 = ({v4 , v5 , v6 , v1 }, {e5 , e6 }) are subgraphs
of the given graph.
5. Let G be a connected graph such that the degree of each vertex is 2. We choose a vertex u and an
edge e1 with u as one end vertex and u1 as the other end vertex. If u = u1 , then e is a loop at u
and (u, e1 , u) is a cycle. Because deg(u) = 2, u has no other adjacent vertices. Again G is a connected
graph, so G cannot contain any other vertex. Hence, G is this loop which is a cycle. Suppose u 6= u1 .
Because deg(u1 ) = 2, there exists an adjacent vertex u2 of u1 . If u2 = u1 , then there exist parallel
edges e and e1 between u and u1 and then (u, e1 , u1 , e2 , u) is a cycle. Also we find that u1 and u2
O P

have no other adjacent vertices. Hence, G is this cycle.


T
TI OM

Assume that G is a simple graph. Choose a vertex u and an edge e1 with u as one end vertex and
the other end vertex u1 dierent from u. Now deg(u1 ) = 2. Choose an edge e2 with u1 as one end
vertex and the other end vertex u2 dierent from u and u1 . Again deg(u2 ) = 2. Hence, we choose an
edge e3 with u2 as one end vertex and the other end vertex u3 dierent from u, u1 , and u2 . Notice
that all the edges e, e1 , and e2 are dierent. Now deg(u3 ) = 2. We repeat this process and choose
LU C

an edge e4 with u3 as one end vertex and the other end vertex u4 dierent from u, u1 , u2 , and u3 .
Because the number of vertices is finite, repeating the above process eventually we find a sequence
u, e1 , u1 , e2 , u2 , . . . , ui , ei , ui+1 such that u, u1 , u2 , . . . , ui are distinct vertices, e1 , e2 , . . . , ei are distinct
edges and ui+1 = uj for some j, where 1 j < i + 1. Thus, we obtain the cycle

C : uj , ej+1 , uj+1 , uj+2 , ej+2 , . . . , ui , ei , ui+1 = uj .

We claim that uj = u. Let us write u0 = u. If uj 6= u0 , then the vertices uj1 , uj+1 , and ui are three
distinct adjacent vertices of uj . This implies that deg(uj ) 3, a contradiction. Hence, uj = u. Also
the degree of each vertex of a cycle is 2. Hence, if v is a vertex of the graph dierent from the vertices
SO

of C, then it cannot be an adjacent vertex of any vertices of the cycle C. Because the graph is a
connected graph, it follows that the vertices on this cycle C are the only vertices of the graph and
hence the given graph is a cycle.
7. Let P = (u = v1 , e1 , v2 , e2 , . . . , vn = u) be a circuit. If this is not a cycle, then vi = vj for some
1 i < j n. This shows that there is a closed walk Q from vi to vj . We reduce P to P Q. Now
P Q is a new circuit from u to u. If this circuit is not a cycle, then we repeat the above process.
Because the number of closed walks in P is finite, eventually we obtain a cycle from u to u.
188 13. Boolean Algebra and Combinatorial Circuits

(e) The truth table for = (x1 + x02 )0 + (x01 + x03 )0 is


x1 x2 x3 x01 x02 x03 x1 + x02 (x1 + x02 )0 x01 + x03 (x01 + x03 )0
Row 1 1 1 1 0 0 0 1 0 0 1 1
Row 2 1 1 0 0 0 1 1 0 1 0 0
Row 3 1 0 1 0 1 0 1 0 0 1 1
Row 4 1 0 0 0 1 1 1 0 1 0 0

ED
Row 5 0 1 1 1 0 0 0 1 1 0 1
Row 6 0 1 0 1 0 1 0 1 1 0 1
Row 7 0 0 1 1 1 0 1 0 1 0 0

M D
Row 8 0 0 0 1 1 1 1 0 1 0 0

R
In the last column, the zero entry is in Rows 2, 4, 7 and 8. The maxterms corresponding to Row

ES U E
2, Row 4, Row 7, and Row 8 are x01 + x02 + x3 , x01 + x2 + x3 , x1 + x2 + x03 , and x1 + x2 + x3 ,

BE
respectively. Hence, the Boolean expression in CNF is

IS -N IL
ER D E E
(x01 + x02 + x3 ) (x01 + x2 + x3 ) (x1 + x2 + x03 ) (x1 + x2 + x3 ).

L
C D TA
11. (a) In the last column, the nonzero entry is in Rows 1, 2, and 3. The minterms corresponding to
EX O E, P
Row 1, Row 2, and Row 3 are x y, x y / , and x0 y, respectively. Hence, the Boolean expression
in DNF is x y+ x y 0 + x0 y.
M
(b) In the last column, the nonzero entry is in Rows 1, 2, 3, 4, 7, and 8. The minterms corresponding
to Row 1, Row 2, Row 3, Row 4, Row 7, and Row 8 are xyz, xyz 0 , xy 0 z, xy 0 z 0 , x0 y 0 z, and x0 y 0 z 0 ,
D
S ET A

respectively. Hence, the Boolean expression in DNF is


xyz + xyz 0 + xy 0 z + xy 0 z 0 + x0 y 0 z + x0 y 0 z 0 .
N L S

(c) In the last column, the nonzero entry is in Rows 1, 2, 3, and 5. The minterms corresponding to
Row 1, Row 2, Row 3, and Row 5 are xyz, xyz 0 , xy 0 z, and x0 yz, respectively. Hence, the Boolean
expression in DNF is
xyz + xyz 0 + xy 0 z + x0 yz.
O

13. (iii) Distributive laws: x1 (x2 + x3 ) = (x1 x2 ) + (x1 x3 ).


Let (x1 , x2 , x3 ) = x1 (x2 + x3 ) and (x1 , x2 , x3 ) = (x1 x2 ) + (x1 x3 ).
O P

x1 x2 x3 x2 + x3 x1 x2 x1 x3 x1 (x2 + x3 ) (x1 x2 ) + (x1 x3 )


T

1 1 1 1 1 1 1 1
TI M

1 1 0 1 1 0 1 1
1 0 1 1 0 1 1 1
1 0 0 0 0 0 0 0
O

0 1 1 1 0 0 0 0
0 1 0 1 0 0 0 0
LU C

0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0
Hence, (b1 , b2 , b3 ) = (b1 , b2 , b3 ) for any assignment of values b1 , b2 , b3 {0, 1} to x1 , x2 , and x3
respectively. Hence, = . This proves that x1 (x2 + x3 ) = (x1 x2 ) + (x1 x3 ).
Let (x1 , x2 , x3 ) = x1 + (x2 x3 ) and (x1 , x2 , x3 ) = (x1 + x2 ) (x1 + x3 ).
x1 x2 x3 x2 x3 x1 + x2 x1 + x3 x1 + (x2 x3 ) (x1 + x2 ) (x1 + x3 )
1 1 1 1 1 1 1 1
1 1 0 0 1 1 1 1
SO

1 0 1 0 1 1 1 1
1 0 0 0 1 1 1 1
0 1 1 1 1 1 1 1
0 1 0 0 1 0 0 0
0 0 1 0 0 1 0 0
0 0 0 0 0 0 0 0
14.1. Finite Automata and Regular Languages 199

Next consider the string abba and the following directed path
a b b a
q0 q0 q1 q2 q2 .

This implies that (q0 , abba) = q2 . Because q2 is a final state, it follows that abba is accepted by
M.
Next consider the string babab and the following directed path

ED
b a b a b
q0 q1 q0 q1 q0 q1 .

M D
This implies that (q0 , babab) = q1 . Because q1 is not a final state, it follows that babab is not

R
accepted by M.

ES U E
(c) The language of M is the set of all strings that contains the string bb.

BE
IS -N IL
ER D E E
7. (a) The initial state is q0 .
(b) The final state is q4 .

L
C D TA
(c) Consider the string 1 and the following directed path
EX O E, P 1
q0 q5 .
M
This implies that (q0 , 1) = q5 . Because q5 is not a final state, it follows that 1 is not accepted
by M.
D
S ET A

Next consider the string 11 and the following directed path


N L S

1 1
q0 q5 q4 .

This implies that (q0 , 11) = q4 . Because q4 is a final state, it follows that 11 is accepted by M.
Next consider the string 0011 and the following directed path
O

0 0 1 1
q0 q1 q2 q3 q4 .

This implies that (q0 , 0011) = q4 . Because q4 is a final state, it follows that 0011 is accepted by
O P

M.
T

Next consider the string 00111 and the following directed path
TI M

0 0 1 1 1
q0 q1 q2 q3 q4 q6 .
O

This implies that (q0 , 00111) = q6 . Because q6 is not a final state, it follows that 00111 is not
accepted by M.
LU C

(d) Set of all strings of the form 02n 11, n 0.


9. (a) Set of all strings on {0, 1} that contains an even number of 1s.
(b) Set of all nonempty strings on {0, 1}.
(c) Set of all strings that contain an odd number of as or an odd number of bs.
11. Figure Ch14Sec1Ex11(a) shows a DFA whose language is , i.e., it does not accept any string. Thus,
is a regular language, because it is accepted by a DFA. Figure Ch14Sec1Ex11(b) shows a DFA whose
language is {}. Hence, {} is a regular language because it is accepted by a DFA.
SO

a,b
a,b a,b a,b
q0 q1 q0 q1

(a) (b)

Figure Ch14Sec1Ex11

Potrebbero piacerti anche