adplus-dvertising
frame-decoration

Question

Let G be an undirected graph. Consider a depth-first traversal of G, and let T be the resulting depth-first search tree. Let u be a vertex in G and let v be the first new (unvisited) vertex visited after visiting u in the traversal. Which of the following statements is always true?

a.

{u,v} must be an edge in G, and u is a descendant of v in T

b.

{u,v} must be an edge in G, and v is a descendant of u in T

c.

If {u,v} is not an edge in G then u is a leaf in T

d.

If {u,v} is not an edge in G then u and v must have the same parent in T

Answer: (c).If {u,v} is not an edge in G then u is a leaf in T

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Let G be an undirected graph. Consider a depth-first traversal of G, and let T be the resulting depth-first search tree. Let u be a vertex in G and let v be the first new...

Similar Questions

Discover Related MCQs

Q. Consider the following statements:

S1: The sum of two singular n × n matrices may be non-singular
S2: The sum of two n × n non-singular matrices may be singular.

Which of the following statements is correct?

Q. Let f(n) = n^2Logn and g(n) = n (logn)^10 be two positive functions of n. Which of the following statements is correct?

Q. How many 4-digit even numbers have all 4 digits distinct?

Q. Let f: A→B be a function, and let E and F be subsets of A. Consider the following statements about images.

S1: f (E ∪ F) = f (E) ∪ f (F)
S1: f (E ∩ F) = f (E) ∩ f (F)

Which of the following is true about S1 and S2?

Q. Seven (distinct) car accidents occurred in a week. What is the probability that they all occurred on the same day?

Q. Consider an undirected unweighted graph G. Let a breadth-first traversal of G be done starting from a node r. Let d(r,u) and d(r,v) be the lengths of the shortest paths from r to u and v respectively in G. If u is visited before v during the breadth-first traversal, which of the following statements is correct?

Q. How many undirected graphs (not necessarily connected) can be constructed out of a given set V = {v1, v2, ... vn} of n vertices?

Q. The trapezoidal rule for integration give exact result when the integrand is a polynomial of degree:

Q. The minimum number of colours required to colour the vertices of a cycle with n nodes in such a way that no two adjacent nodes have the same colour is

Q. If X, then Y unless Z" is represented by which of the following formulae in propositional logic? ("¬" is negation "^" is conjunction, and "→" is implication)

Q. The decimal value 0.25

Q. Maximum number of edges in a n - node undirected graph without self loops is

Q. The Newton-Raphson iteration Xn + 1 = (Xn/2) + 3/(2Xn) can be used to solve the equation

Q. Four fair coins are tossed simultaneously. The probability that at least one head and one tail turn up is :

Q. A B+ -tree index is to be built on the Name attribute of the relation STUDENT. Assume that all student names are of length 8 bytes, disk block are size 512 bytes, and index pointers are of size 4 bytes. Given this scenario, what would be the best choice of the degree (i.e. the number of pointers per node) of the B+ -tree?

Q. Let P(E) denote the probability of the event E. Given P(A) = 1, P(B) = 1/2, the values of P(A | B) and P(B | A) respectively are

Q. Let A be a sequence of 8 distinct integers sorted in ascending order. How many distinct pairs of sequences, B and C are there such that (i) each is sorted in ascending order, (ii) B has 5 and C has 3 elements, and (iii) the result of merging B and C gives A?

Q. Let G be an arbitrary graph with n nodes and k components. If a vertex is removed from G, the number of components in the resultant graph must necessarily lie between

Q. Let f : A → B be an injective (one-to-one) function.

Define g : 2^A → 2^B as :
g(C) = {f(x) | x ∈ C}, for all subsets C of A.
Define h : 2^B → 2^A as :
h(D) = {x | x ∈ A, f(x) ∈ D}, for all subsets D of B.

Which of the following statements is always true ?

Q. Consider the set {a, b, c} with binary operators + and × defined as follows :

+ a b c × a b c
a b a c a a b c
b a b c b b c a
c a c b c c c b

For example, a + c = c, c + a = a, c × b = c and b × c = a. Given the following set of equations :

(a × x) + (a × y) = c
(b × x) + (c × y) = c

The number of solution(s) (i.e., pair(s) (x, y)) that satisfy the equations is :