0% found this document useful (0 votes)
3 views

discrete 2

The document is a practice exam focused on graph theory within discrete mathematics, consisting of multiple choice questions, short answer questions, and problem-solving tasks. It covers various topics such as connected graphs, bipartite graphs, algorithms for shortest paths and minimum spanning trees, and definitions of Eulerian and Hamiltonian paths. The exam includes a solution key for the multiple choice section and outlines the expectations for short answer and problem-solving responses.

Uploaded by

lcott39
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

discrete 2

The document is a practice exam focused on graph theory within discrete mathematics, consisting of multiple choice questions, short answer questions, and problem-solving tasks. It covers various topics such as connected graphs, bipartite graphs, algorithms for shortest paths and minimum spanning trees, and definitions of Eulerian and Hamiltonian paths. The exam includes a solution key for the multiple choice section and outlines the expectations for short answer and problem-solving responses.

Uploaded by

lcott39
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Discrete Mathematics Practice Exam - Part 2 (Graph Theory Focus)

Time Allowed: 1 Hour

Part 1: Multiple Choice Questions (MCQs)

(Each question is worth 2 points)

1. Which of the following is true for a connected graph?

2. a) Every pair of vertices must have a direct edge between them.

3. b) There must be a path between every pair of vertices, but not necessarily a direct
edge.

4. c) Every vertex must have a degree of 2.

5. d) The graph must be a tree.

6. In a bipartite graph, how can you divide the vertices into two disjoint sets?

a) Each vertex in one set is connected to exactly one vertex in the other set.

b) The vertices can be divided such that there is no edge between vertices within the same
set.

c) There are exactly two vertices in each set.

d) Each vertex in one set is connected to every vertex in the other set.

7. Which algorithm is typically used to find the shortest path from a source vertex
to all other vertices in a weighted graph?

a) Kruskal’s algorithm

b) Dijkstra’s algorithm

c) Depth-first search

d) Floyd-Warshall algorithm
8. What is the degree of a vertex in a graph?

a) The number of edges connected to the vertex.

b) The number of vertices adjacent to the vertex.

c) The number of paths starting from the vertex.

d) The number of cycles involving the vertex.

9. Which of the following is a necessary condition for a graph to have an Eulerian


cycle?

a) The graph must be connected.

b) Every vertex in the graph must have an even degree.

c) The graph must be a tree.

d) The graph must contain no cycles.

10. What is the chromatic number of a complete graph with 5 vertices?

a) 1

b) 2

c) 3

d) 5

11. Which of the following algorithms is used to find the Minimum Spanning Tree
(MST) of a weighted graph?

a) Dijkstra’s algorithm

b) Prim’s algorithm

c) Bellman-Ford algorithm

d) Floyd-Warshall algorithm

12. A directed acyclic graph (DAG) is often used to model which of the following?
a) Peer-to-peer networks

b) Task scheduling with dependencies

c) Binary search trees

d) Social media networks

13. In a graph, a Hamiltonian path visits each vertex exactly once. Which of the
following is true about a graph that contains a Hamiltonian cycle?

a) The graph must be connected.

b) The graph must be bipartite.

c) The graph must contain exactly two cycles.

d) The graph must be planar.

14. In graph theory, which of the following is true about a tree?

a) It must contain a cycle.

b) It is connected and acyclic.

c) It must have an even number of vertices.

d) It must be a complete graph.

Part 2: Short Answer Questions

(Each question is worth 5 points)

11. Define a graph and explain the difference between a directed and an undirected
graph. Provide an example of each.
a. A set of vertices and edges, directed is one vertice toanother while
undirected can be a to b or b to a
12. What is a bipartite graph? How can you determine if a graph is bipartite?
a. Evr vertice is mapped to one vertice
13. Explain the difference between an Eulerian path and a Hamiltonian path. How
do you determine if a graph has each type of path?
a. Eulerian visit ever edge and hamilonian visit every vertice regradless of
path
14. Describe the process of finding the Minimum Spanning Tree (MST) using Prim’s
algorithm. Provide a simple example.
a. Compare each edge that can be tattken total weight with each other
15. What is a cut in a graph, and what is the significance of a minimum cut in the
context of network flow?
a.

Part 3: Problem Solving and Application Questions

(Each question is worth 10 points)

