Quiz-2 Solution
Quiz-2 Solution
1. What is the number of vertices in an undirected connected graph with 27 edges, 6 vertices of
degree 2, 3 vertices of degree 4 and remaining of degree 3?
Ans: 19
2. A bag contains 10 red marbles, 10 white marbles, and 10 blue marbles. What is the minimum no.
of marbles you have to choose randomly from the bag to ensure that we get 4 marbles of same
color?
Ans: 10
3. What is wrong with the following proofs? Clearly mention the step number which you think is
wrong.
Consider the “proof” that 2=1.
“Proof”:
Step 1. -2 = -2
Step 2. 4-6 = 1-3
Step 3. 4-6 + 9/4 = 1-3 + 9/4
Step 4. (2-3/2) ^ 2 = (1-3/2) ^ 2
Step 5. 2-3/2= 1-3/2
Step 6. 2 = 1
Ans: Step 5
4. Let G be an n-vertices undirected connected graph. Then the spanning tree of G will contain
exactly _____________________ number of edges.
Ans: n-1
5. Consider the set ∑* of all strings over the alphabet ∑ = {0, 1}.
∑* with the concatenation operation for strings forms a group ____________ (True / False).
Ans: False
Page 1 of 4
Roll No. ______________ Name__________________________ Group__________
x2 - 3x – 10 = 0
(x - 5) (x + 2) = 0
x1 = 5 x2 = -2
Its Solution is A n x n
at = A n x n = A n 5n
A n 52 = 3 A (n-1) 5 + 10 A (n-2) 50 + 7. 52
25 A n = 15 A n – 15 A + 10 A n – 20 A +175
35 A = 175
A=5
Fn = A n 5n = 5 n 5n = n 5n+1
Page 2 of 4
Solution of the Recurrence Relation can be written as:
Fn = ah + at
= a. 5n + b (-2)n + n 5n+1
We get a = -2 and b = 6
Solution is:
Fn = n 5n+1 + 6 (-2)n – 2. 5n
Q 2: Apply Floyd Warshall’s Algorithm on the given graph and find values of D0, D1, D2, D3, D4.
Ans:
Page 3 of 4
Page 4 of 4