Assignment
Assignment
Assignment
2. Assuming that p & q are F & q & s are T, find the truth value of each proposition:
a. p q
b. p q
c. ( p q)
d. (p q) (q r)
e. (p q) r
f. p (q r)
g. (s (p r)) ((p (r V q)) s)
h. ((p q) (q r)) (s V q)
b. Show that above equation remains true if we alter imp2 so that if p is false
and q is true, then p imp2 q is false.
10. Obtain the principal disjunctive and conjunctive normal forms of the following
formulas.
a. (P V Q) (P Q)
b. Q (P V Q)
c. P V (P (Q V (Q R)))
d. P (P (Q P))
e. (Q P) (P Q)
Which of the above formulas are tautologies?
12. Show that R (P V Q) is a valid conclusion from the premises P V Q, QR, P M &
M.
14. Show that R S can be derived from the premises P (Q S), Q and R V P.
17. Show without using Truth table that if P (Q R) is True then, Q (P R) is also
True.
19. Symbolize the expression All the world loves a lover. Using:
P(x): x is a person.
L(x): x is a lover.
R(x, y): x loves y.
21. Determine the truth value of each statement. The domain of discourse is the set
of real numbers. Justify your answers.
a. For every real number x, if x > 1, then x + 1 > 1.
b. For every real number x, x2 1 > 0.
c. For some positive integer n, if n is prime, then n+1, n+2, n+3 and n+4 are not
prime.
d. For every x, for some y, x+y = 0
e. For every x, for every y, if x2 < y2, then x < y.
22. Let T(x, y) be the propositional function x is taller than y. The domain of
discourse consists of three students: Garth, who is 5 feet 11 inches tall; Erin, who
is 5 feet 6 inches tall; and Mary who is 6 feet tall. Write the following propositions
in word & tell whether it is T or F. Also write negation of each proposition in words
& symbolically.
a. x y T(x, y) c. x y T(x, y)
b. x y T(x, y) d. x y T(x, y)
24. Consider the statement Given any positive integer n, there is a greater positive
integer. Symbolize this statement with and without using the set of positive
integers as the Universe of discourse.
29. Show that for universally & existentially quantified statements, the correct
connectives that should be used are the conditional and conjunction respectively.
*****
2. Using direct proof technique, prove that if x is a real number, then x.0 = 0.
Assume that the following are previous theorems:
If a, b, c are real numbers, then b + 0 = b; a(b + c) = ab +ac; If a+ b = a + c,
then b=c.
3. Using proof by contrapositive technique, prove that for all real numbers x and y, if
x+y 2, then either x 1 or y 1.
5. Show, by giving a proof by contradiction, that if 100 balls are placed in nine
boxes, some box contains 12 or more balls.
15. Show the postage of 24 cents or more can be achieved by using only 5-cent & 7-
cent stamps.
16. Using complete induction, prove that postage of six cents or more can be
achieved by using only 2-cent & 7-cent stamps.
18. Find an explicit formula for minimum number of moves in which the n-disk Tower
of Hanoi puzzle can be solved.
20. Solve the recurrence relation d n 4(d n 1 d n 2 ) subject to the initial conditions
d 0 1 d1
23. Prove that the worst-time for binary search for input of size n = (lg n)
25. What is the worst case of Quick sort & prove that worst case running time for
Quick Sort is O(n2).
28. Prove that worst case running time for selection sort is (n2) and best case
running time is (n).
29. Solve T(n) = 2T(n/2) + lg n exactly for n a power of 2. T(1) = 1. Express your
answer as simply as possible using the notation.
*****
2. Write all set identities and define Boolean sum of two sets.
4. Draw a Venn diagram of sets A, B, C where A B, sets B and C are disjoint, but A
and C have elements in common.
6. Given that
( A C) (B C)
( A C) (B C)
Show that A B .
11. Let A, B, C be sets. Under what condition is each of the following statements are
true?
a. ( A B ) ( A C ) A
b. ( A B) ( A C )
c. ( A B ) ( A C )
d. ( A B ) ( A C )
16. Out of 200 students, 50 of them take the Discrete Mathematics, 140 of them take
the course Economics, and 24 of them take both courses. Since both courses
have scheduled examinations for the following day, only students who are not in
either one of these courses will be able to go to the party the night before. How
many students will be at the party. Suppose that 60 of the 200 are underclass
students. Among the underclass students, 20 of them take Discrete Mathematics,
45 of them take Economics, and 16 of them take both. How many upper-class
students will be at the party?
17. Thirty cars were assembled in a factory. The options available were a radio, an air
conditioner, and white-wall tires. It is known that 15 of the cars have radios, 8 of
them have air conditioners, and 6 of them have white-wall tires. Moreover, 3 of
them have all three options. Atleast how many cars do not have any options at
all.
18. Determine the number of integers between 1 and 300 that are divisible by any of
the integers 2, 3, 5, and 7.
19. A survey on a sample of 25 new cars being sold at a local auto dealer was
conducted to see which of three popular options air-conditioning (A), radio (R),
and power windows (W), were already installed. The survey found:
15 had air-conditioning,
12 had radio,
11 had power windows,
5 had air-conditioning and power windows,
9 had air-conditioning and radio,
4 had radio and power windows,
3 had all three options.
20. Show that the set of all rational numbers is countably infinite.
21. Show that the set of all real numbers is uncountably infinite.
22. Prove that if a set is countably infinite, then its power set is not countably infinite.
23. If A and B are disjoint sets S.T. A B A , what can we say about B?
24. There is a set of five distinct computer science books, and two distinct art books
a. In how many ways can these books be arranged on a shelf?
b. In how many ways these books be arranged on a shelf if all books of the same
discipline are grouped together.
c. In how many ways these books be arranged on a shelf if the two art books are
not together?
26. a. Find the next row of Pascals triangle given the row:
1 7 21 35 35 21 7 1
b. Use the Binomial theorem to show that nk=0 2k C(n, k) = 3n
27. Is it possible to interconnect five processors so that exactly two processors are
directly connected to an identical number of processors? Explain.
28. Find the minimum number of the students needed to guarantee that five of them
belong to the same group (Bhangra, Rock, Classical).
29. A sample of 80 cars owned revealed that 24 owned station wagons and 62 owned
cars that are not station wagon. Find the number k of people who owned both a
station wagon and some other car.
30. A student must take five classes from three areas of study. Numerous classes are
offered in each discipline, but the student cannot take more than two classes in
any given area.
a. Using the Pigeonhole principle, show that the student will take at least two
classes in one area.
b. Using the inclusion-exclusion principle, show that the student will have to take
at least one class in each area.
*****
1. Let A= {a, b} and B= {4, 5, 6}. List the elements in AXB, BXA, AXA, and BXB.
2. If B= {0, 3, 6, 9,}, give a partition of B containing (a) two infinite subsets (b)
three infinite subsets.
4. If A has n elements and B has m elements, how many different relations are there
from A to B?
6. Let X be a nonempty set. Define a relation on (X), the power set of X, as (A, B)
R if A B. Is this relation reflexive, symmetric, antisymmetric, transitive, and/or a
partial order?
8. What is wrong with the following argument, which supposedly shows that any
relation R on X that is symmetric & transitive is reflexive?
Let x X. Using symmetry, we have (x, y) and (y, x) both in R. Since (x, y), (y, x)
R, by transitivity we have (x, x) R. Therefore R is reflexive.
9. Define the relation R on the set of positive integers by (x, y) R if the greatest
common divisor of x and y is 1. Determine whether R is reflexive, symmetric,
antisymmetric, transitive, and/ or a partial order.
13. Let P be the set of all people. Let R be a binary relation on P S.T. (a, b) is in R if a
is a brother of b. (Disregard half-brothers and fraternity brothers.) Is R reflexive?
Symmetric? Antisymmetric? Transitive? An equivalence relation? A partial
ordering relation?
16. Let A = {1, 2, 3, 4}, and let R = {(1, 2), (2, 3), (3, 4), (2, 1)}. Find the reflexive,
symmetric and transitive closure of R.
19. If A= {1, 2,, n}, show that any function from A to A which is one-to-one must
also be onto, and conversely.
20. Prove that the function f= {(1, a), (2, c), (3, b)} from X = {1, 2, 3} to Y = {a, b,
c} is bijection & hence find inverse.
22. Define characteristic function & write all properties of characteristic function.
24. Find the orbit and cycles of the set S = {1, 2, 3, 4, 5, 6} under the following
permutations:
a. 1 2 3 4 5 6
2 1 5 6 4 3
b. 1 2 3 4 5 6
2 3 4 5 6 1
c. 1 2 3 4 5 6
2 3 1 6 5 4
26. Find out which of the following permutations are even (odd) permutations
1. (1 2 3) (1 2)
2. (1 2 3 4 5) (1 2 3) (4 5)
3. (1 2) (1 4) (1 5 3)
1 2 3 4 5 6 7 8 9
2 1 3 6 4 5 9 7 8 in S9
0 1 0 1 0 0
29. a. Let A = 1 0 1 and B = 1 0 0 be Boolean matrices.
1 0 0 0 1 1
1 0 0 0 1 1
b. Let A = 0 0 1 and B = 1 0 0 be Boolean matrices.
1 1 0 0 1 0
30. Show that any two disjoint permutations commute i.e. if f and g are any two
disjoint permutations of set S, then f g g f .
*****
1. Prove that power set of a finite set under subset relation is a lattice. Define
meet, join and complement operation in general for this lattice.
2. Prove that set of all divisors of a positive integer under division relation is
a lattice. Define meet, join and complement operation in general for this
lattice.
6. Consider the set Q of rational numbers with the usual , and consider the
subset D of Q defined by
D = {x: x Q and 8 < x3 < 15}
a. Is D bounded above or below?
b. Find upper bound and lower bound of D.
c. Do sup(D) and inf(D) exist?
8. Draw the Hasse diagrams of the factors of 6, 8, 12, 15, 18, 20, 24, 25, 30,
32, 36, 40, 48 all ordered by divisibility.
9. State whether each of the following is true or false and, if it is false, give a
counterexample.
a. If a poset S has only one maximal element a, then a is a last element.
b. If a finite poset S has only one maximal element a, then a is last
element.
c. If a linearly ordered set S has only one maximal element a, then a is
the last element.
10. Show that a lattice is distributive iff for any elements a, b, c in the lattice
( a b ) c a (b c ) .
17. Prove that greatest element (if exists) is unique maximal element.
21. Show that two lattices L & M are distributive iff LXM is distributive.
30. Use a Karnaugh map to find a minimal sum of each Boolean expression:
a. E = xy + xy + xy
b. E = x + xyz + xyz
c. E = yz + yzt + zt
d. E = yzt + xzt + xyz
*****
1. Convince yourself that the maximum degree of any vertex in a simple graph with
n vertices is n 1.
2. Show that the maximum number of edges in a simple graph with n vertices is
n(n-1)/2.
4. Prove that the number of vertices of odd degree in a graph is always even.
5. Prove that a graph cannot have single odd vertex. Also prove that if a graph
contains exactly two odd vertices, then they are joined by some edge.
6. Prove that if average degree of a connected graph G > 2, then it has atleast one
cycle.
7. Prove that a simple graph with n vertices and k components can have at most
(n k)(n k + 1)/2 edges.
9. Prove that a given connected graph G is an Euler graph if and only if all vertices
of G are of even degree.
10. Prove that any two simple connected graphs with n vertices, all of degree two, are
isomorphic.
11. Prove that a simple graph with n vertices must be connected if it has more that
[(n 1)(n 2)]/2 edges.
12. Let a, b, and c be three distinct vertices in a graph. There is a path between a and
b and also there is a path between b and c. Prove that there is a path between a
and c.
13. Draw a graph in which an Euler line is also a Hamiltonian circuit. What can you
say about such graphs in general?
16. Can you construct a graph if you are given all its spanning trees? How?
17. Let T1 and T2 be two spanning trees of a connected graph G. If edge e is in T1 but
not in T2, prove that there exists another edge f in T2 but not in T1 such that sub
graphs (T1 e) U f and (T2 f) U e are also spanning trees of G.
19. Prove that every tree with two or more vertices is 2-chromatic.
20. Prove that a graph with at least one edge is 2-chromatic if and only if it has no
circuits of odd length.
21. Given a graph, what is the technique to find all maximal independent sets and all
minimal dominating sets.
22. Prove that a graph of n vertices is a complete graph if and only if its chromatic
polynomial is Pn () = ( - 1)( - 2)( - n + 1).
23. Prove that an n-vertex graph is a tree if and only if its chromatic polynomial Pn()
= ( - 1)n 1
24. Prove that the vertices of every planar graph can be properly colored with five
colors.
25. Draw all possible simple non-isomorphic graphs with four vertices. Describe the
characteristics of each graph.
27. A connected graph has 12 edges and 6 vertices, each of which has degree 2 or 5.
How many vertices are of each degree?
28. Define a binary tree, regular binary tree, and path length of a binary tree.
29. Define compliment of a graph, Euler circuits, Hamiltonian path and Hamiltonian
circuits.
*****