wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Graphs

Total questions: 27

Worksheet time: 14mins

Name
Class
Date
1.

In the graph shown, D is an example of a(n) ________ .

a)

Edge

b)

Vertex

c)

Path

d)

Sling

2.

In the graph shown, (A, F) is an example of a(n) ________ .

a)

Edge

b)

Vertex

c)

Path

d)

Sling

3.

In the graph shown, A, B, E is an example of a(n) ________ .

a)

Edge

b)

Vertex

c)

Path

d)

Sling

4.

Which of the following is a cycle shown in the graph?

a)

B, F, A, B

b)

A, B, E

c)

A, E, D, A

d)

A, C, B, D, A

5.

Which of the following is not an edge in this graph?

a)

(A, D)

b)

(D, A)

c)

(F, A)

d)

(A, E)

6.

Vertices are considered adjacent if ________ .

a)

An edge connects them

b)

There is a path from one vertex to the other

c)

Both vertices are contained in a cycle

d)

The length of the path between them is less than 5

7.

A complete graph is a graph _________ .

a)

where every vertex has a degree >= 1

b)

that has the maximum number of edges connecting vertices

c)

that for any two vertices, the graph has a path

d)

that has at least one edge to every vertex

8.

The formula for finding the number of edges in a complete graph is ________ where V is the number of vertices.

a)

V (V+1) / 2

b)

2 (V+1) / V

c)

V (V-1) / 2

d)

(V+2) / 2

9.

The number of edges needed in a complete graph with 5 vertices is ________ .

a)

10

b)

15

c)

5

d)

25

10.

What is the length of the path F, A, C, B, D?

a)

3

b)

4

c)

5

d)

6

11.

A strongly connected graph is a graph _________ .

a)

where every vertex has a degree >= 1

b)

that has the maximum number of edges connecting vertices

c)

that for any two vertices, the graph has a path

d)

that has at least one edge to every vertex

12.

T/F: the graph is strongly connected.

a)

True

b)

False

13.

T/F: the graph is strongly connected.

a)

True

b)

False

14.

A network is a graph with _______ .

a)

No cycles

b)

Weights associated with each edge

c)

At least one cycle

d)

The maximum number of possible edges

15.

T/F: Networks can be directed or undirected

a)

True

b)

False

16.

Which data structure is used to perform a traversal in breadth first search?

a)

Stack

b)

Queue

c)

Linked List

d)

Heap

17.

Which data structure is used to perform a traversal in depth first search?

a)

Stack

b)

Queue

c)

Linked List

d)

Heap

18.

T/F: A minimum spanning tree never has any cycles

a)

True

b)

False

19.

When building a minimum spanning tree starting from vertex A, the first edge to be added would be _________ .

a)

(A, C)

b)

(A, B)

c)

(A, F)

d)

(C, D)

20.

When building a minimum spanning tree starting from vertex A, the second edge to be added would be _________ .

a)

(A, C)

b)

(A, B)

c)

(C, G)

d)

(C, D)

21.

T/F: You will always get the same minimum spanning tree no matter which vertex you start at.

a)

True

b)

False

22.

T/F: The weight of a graph's minimum spanning tree will always be the same no matter which vertex you start at.

a)

True

b)

False

23.

T/F: It is possible to get multiple shortest paths when running Dijkstra's shortest path algorithm.

a)

True

b)

False

24.

After completing Dijkstras algorithm to find the shortest path from A to G, which vertex has the value "A, C" in its path column?

a)

F

b)

E

c)

D

d)

G

25.

After completing Dijkstras algorithm to find the shortest path from A to G, which vertex has the value "5" in its cost column?

a)

F

b)

E

c)

D

d)

G

26.

After completing Dijkstras algorithm to find the shortest path from A to G, we discover the cost of this path is ______ .

a)

4

b)

5

c)

6

d)

7

27.

The weight of the minimum spanning tree for this graph is _____ .

a)

12

b)

15

c)

17

d)

18