Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 6 MCQs Shortest Paths & Trees

MTH136 — Discrete Structures 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 labelled and weighted graph Easy

    In a weighted graph, what does the weight assigned to an edge typically represent?

  2. Question 2 of 60 labelled and weighted graph Easy

    A graph in which each vertex or edge is assigned a name or label is called a:

  3. Question 3 of 60 shortest path in weighted graphs Easy

    The shortest path between two vertices in a weighted graph is the path with the:

  4. Question 4 of 60 shortest path in weighted graphs Easy

    In an unweighted graph, the shortest path between two vertices is measured by the:

  5. Question 5 of 60 Dijkstra's algorithm to find shortest path Easy

    Dijkstra's algorithm is used to find the shortest path from:

  6. Question 6 of 60 Dijkstra's algorithm to find shortest path Easy

    A key limitation of Dijkstra's algorithm is that it does not work correctly with:

  7. Question 7 of 60 Dijkstra's algorithm to find shortest path Easy

    At each step, Dijkstra's algorithm selects the unvisited vertex with the:

  8. Question 8 of 60 introduction to tree Easy

    A tree is best defined as a connected graph that:

  9. Question 9 of 60 introduction to tree Easy

    A tree with vertices always has exactly how many edges?

  10. Question 10 of 60 introduction to tree Easy

    How many paths exist between any two distinct vertices in a tree?

  11. Question 11 of 60 rooted tree Easy

    In a rooted tree, the topmost vertex from which the tree originates is called the:

  12. Question 12 of 60 rooted tree Easy

    In a rooted tree, a vertex that has no children is known as a:

  13. Question 13 of 60 binary tree Easy

    A binary tree is a rooted tree in which every node has at most:

  14. Question 14 of 60 binary tree Easy

    What is the maximum number of nodes at level of a binary tree, taking the root as level ?

  15. Question 15 of 60 spanning tree Easy

    A spanning tree of a connected graph is a subgraph that:

  16. Question 16 of 60 spanning tree Easy

    A spanning tree of a connected graph with vertices contains exactly how many edges?

  17. Question 17 of 60 minimum spanning tree Easy

    A minimum spanning tree (MST) of a weighted graph is the spanning tree with the:

  18. Question 18 of 60 Kruskal and Prims algorithms to find minimum spanning tree Easy

    Kruskal's algorithm builds a minimum spanning tree by considering edges in order of:

  19. Question 19 of 60 Kruskal and Prims algorithms to find minimum spanning tree Easy

    While adding edges, Kruskal's algorithm avoids selecting an edge that would:

  20. Question 20 of 60 Kruskal and Prims algorithms to find minimum spanning tree Easy

    Prim's algorithm builds the minimum spanning tree by:

  21. Question 21 of 60 labelled and weighted graph Medium

    In a weighted graph, the sum of the weights of all edges in a path is called the:

  22. Question 22 of 60 labelled and weighted graph Medium

    A weighted graph has edges with weights that represent distances. If an edge between vertices and has weight and no edge exists between and , which statement is correct?

  23. Question 23 of 60 shortest path in weighted graphs Medium

    Which property must hold for a shortest path between two vertices in a weighted graph with non-negative weights?

  24. Question 24 of 60 shortest path in weighted graphs Medium

    A shortest path that minimizes the number of edges rather than total weight would be found by treating the graph as:

  25. Question 25 of 60 Dijkstra's algorithm to find shortest path Medium

    Dijkstra's algorithm fails to give correct results when the graph contains:

  26. Question 26 of 60 Dijkstra's algorithm to find shortest path Medium

    In Dijkstra's algorithm, once a vertex is marked as finalized (added to the set of visited vertices), its shortest distance:

  27. Question 27 of 60 Dijkstra's algorithm to find shortest path Medium

    Consider a graph with edges , , . Using Dijkstra from , the shortest distance to is:

  28. Question 28 of 60 Dijkstra's algorithm to find shortest path Medium

    Using a binary min-heap (priority queue), the time complexity of Dijkstra's algorithm for a graph with vertices and edges is:

  29. Question 29 of 60 introduction to tree Medium

    A connected graph with vertices is a tree if and only if it has exactly:

  30. Question 30 of 60 introduction to tree Medium

    Which of the following is NOT necessarily true for a tree?

  31. Question 31 of 60 rooted tree Medium

    In a rooted tree, a vertex with no children is called a:

  32. Question 32 of 60 rooted tree Medium

    In a rooted tree, the length of the path from the root to a given node is called that node's:

  33. Question 33 of 60 binary tree Medium

    The maximum number of nodes in a binary tree of height (root at height ) is:

  34. Question 34 of 60 binary tree Medium

    A binary tree with internal nodes, where every internal node has exactly two children (a full binary tree), has how many leaf nodes?

  35. Question 35 of 60 binary tree Medium

    How many distinct binary trees can be formed using unlabelled nodes?

  36. Question 36 of 60 spanning tree Medium

    A spanning tree of a connected graph with vertices always contains:

  37. Question 37 of 60 spanning tree Medium

    By Cayley's formula, the number of distinct spanning trees of a complete graph is:

  38. Question 38 of 60 minimum spanning tree Medium

    If all edge weights in a connected graph are distinct, then the minimum spanning tree is:

  39. Question 39 of 60 Kruskal and Prims algorithms to find minimum spanning tree Medium

    Kruskal's algorithm selects edges in increasing order of weight while avoiding cycles. Which data structure efficiently detects cycles during this process?

  40. Question 40 of 60 Kruskal and Prims algorithms to find minimum spanning tree Medium

    A key difference between Prim's and Kruskal's algorithms is that Prim's algorithm:

  41. Question 41 of 60 Dijkstra's algorithm to find shortest path Hard

    Dijkstra's algorithm may produce incorrect shortest-path results when a graph contains which of the following?

  42. Question 42 of 60 Dijkstra's algorithm to find shortest path Hard

    Using a binary min-heap as the priority queue, the time complexity of Dijkstra's algorithm on a graph with vertices and edges is:

  43. Question 43 of 60 minimum spanning tree Hard

    If all edge weights in a connected weighted graph are distinct, which statement about its minimum spanning tree (MST) is true?

  44. Question 44 of 60 spanning tree Hard

    By Cayley's formula, the number of distinct spanning trees of the complete graph is:

  45. Question 45 of 60 Kruskal and Prims algorithms to find minimum spanning tree Hard

    The Union-Find data structure with union by rank and path compression is used in Kruskal's algorithm primarily to:

  46. Question 46 of 60 binary tree Hard

    A binary tree has internal nodes each with exactly two children (a full binary tree). How many leaf nodes does it have?

  47. Question 47 of 60 Prims algorithm to find minimum spanning tree Hard

    Prim's algorithm grows the MST by repeatedly selecting the minimum-weight edge that:

  48. Question 48 of 60 labelled and weighted graph Hard

    A weighted graph has vertices. Which representation gives time to query the weight of a specific edge ?

  49. Question 49 of 60 minimum spanning tree Hard

    Consider a connected weighted graph. If an edge is the unique maximum-weight edge on some cycle, which property guarantees is excluded from the MST?

  50. Question 50 of 60 shortest path in weighted graphs Hard

    In a weighted graph where every edge weight is multiplied by a positive constant , the shortest path between any two vertices:

  51. Question 51 of 60 rooted tree Hard

    In a rooted tree with nodes, what is the sum of the number of children over all nodes?

  52. Question 52 of 60 Dijkstra's algorithm to find shortest path Hard

    During Dijkstra's execution, at the moment a vertex is extracted from the priority queue, which invariant holds?

  53. Question 53 of 60 Kruskal and Prims algorithms to find minimum spanning tree Hard

    For a dense graph with edges, which MST algorithm/implementation is typically most efficient?

  54. Question 54 of 60 binary tree Hard

    What is the maximum number of nodes in a binary tree of height (where a single node has height )?

  55. Question 55 of 60 spanning tree Hard

    A connected graph has vertices and edges. The number of edges that must be removed to obtain a spanning tree is:

  56. Question 56 of 60 minimum spanning tree Hard

    Which statement correctly relates the MST and the shortest-path tree (SPT) rooted at a vertex in a weighted graph?

  57. Question 57 of 60 shortest path in weighted graphs Hard

    If a weighted directed graph contains a negative-weight cycle reachable from the source, the shortest-path problem:

  58. Question 58 of 60 Kruskal and Prims algorithms to find minimum spanning tree Hard

    Both Kruskal's and Prim's algorithms are greedy and correct because they rely on which fundamental principle?

  59. Question 59 of 60 rooted tree Hard

    In a complete -ary rooted tree with internal nodes, the total number of nodes is:

  60. Question 60 of 60 labelled and weighted graph Hard

    In a weighted graph, if a unique edge has strictly the smallest weight, then this edge:

That's unit 6

Answer a few questions and your score shows up here.