Unit 4 - Practice Quiz

MTH401 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 In a graph G = (V, E), what does V represent?

graph terminologies Easy
A. The set of edges
B. The set of vertices
C. The set of paths
D. The set of loops

2 The degree of a vertex in an undirected graph is defined as:

graph terminologies Easy
A. The number of paths starting from it
B. The number of vertices connected to it
C. The number of loops at that vertex
D. The number of edges incident to it

3 A simple graph in which every pair of distinct vertices is connected by a unique edge is called a:

special types of graphs(complete, cycle, regular, wheel, cube, bipartite and complete bipartite) Easy
A. Regular graph
B. Complete graph
C. Cycle graph
D. Bipartite graph

4 What does an entry in an adjacency matrix of a simple graph represent?

adjacency and incidence matrix Easy
A. There is a loop at vertex i
B. The weight of the edge between vertex i and vertex j is 1
C. There is an edge between vertex i and vertex j
D. The distance between vertex i and vertex j is 1

5 An undirected graph is said to be 'connected' if:

path and connectivity for undirected and digraphs Easy
A. Every vertex has a degree of at least 1
B. It is a complete graph
C. It has no cycles
D. There is a path between every pair of distinct vertices

6 What is the primary problem that Dijkstra's algorithm solves?

Dijkstra’s algorithm for shortest path problem Easy
A. Checking if a graph is connected
B. Finding the longest path in a graph
C. Finding the minimum spanning tree
D. Finding the shortest path from a single source to all other vertices

7 For two graphs to be isomorphic, which of these properties must they share?

graph-isomorphism Easy
A. The same drawing or layout
B. They must both be planar
C. The same vertex labels
D. The same number of vertices and edges

8 A graph is called 'bipartite' if its vertices can be divided into two disjoint sets, V1 and V2, such that:

special types of graphs(complete, cycle, regular, wheel, cube, bipartite and complete bipartite) Easy
A. The graph has an even number of vertices
B. Every vertex in V1 is connected to every vertex in V2
C. All vertices have an even degree
D. Every edge connects a vertex in V1 to one in V2

9 For a simple undirected graph with 'n' vertices, its adjacency matrix is always:

adjacency and incidence matrix Easy
A. A diagonal matrix
B. An upper triangular matrix
C. A symmetric matrix
D. An identity matrix

10 What is a 'simple path' in a graph?

path and connectivity for undirected and digraphs Easy
A. The shortest path between two vertices
B. A path that does not contain any repeated vertices
C. A path that uses the minimum number of edges
D. A path that starts and ends at the same vertex

11 An edge that connects a vertex to itself, i.e., (u, u), is called a:

graph terminologies Easy
A. Path
B. Parallel edge
C. Bridge
D. Loop

12 A graph where every vertex has the same degree is known as a:

special types of graphs(complete, cycle, regular, wheel, cube, bipartite and complete bipartite) Easy
A. Bipartite graph
B. Complete graph
C. Regular graph
D. Wheel graph

13 What are the dimensions of an incidence matrix for a graph with 'n' vertices and 'm' edges?

adjacency and incidence matrix Easy
A.
B.
C.
D.

14 A cycle graph with vertices (where ) has how many edges?

special types of graphs(complete, cycle, regular, wheel, cube, bipartite and complete bipartite) Easy
A.
B.
C.
D.

15 A critical requirement for the standard Dijkstra's algorithm to guarantee the correct shortest path is that:

Dijkstra’s algorithm for shortest path problem Easy
A. All edge weights must be non-negative
B. The graph must be acyclic
C. The graph must be undirected
D. The graph must be complete

16 In a directed graph (digraph), what does 'strong connectivity' mean?

path and connectivity for undirected and digraphs Easy
A. The graph has no directed cycles
B. There is a directed path from every vertex to every other vertex
C. Every vertex has a positive in-degree and out-degree
D. The underlying undirected graph is connected

17 Which of the following is a graph 'invariant' (a property preserved by isomorphism)?

graph-isomorphism Easy
A. The labels of the vertices
B. The adjacency matrix representation
C. The geometric drawing of the graph
D. The degree sequence of the graph

18 How many vertices and edges does a complete bipartite graph have?

special types of graphs(complete, cycle, regular, wheel, cube, bipartite and complete bipartite) Easy
A. vertices and edges
B. vertices and edges
C. vertices and edges
D. vertices and edges

19 In the adjacency matrix of a graph, what do the diagonal entries () represent?

adjacency and incidence matrix Easy
A. The number of edges in the graph
B. The degree of vertex i
C. The total number of vertices
D. The presence of a loop at vertex i

