Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PythonDS

Total questions: 13

Worksheet time: 7mins

Name
Class
Date
1.

Which of the following statements for a simple graph is correct?

a)

a) Every path is a trail

b)

b) Every trail is a path

c)

c) Every trail is a path as well as every path is a trail

d)

d) Path and trail have no relation

2.

2. In the given graph identify the cut vertices

a)

a) B and E

b)

b) C and D

c)

c) A and E

d)

d) C and B

3.

For the given graph(G), which of the following statements is true?

a)

a) G is a complete graph

b)

b) G is not a connected graph

c)

c) The vertex connectivity of the graph is 2

d)

d) The edge connectivity of the graph is 1

4.

What is the number of edges present in a complete graph having n vertices?

a)

a) (n*(n+1))/2

b)

b) (n*(n-1))/2

c)

c) n

d)

d) Information given is insufficient

5.

How many undirected graphs (not necessarily connected) can be constructed out of a given set V= {V 1, V 2,…V n} of n vertices ?

a)

(A) n(n-l)/2

b)

(B) 2^n

c)

(C) n!

d)

(D) 2^(n(n-1)/2)

6.

20. The time complexity to calculate the number of edges in a graph whose information in stored in form of an adjacency matrix is ____________

a)

A. O(V)

b)

B. O(E^2)

c)

C. O(E)

d)

D. O(V^2)

7.

Which of the following ways can be used to represent a graph?

a)

A. Adjacency List and Adjacency Matrix

b)

B. Incidence Matrix

c)

C. Adjacency List, Adjacency Matrix as well as Incidence Matrix

d)

D. None of the mentioned

8.

for which of the following combinations of the degrees of vertices would the connected graph be eulerian?

a)

A. 1,2,3

b)

B. 2,3,4

c)

C. 2,4,5

d)

D. 1,3,5

9.

A complete graph can have ..............

a)

a.n^2 spanning trees

b)

b. n^(n-2) spanning trees

c)

c.n^(n+1) spanning trees

d)

d.n^n spanning trees

10.

Graph traversal is different from a tree traversal, because:

a)

a.trees are not connected

b)

b.graphs may have loops

c)

c.trees have root

d)

d.None of these

11.

The spanning tree of connected graph with 10 vertices contains ..............

a)

a.9 edges

b)

b.11 edges

c)

c.10 edges

d)

d. 9 vertices

12.

If locality is a concern, you can use ................ to traverse the graph.

a)

a.Breadth First Search

b)

b.Depth First Search

c)

c.Either BFS or DFS

d)

d.None of these

13.

Which of the following algorithms solves the all-pair shortest path problem?

a)

a.Floyd's algorithm

b)

b.Prim's algorithm

c)

c.Dijkstra's algorithm

d)

d.Warshall's algorithm