Important Questions
Important Questions
Important Questions
1. Let p and q be the propositions “The election is decided” and “The votes have been counted,” respectively.
Express each of these compound propositions as an English sentence. (Any Six)
A) ¬P B) P ∨ Q C) ¬P ∧ Q D) Q → P E) ¬Q →¬P F) ¬P → ¬Q
G) P ↔ Q H) ¬ Q ∨ (¬P ∧ Q)
Answer :
C) ¬P ∧ Q: "The election is not decided, and the votes have been counted."
D) Q → P: "If the votes have been counted, then the election is decided."
E) ¬Q → ¬P: "If the votes have not been counted, then the election is not decided."
F) ¬P → ¬Q: "If the election is not decided, then the votes have not been counted."
G) P ↔ Q: "The election is decided if and only if the votes have been counted."
H) ¬Q ∨ (¬P ∧ Q): "Either the votes have not been counted or the election is not decided and the votes
5. Explain Surjective, Injective, Bijective and Inverse function each with example.
Answer:-
1. One to one function (Injective): A function is called one to one if for all elements a and b in A, if f(a)
= f(b),then it must be the case that a = b.
2. Onto Function (surjective) : If every element b in B has a corresponding element a in A such that f(a)
= b. It is not required that a is unique; The function f may map one or more elements of A to the same
element of B.
3. One to one correspondence function (Bijective): A function is Bijective function if it is both one to
one and onto function.
4. Inverse Functions: Bijection function are also known as invertible function because they have inverse
function property. The inverse of bijection f is denoted as f-1. It is a function which assigns to b, a unique
element a such that f(a) = b. hence f-1 (b) = a.
6. Consider the set X ={1,2,3,4} and the relation R defined on X as follows: R={(1,1), (2,2), (3,3), (4,4),
(1,2), (2,1), (2,3), (3,2)}
a) Draw the Relation Matrix.
b) is reflexive, symmetric or transitive. Justify your answer.
c) Draw its directed graph.
Answer:
A) Relation Matrix.
1 2 3 4
1
1 1 0 0
1
2 1 1 0
3 0 1 1 0
4 0 0 0 1
b) is Reflexive – All Diagonal MR are equal to 1. (1, 1), (2, 2), (3, 3), and (4, 4) are present in R. The
relation R is reflexive
is Symmetric – (2,1) and (1,2) , (3,1) and (1,3) and (4,2) and (2,4) are equal. (1, 2) is in
R, and (2, 1) is also in R. The relation R is symmetric.
is Transitive - The relation R is not transitive. For example, (1, 2) and (2, 3) are in
R, but (1, 3) is not in R. Therefore, R lacks the transitive property.
c) directed graph.
7. (a) Draw the graph K3, 5.
Or
8. Show that following graphs are isomorphic. Also give correspondence between edges and vertices of two
graphs.
Answer:-
1. Number of vertices are same 5
2. Number of edges are same 8
3. An equal number of vertices with given degree
A=3 1= 3
B= 3 3=3
C=4 2=4
D=3 4=3
E= 3 5=3
The correspondence between the vertices and edges of the two graphs could be as follows:
Vertices:
A corresponds to 1
B corresponds to 3
C corresponds to 2
D corresponds to 4
E corresponds to 5
This correspondence preserves the adjacency between vertices, so the two graphs are isomorphic.
9. What is Graph Coloring and Chromatic Number? Find chromatic number of the following graph-
Answer:
Graph Coloring is also called as Vertex Coloring. No two adjacent vertices are colored with the same color.
Graph Coloring is a process of assigning colors to the vertices of a graph.
Chromatic Number is the minimum number of colors required to color any graph such that no two adjacent
vertices of it are assigned the same color.
Chromatic number: least number of colors needed to color the graph
Vertex a b c d e f g
Color C1 C2 C1 C3 C2 C3 C4
Answer:-
Kruskal's Algorithm-
• Kruskal's Algorithm is a famous algorithm. It is used for constructing the Minimal Spanning Tree
(MST) of a given graph.
• To apply Kruskal's algorithm, the given graph must be weighted, connected and undirected.
Algorithm: The steps of the algorithm are
• The edges of the given graph G are arranged in the order of increasing weights.
• An edge G with minimum weight is selected as an edge of the required spanning tree.
• If adding an edge creates a cycle, then reject that edge and go for the next least weighted edge.
• This procedure is stopped after n-1 edges have been selected
• Finally we got a Minimum Spanning Tree (MST)
11. Construct a Binary Search Tree by inserting the following sequence of numbers: 45, 15, 79, 90, 10,
55, 12, 20, 50. Also Find Pre-order, In-order and post-order traversal of Binary Search Tree.
Answer:-
Pre-order Traversal (Root, Left, Right): 45, 15, 10, 12, 20, 79, 55, 50, 90
In-order Traversal (Left, Root, Right): 10, 12, 15, 20, 45, 50, 55, 79, 90
Post-order Traversal (Left, Right, Root): 12, 10, 20, 15, 50, 55, 90, 79, 45
+6 0 1 2 3 4 5
0 0 1 2 3 4 5
1 1 2 3 4 5 0
2 2 3 4 5 0 1
3 3 4 5 0 1 2
4 4 5 0 1 2 3
5 5 0 1 2 3 4
1. Closure property: Since all the entries of the composition table are the elements of the given set, the
set G is closed under +6 .
2. Associativity: The binary operation +6 is associative in G.
for ex. (2 +6 3) +6 4 = 5 +6 4 = 3 and
2 +6 ( 3 +6 4 ) = 2 +6 1 = 3
3. Identity : Here, The first row of the table coincides with the top row.
The element heading that row , i.e., 0 is the identity element.
4. Inverse: From the composition table, we see that the inverse elements of
0, 1, 2, 3, 4. 5 are 0, 5, 4, 3, 2, 1 respectively.
5. Commutativity: The corresponding rows and columns of the table are identical. Therefore the binary
operation +6 is commutative.
Hence, (G, +6 ) is an abelian group.
14. Show that the set of all positive rational numbers forms an abelian group under the composition *
defined by a * b = (ab)/2.
Answer:-
Let A = set of all positive rational numbers.
Let a, b, c be any three elements of A.
1. Closure property: Product of two positive rational numbers is again a rational number.
i.e., a *b ∈ A for all a, b ∈ A .
2. Associativity: (a * b) * c = (ab/2) * c = (abc) / 4
a * (b * c) = a * (bc/2) = (abc) / 4
3. Identity : Let e be the identity element.
We have a * e = (a e)/2 …(1) , By the definition of * again,
a*e=a …..(2) ,
Since e is the identity.
From (1) and (2), (a e)/2 = a ⇒ e = 2 and 2 ∈ A .
∴ Identity element exists, and ‘2’ is the identity element in A.
4. Inverse: Let a ∈ A
let us suppose b is inverse of a.
Now, a * b = (a b)/2 ….(1) (By definition of inverse.) Again, a * b = e = 2 …..(2)
(By definition of inverse)
From (1) and (2), it follows that (a b)/2 = 2
=> b = (4 / a) ∈ A
∴ (A ,*) is a group.
5. Commutativity: a * b = (ab/2) = (ba/2) = b * a Hence, (A,*) is an abelian group.
16. Show that the maximum number of edges in a simple graph having n verti-ces is n*(n-1)/2.
19. Consider the second-order homogeneous recurrence relation an = an-1 + 2an-2 with the initial
conditions a0 = 2, and a1 = 7,
(a) Find the next three terms of the sequence.
(b) Find the general solution.
(c) Find the unique solution with the given initial conditions.
20. Solve the following recurrence tn = 6tn-1 - 11tn-2 + 6tn-3 with initial conditions
t0 = 1, t1 = 5, and t2 = 15
21. Determine the sequence {an} where an = 3n for every non-negative integer, n is a solution of the
recurrence relation an = 2a n-1 – a n-2 for n = 2, 3, 4 …
22. Find the shortest path in the given graph using Dijkstra shortest path algorithm.
23. For each of the following, determine whether the binary operation * is commutative or associative?
i) N is the set of natural numbers and a * b = a + b + 2 for a, b ∈N
ii) On N where a * b = min (a, b+2)
iii) On R where a * b = ab
24. Consider the group G = {1, 2, 3, 4, 5, 6} under multiplication modulo 7.
(a) Find the multiplication table of G.
(b) Find the 2-1, 3-1, 6-1.
(c) Find the orders and subgroups generated by 2 and 3.
25. Let A = { 0, 1, 2, 3} & <A, * > be an algebraic system, where ∀ a,b ∈ A and a * b = (a + b) mod 4.
Find ∀ a ∈ A, a2, a3 , a4.