20 A Wheel Graph is formed by:

special types of graphs(complete, cycle, regular, wheel, cube, bipartite and complete bipartite) Easy
A. Connecting n vertices in a single line
B. Joining a central vertex to all vertices of a cycle
C. Creating a complete graph and adding one vertex
D. Arranging n vertices in a grid

21 What is the total number of edges in the complete bipartite graph and the n-cube graph respectively?

special types of graphs(complete, cycle, regular, wheel, cube, bipartite and complete bipartite) Medium
A. and
B. and
C. and
D. and

22 If is the adjacency matrix of a simple undirected graph with vertices, what does the entry of the matrix represent?

adjacency and incidence matrix Medium
A. The number of common neighbors between vertex and vertex .
B. The number of paths of length 2 between vertex and vertex .
C. 1 if there is an edge between vertex and vertex , and 0 otherwise.
D. The shortest path distance between vertex and vertex .

23 Consider a weighted graph with vertices {S, A, B, C} and edges (S, A, 2), (S, B, 5), (A, B, 1), (A, C, 4), (B, C, 2). Using Dijkstra's algorithm starting from source S, what is the order in which the vertices are finalized (added to the set of visited vertices)?

Dijkstra’s algorithm for shortest path problem Medium
A. S, B, C, A
B. S, A, C, B
C. S, A, B, C
D. S, B, A, C

24 Which of the following properties is necessary but NOT sufficient to prove that two simple graphs are isomorphic?

graph-isomorphism Medium
A. There exists a bijection between their vertex sets that preserves adjacency.
B. They have the same number of vertices and edges.
C. They are both complete graphs with the same number of vertices.
D. They have the same degree sequence.

25 What is the minimum number of edges that must be removed from a Wheel graph (a cycle with a central hub) to make it disconnected?

path and connectivity for undirected and digraphs Medium
A. 1
B. 2
C. 3
D. 4

26 What is the sum of all entries in the adjacency matrix of a directed graph with vertices and edges?

adjacency and incidence matrix Medium
A.
B.
C.
D.

27 A simple graph is 3-regular and has 8 vertices. Which of the following special graphs matches this description?

special types of graphs(complete, cycle, regular, wheel, cube, bipartite and complete bipartite) Medium
A. The cube graph
B. The complete graph
C. The cycle graph
D. The wheel graph

28 According to the handshaking lemma, what is the number of vertices with odd degree in any simple graph?

graph terminologies Medium
A. Must be zero.
B. Must be an odd number.
C. Must be an even number.
D. Can be any number depending on the graph.

29 A directed graph is strongly connected if for every pair of vertices (u, v), there is a path from u to v and a path from v to u. Which of the following directed graphs is strongly connected?

path and connectivity for undirected and digraphs Medium
A. A directed path ()
B. A complete graph where all edges are directed from a lower index vertex to a higher index vertex
C. A directed acyclic graph (DAG) with more than one vertex
D. A directed cycle

30 For which of the following values of is the cycle graph bipartite?

special types of graphs(complete, cycle, regular, wheel, cube, bipartite and complete bipartite) Medium
A.
B.
C.
D.

31 In Dijkstra's algorithm, the relaxation step for an edge (u, v) with weight w(u,v) is typically expressed as: if dist[v] > dist[u] + w(u,v) then update dist[v]. Under what condition would this relaxation fail to find the true shortest path?

Dijkstra’s algorithm for shortest path problem Medium
A. If the graph contains edges with negative weights.
B. If the graph is not connected.
C. If the graph is directed.
D. If the graph contains cycles.

32 Consider two graphs, (a cycle with 6 vertices) and (a path with 6 vertices). Which of the following statements is a valid reason why they are not isomorphic?

graph-isomorphism Medium
A. They have a different number of edges.
B. They have a different number of vertices.
C. One is connected, and the other is not.
D. Their degree sequences are different.

33 Let be the incidence matrix of a simple, connected, undirected graph with vertices and edges. What is the sum of the entries in any single row of ?

adjacency and incidence matrix Medium
A. The degree of the corresponding vertex.
B. The total number of edges, .
C. Always 2.
D. The total number of vertices, .

34 For a dense graph (a graph where the number of edges is close to the maximum possible), which representation is generally more space-efficient?

representing graphs Medium
A. Adjacency Matrix
B. Edge List
C. Incidence Matrix
D. Adjacency List

35 What is the maximum number of edges in a simple undirected graph with 10 vertices that does not contain a (a triangle)?

