Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Graph Theory Data Structures

Total questions: 17

Worksheet time: 9mins

Name
Class
Date
1.

Which set represents the vertices of the graph?

a)

{1,2}, {2,3}. {2,4}, {4,5}, {4,6}

b)

{1, 2, 3, 4, 5, 6,}

c)

{1, 2, 3, 4, 5, 6, 7}

d)

{1,2}, {2,3}. {2,4}, {4,5}, {4,6}, {6,7}

2.

What is the degree of vertex 4?

a)

3

b)

4

c)

5

d)

7

3.

Which two vertices are adjacent vertices?

a)

5 is adjacent to 6

b)

3 is adjacent to 6

c)

4 is adjacent to 1

d)

3 is adjacent to 2

4.

The graph represents the following vocabulary term.

a)

Cycle

b)

Path

c)

Complete Graph

d)

Complete Bipartite Graph

5.

What is the weight of the shortest path from A to F?

a)

5

b)

7

c)

9

d)

11

6.

Which vertices are adjacent to E?

a)

B and C

b)

B, C, D, and A

c)

B

d)

A, B, C, D, F, G

7.

Which is an example of a disconnected graph?

a)
b)
c)
d)
e)

None are disconnected graphs

8.

Which of the following is true?

a)

A graph may contain no edges and many vertices

b)

A graph may contain many edges and no vertices

c)

A graph may contain no edges and no vertices

9.

Which of the following is not a style of graph traversal in computing?

a)

Breadth-First

b)

Depth-First

c)

Height-First

10.

Graph traversal is used to find the ______ route to visit all nodes in a network

a)

Shortest

b)

Best

c)

Longest

d)

Most secure

11.

Which method of graph traversal makes use of a stack?

a)

Depth-First

b)

Breadth-First

12.

Which method of graph traversal makes use of a queue?

a)

Depth-First

b)

Breadth-First

13.

Which order of traversal is correct using depth-first?

a)

A B C G D E F

b)

A B D C E C G

14.

Which of the following beginnings to a graph traversal would not be correct for depth-first?

a)

A B C G

b)

A D F

c)

A E D F

d)

A B D C

15.

Which order of traversal is correct using breadth-first?

a)

A B D E C F G

b)

A B C G D E F

16.

A has been visited what happens next

a)

Visit B

b)

Visit D

c)

Visit E

d)

Visit C

17.

With breadth-first traversal, which node will be visited next?

a)

C

b)

F

c)

G