Question Bank (COMP)
Question Bank (COMP)
4. (i) Given that the value of p-> q is false. Determine the value of (~p ∨ ~q) ∧q.
(ii) Given that the value of p-> q is true. Determine value of ~p∨ (p↔q).
5. Make use of developing a series of logical equivalences to show ~(p V(~p ^ q)) and ~p ^
~q are logically equivalent.
6. Make use of truth table to show (p → r) ∧ (q → r) and (p ∨ q) → r are logically
equivalent.
Unit 2
1. Prove Let X = {1, 2, .... 7} and R = {(x, y) / x–y, is divisible by 3}. Show that R is
equivalence relation. Draw graph of R.
Unit 3
1. Find the shortest path between a to z for given graph using Dijkstra’s algorithm
2. Find the number of vertices, the number of edges, and the degree of each vertex in
the given undirected graph G and H. Identify all isolated and pendant vertices.
3. Find the length of a shortest path between a and z in the given weighted graph Using
Dijkstra’s Algorithm
5. Justify your answer whether following graphs are bipartite graph or not?
6. Construct following graph and find whether graph is planar graph or not? If it is planar
graph then redraw it: i) K3,3 ii) K3,2 iii) K4,4 iv) K4,3 v)K2,3 vi)K3,2
7. Draw the following graph and write down the degree sequence of graph.
i) K5 ii)K4 iii) C4 iv) C5 v) W4 vi) W5 vii) K3,2 viii) K2,3 ix) Q3 x) Q2
8. Apply Dijkstra’s algorithm and find the length of a shortest path between a and z in the
given weighted graph.
9. Partition of the set V(G) into two disjoint sets v1(G) & v2(G) such that each edge of the
graph has its one end in v1(G) & other end in v2(G). Write down whether it is bipartite
graph or not?
10. Apply Dijkstra’s algorithm and find the length of a shortest path between 0 and 6 in the
given weighted graph.
11. Apply Dijkstra’s algorithm and find the length of a shortest path between a and z in the
given weighted graph.
12. Determine the maximum flow in the transport network shown in following figure
Unit 4
1. Explain following tree terminologies :
• Node
• Root
• Parent Node
• Leaf Node
• Children
• Internal node
• Degree of a node
• Degree of a tree
• Level of a tree
• Height of a tree
• Ancestors
• Descendants
• Sibling
2. Make use of concepts of tree and answer following questions with respect to tree shown
below
7. Construct a binary search tree for input data J ,R ,D,G,W,E,M,H,P,A,F,Q. List a root node,
leaf nodes and interior nodes
8. shows the binary search tree that corresponds to the integer sequence {5, 3, 1, 9, 6,
4}. List a root node, leaf nodes and interior nodes
9. Construct a binary search tree for input data 200,100,300,50,150,250,400,10,75,125,175.
List a root node, leaf nodes and interior nodes.
10. Build the preorder, postorder and inorder traversal of the binary tree as
Unit 5
10. Make use of (2,6) encoding function e, where e(00) =011010 e(01)= 010101 e(10) =
101101 e(11) = 101100 i) Find the minimum distance of e ii) How many errors will e detect?
11. Make use of (2,5) encoding function e, where e(00) =01000 e(01)= 01010 e(10) =
00101 e(11) = 11110 i) Find the minimum distance of e ii) How many errors will e detect?
12. 9. Make use of (2,6) encoding function e, where e(00) =011000 e(01)= 010110 e(10) =
101011 e(11) = 101000 i) Find the minimum distance of e ii) How many errors will e detect?
13. Make use of (2,5) encoding function e, where e(00) =00000 e(01)= 01110 e(10) =
00111 e(11) = 11111 i) Find the minimum distance of e ii) How many errors will e detect?