graph terminologies Medium
A. 30
B. 25
C. 20
D. 24

36 The adjacency matrix of a simple graph is symmetric. What property of the graph does this reflect?

adjacency and incidence matrix Medium
A. The graph is undirected.
B. The graph has no cycles.
C. The graph is regular.
D. The graph is connected.

37 What is the vertex connectivity of the complete graph for ?

path and connectivity for undirected and digraphs Medium
A.
B.
C.
D. 1

38 Consider the following weighted graph: edges (A,B,1), (A,C,4), (B,C,2), (B,D,5), (C,D,1). Using Dijkstra's algorithm starting at A, what is the shortest path distance to vertex D?

Dijkstra’s algorithm for shortest path problem Medium
A. 5
B. 6
C. 4
D. 7

39 Let be a simple graph and be its complement. If is self-complementary (isomorphic to its complement), what can be said about the number of vertices, ?

graph-isomorphism Medium
A. must be a prime number.
B. must be an even number.
C. must be congruent to 0 or 1 mod 4.
D. must be an odd number.

40 Which of the following special graphs is NOT bipartite?

special types of graphs(complete, cycle, regular, wheel, cube, bipartite and complete bipartite) Medium
A. The cycle graph
B. The cube graph
C. The wheel graph
D. The complete bipartite graph

41 Let be the adjacency matrix of a simple, undirected graph . What does the trace of the matrix (i.e., ), represent?

adjacency and incidence matrix Hard
A. The number of triangles (cycles of length 3) in .
B. Six times the number of triangles in .
C. The sum of the cubes of the degrees of all vertices in .
D. Twice the number of edges in .

42 You run Dijkstra's algorithm on a weighted, directed graph to find the shortest path from to all other vertices. A new graph is created by adding a positive constant to the weight of every edge in . Which statement is true about the shortest path from to any other vertex in ?

Dijkstra’s algorithm for shortest path problem Hard
A. The shortest path in might be different from the shortest path in .
B. The shortest path in is always the same as the shortest path in .
C. The shortest path in is the path with the maximum number of edges in .
D. Dijkstra's algorithm will fail on because the edge weights have changed.

43 A simple graph is called self-complementary if it is isomorphic to its complement . If is a self-complementary graph with vertices, which of the following must be true about ?

graph-isomorphism Hard
A. must be an even number.
B. must be a prime number.
C. must be of the form for some integer .
D. must be of the form or for some integer .

44 Let be a simple graph where the minimum degree is . According to Whitney's theorem on graph connectivity, we know that , where is the vertex connectivity and is the edge connectivity. Which of the following statements is always true for any graph that is not a complete graph?

path and connectivity for undirected and digraphs Hard
A.
B. It is possible for .
C.
D.

45 Consider the -dimensional cube graph for . What is the number of distinct 4-cycles () in ?

special types of graphs Hard
A.
B.
C.
D.

46 How can Dijkstra's algorithm be adapted to find the path with the highest reliability between two vertices and ? The reliability of a path is the product of the reliabilities (probabilities) of its edges, where each edge weight is in the range .

Dijkstra’s algorithm for shortest path problem Hard
A. The problem cannot be solved using a shortest path algorithm.
B. By replacing edge weights with and finding the shortest path.
C. By replacing edge weights with and finding the shortest path.
D. By replacing edge weights with and finding the shortest path.

47 Consider a directed graph in which for every pair of distinct vertices , there is a path from to or a path from to (but not necessarily both). What can be definitively concluded about the structure of the condensation graph of ?

path and connectivity for undirected and digraphs Hard
A. is a directed acyclic graph (DAG) where every vertex has an in-degree or out-degree of 0.
B. is a single vertex.
C. is a complete graph.
D. is a simple directed path.

48 If two simple graphs and are isomorphic, which of the following is necessarily true about their respective adjacency matrices and ?

graph-isomorphism Hard
A. and have the same eigenvalues.
B. and have the same number of zero entries.
C. .
D. The sum of all elements in is equal to the sum of all elements in .

49 A simple graph has 12 vertices and 18 edges. The graph has exactly 4 connected components. If three of the components are trees, what is the number of edges in the fourth component?

graph terminologies Hard
A. 10
B. 9
C. 11
D. It cannot be determined from the given information.

50 When running Dijkstra's algorithm on a graph with vertices and edges, if the graph is dense (i.e., ), what is the most efficient priority queue implementation and the resulting time complexity?

Dijkstra’s algorithm for shortest path problem Hard
A. Adjacency Matrix;
B. Fibonacci Heap;
C. Simple Array;
D. Binary Heap;