wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Algorithmic Network Analysis - Quiz I

Total questions: 20

Worksheet time: 11mins

Name
Class
Date
1.

A computational problem is considered tractable if:

a)

It has a high storage space requirement

   

 

 

b)

It can be solved in exponential time

c)

There exists an efficient algorithm for solving it

d)

It involves complex mathematical operations

2.

What measure of complexity is commonly used to describe the least amount of time needed to solve a problem?

 

 

 

   

a)

 Best-case complexity

b)

Worst-case complexity

c)

Average-case complexity

d)

Polynomial complexity

3.

The tiling problem is an example of: 

 

   

 

a)

A tractable problem

b)

An efficient algorithm

c)

Intractable problem

d)

Polynomial complexity

4.

What is the first step in a depth-first search (DFS) of a graph?

   

   

   

   

a)

Select the vertex with the highest degree as the starting vertex.

b)

Select a first vertex to visit and label it.

c)

Sort all the vertices in descending order of their degrees.

d)

Visit all vertices and mark them unvisited.

5.

In a graph represented by adjacency lists, in what order are the vertices adjacent to a given vertex listed?

   

a)

In decreasing order of their degrees

b)

In increasing order of their degrees

c)

In increasing order of their subscripts

 

d)

In decreasing order of their subscripts

6.

In a DFS forest, what structure is each component of the forest?

 

   

a)

A directed acyclic graph (DAG)

b)

A disconnected subgraph

c)

A rooted tree

d)

A cycle

7.

What does the depth-first search index (Dfi) of a vertex represent?**

 

   

 

a)

The distance from the starting vertex

b)

The number of back edges connected to the vertex

c)

The degree of the vertex in the graph

d)

The order in which the vertex was first visited during DFS

 

8.

In a connected graph, what does the set of edges in a BFS traversal form?

   -

 

 

   -

a)

A subgraph

b)

A spanning tree

c)

A connected component

d)

A cycle

9.

If all vertices adjacent to the current active vertex have been visited in DFS, what does the algorithm do next?

 

 

   

a)

Selects the vertex with the smallest index

b)

Backtracks to the previous vertex

c)

Moves to a random unvisited vertex

d)

Stops the search

10.

A graph in which any two distinct points are adjacent is called a null graph.

a)

True

b)

False

11.

A connected acyclic graph is called __________

                                                        

a)

star 

b)

loop            

c)

tree      

d)

cyclic

12.

What is the size of a tree of order p?

a)

p

b)

p-1

c)

p+1

d)

p-2

13.

Which of the following statements is true about a forest in graph theory?

 

 

a)

A forest must have the same number of edges as vertices.  

b)

A forest is a connected graph.  

c)

Every component of a forest is a tree.  

d)

A forest contains exactly one cycle.  

14.

If a tree has 7 vertices, how many edges does it have?

a)

6

b)

7

c)

5

d)

8

15.

The size of a tree is equal to its order.  

a)

True

b)

False

16.

A forest must have the same number of edges as vertices.  

a)

True

b)

False

17.

Which statement is true regarding the relationship between connected graphs and spanning trees?

a)
  • Spanning trees only exist in trees, not in other types of graphs.

b)
  • A tree contains multiple spanning subgraphs.

c)
  • A graph is connected if and only if it contains a spanning tree.

d)
  • Every connected graph contains exactly one spanning tree.

18.

What data structure is used in Breadth-First Search (BFS) to keep track of the vertices?

a)

Linked List

b)

Array

c)

Queue

d)

Stack

19.

What kind of graph structure does BFS create in a disconnected graph?

a)

A Hamiltonian cycle

b)

A complete graph

c)

A spanning forest

d)

A spanning tree

20.

What is the time complexity of the Breadth-First Search (BFS) algorithm in a graph with p vertices and q edges?

- a) \( \)

- b) \( O(p \times q) \)

- c) \( O(p^2) \)

- d) \( ) \)

a)

O(p + q)

b)

O(p^2)

c)

O(q^2

d)

O(p - q)