16. **Given the graph GG with vertices V={A,B,C,D,E}V = \{A, B, C, D, E\} and edges:
• (A, B) = 3,
• (A, C) = 1,
• (B, D) = 2,
• (C, D) = 4,
• (D, E) = 5,
• (C, E) = 6,
• (B, E) = 7.
Use Kruskal’s algorithm to find the Minimum Spanning Tree (MST) of the graph. Show the
steps and the edges selected.**
17. **You are given the following directed graph:
• (1 → 2),
• (2 → 3),
• (3 → 4),
• (4 → 2).
(a) Determine if this graph contains a cycle.
(b) If it does, describe how to detect the cycle.**
18. **Given the following graph with 6 vertices and the following edges:
• (1, 2), (1, 3), (2, 3), (3, 4), (4, 5), (5, 6), (6, 2).
(a) Draw the graph.
(b) Is the graph strongly connected? Justify your answer.**
19. **Consider a graph with the following edge list:
• (1, 2), (1, 3), (1, 4), (2, 5), (3, 5), (4, 5), (5, 6).
(a) Find the degree of each vertex.
(b) Determine if the graph is connected or disconnected.**
20. **In a weighted graph, apply Dijkstra’s algorithm to find the shortest path from
vertex 1 to all other vertices. Show the steps with the given edges:
• (1, 2) = 7,
• (1, 3) = 9,
• (2, 3) = 3,
• (2, 4) = 5,
• (3, 4) = 2,
• (3, 5) = 7,
• (4, 5) = 4.**

Part 4: Advanced Problem Solving

(Each question is worth 15 points)

21. **You are given a directed graph GG with 5 vertices and the following edges:
• (1 → 2),
• (2 → 3),
• (3 → 4),
• (4 → 5),
• (5 → 1).
(a) Determine if this graph has a strongly connected component.
(b) If it does, find the strongly connected components and explain your reasoning.**
22. **Consider the following graph:
• (1, 2) = 5,
• (1, 3) = 2,
• (2, 3) = 1,
• (2, 4) = 3,
• (3, 4) = 7,
• (4, 5) = 6,
• (3, 5) = 4.
(a) Use Bellman-Ford algorithm to find the shortest path from vertex 1 to all other
vertices.
(b) Explain how the algorithm handles negative weights and provide a simple example.**
23. **You are tasked with finding the maximum flow in a flow network with the
following graph:
• SS → AA: 10,
• SS → BB: 5,
• AA → BB: 15,
• AA → TT: 10,
• BB → TT: 10.
Apply Ford-Fulkerson algorithm to find the maximum flow from SS to TT. Show the steps
and the maximum flow value.**

Solution Key

Part 1: Multiple Choice Answers

1. b) There must be a path between every pair of vertices, but not necessarily a direct
edge.
2. b) The vertices can be divided such that there is no edge between vertices within the
same set.
3. b) Dijkstra’s algorithm
4. a) The number of edges connected to the vertex.
5. b) Every vertex in the graph must have an even degree.
6. d) 5
7. b) Prim’s algorithm
8. b) Task scheduling with dependencies
9. a) The graph must be connected.
10. b) It is connected and acyclic.

Part 2: Short Answer Solutions

11. Graph Definitions:


• A graph consists of vertices (also called nodes) and edges (connections between
nodes). A directed graph has edges with a direction, while an undirected graph
has edges that do not have a direction. Example: Directed: A→BA \to B, Undirected:
A−BA - B.
12. Bipartite Graphs:
• A bipartite graph can be divided into two sets such that no two vertices within the
same set are adjacent. A graph is bipartite if it does not contain any odd-length
cycles.
13. Eulerian vs Hamiltonian Paths:
• An Eulerian path visits every edge exactly once, while a Hamiltonian path visits
each vertex exactly once. A graph has an Eulerian path if it has exactly 0 or 2
vertices with odd degrees; a Hamiltonian path can be found if there is a path that
visits every vertex once.
14. Prim’s Algorithm for MST:
• Start with an arbitrary vertex, then add the smallest edge that connects a vertex in
the MST to a vertex outside it, and repeat until all vertices are included.
15. Cut in a Graph:
• A cut divides the vertices of a graph into two disjoint sets. The minimum cut is the
set of edges with the minimum total weight that separates the graph into two
disjoint subsets.

End of Exam

You might also like