Sei sulla pagina 1di 2

1.

What are the different traversal techniques available for Graphs


1)Depth-First Traversal
2)Pre-Order Traversal
3)Breadth-First Traversal
a. 2 and 3
b. 1 and 2
c. 1 and 3
d. All
Ans)C

2. A graph having 'n' number of arcs for


a node that have 'n' as the head is called its
1)Outdegree
2)Postdegree
3)predegree
a. 1 and 2
b. 1 and 3
c. 2 and 3
d. None
Ans)D

3. Which of the following statements is false?


o A. A graph can drawn on paper in many ways.
o B. Graph vertices may be linked in any manner.
o C. A graph must have at least one vertex.
o D. A graph must have at least one edge.

Ans :D

4. Suppose you have a game with 5 coins in a row and each coin can be heads or
tails. What number of vertices might you expect to find in the state graph?
a. A. 7
b. B. 10
c. C. 25
d. D. 32

Ans : B

5) Which of the following statements is/are true in connection with graphs?

(a) If few nodes are associated with a Di-Graph, array based implementation is more
useful than linked list implementation.

(b) If the graph contains n nodes, a total of n2 locations must be used in array based
implementation.
(c) If the graph is not weighted, the entire graph can de described using the Adjacency
matrix.

(d) Wars hall’s Algorithm increases the efficiency of finding the transitive closure.

(e) An example of a real life situation that can be modeled by a graph is the Air path
System.
Ans) B, C, D, E

6) Which of the following statements is/are correct in connection with Graphs?


a. There are three kinds of Graphs, namely Directed Graphs, Un-directed Graphs
and Digraphs.

b. The In _degree of a node n is the number of arcs which have n as the head.

c. The path matrix of any Di-graph can be calculated as pathn[I][J]=adj1 [I][J] or


adj2[I][J] or adj3[I][J] or …… adjn[I][J]

d. Transitive closure can be calculated using the Path Matrix.

e. Transitive closure can be calculated using the Adjacency Matrix.

Ans) B, C, E

Potrebbero piacerti anche