Shortest-Path Algorithms
- 59Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
59 questions
- 1In a graph model of a road network, cities or intersections are represented by_____, while roads are represented by edges.
Hint
These are the points that connections link together.
Answer
nodes
Explanation
A road network can be represented as a graph in which nodes are locations and edges are the roads connecting them.
- 2When every edge is treated as having the same length, the shortest route is the one with the fewest_____.
Hint
Count how many connections a route uses.
Answer
steps
Explanation
If all edges have equal length, minimizing the number of edges also minimizes the total route length.
- 3The algorithm that explores all nodes one step away, then two steps away, and so on is_____.
Hint
Its name describes exploring broadly across each layer before moving farther away.
Answer
Breadth-First Search
Explanation
Breadth-First Search expands a graph in layers of increasing number of edges from the source.
- 4Breadth-First Search guarantees the fewest-edge route because it explores nodes in order of increasing_____from the source.
Hint
Think about the layer or distance measured by counting edges.
Answer
number of steps
Explanation
The algorithm checks every node one step away before checking nodes two steps away, so it finds a target at the smallest step count first.
- 5Breadth-First Search is unsuitable for finding the shortest physical route when roads have different_____, because it treats them as equal.
Hint
A short street and a long highway do not necessarily cover the same distance.
Answer
lengths
Explanation
Breadth-First Search counts edges rather than accounting for the different distances represented by weighted roads.
- 6With over 64 million intersections, the number of possible routes can be so enormous that checking every route is_____.
Hint
Consider whether exhaustive testing could finish in a useful amount of time.
Answer
impractical
Explanation
The content estimates about 10 to the 220 possible routes, making brute-force testing infeasible even at a billion routes per second.
- 7Because many people may request routes at once, a practical mapping service needs its search to finish in less than a_____.
Hint
This is one thousandth of a second.
Answer
millisecond
Explanation
Fast individual searches help a service handle many simultaneous requests within its limited computing capacity.
- 8A pathfinding algorithm can be used not only for maps but also by robots and video game characters navigating a_____.
Hint
It is a space with routes and obstacles that an agent must navigate.
Answer
maze
Explanation
Robots and game characters face the same general problem of finding routes through connected spaces with obstacles.
- 9In Dijkstra's algorithm, the best known distance from the source to a node is called its_____.
Hint
It records the total route weight accumulated so far.
Answer
cost
Explanation
Dijkstra's algorithm tracks a cost for each node, representing the shortest source-to-node distance found so far.
- 10At initialization, the source node has a cost of_____, because no travel is needed to reach it from itself.
Hint
The starting location has not yet required any movement.
Answer
zero
Explanation
The source's distance to itself is zero, so its initial cost is zero.
- 11Before other nodes have been reached, Dijkstra's algorithm assigns them a cost of_____.
Hint
This represents that no route to the node has been found yet.
Answer
infinity
Explanation
Infinity is used as an initial value larger than any known route cost, allowing discovered routes to replace it.
- 12After exploring a node, Dijkstra's algorithm next selects the unexplored node with the_____cost.
Hint
The algorithm advances by choosing the most promising known distance.
Answer
lowest
Explanation
Choosing the unexplored node with the lowest cost ensures the search progresses in increasing order of distance.
- 13When considering an edge to a neighbor, Dijkstra's algorithm updates that neighbor's cost only if the newly found route is_____than its current cost.
Hint
Compare the proposed route with the best one already recorded.
Answer
shorter
Explanation
The algorithm replaces a node's cost when the route through the current node improves on the previously known route.
- 14If a node already has a cost of three and a newly considered route costs five, Dijkstra's algorithm does not update the node because the existing route is_____.
Hint
Compare the two route costs.
Answer
shorter
Explanation
A route costing five cannot improve on the already known route costing three.
- 15If a node is first reached by a route costing seven and later a route costing six is found, its cost must be_____.
Hint
The algorithm should keep the best route discovered so far.
Answer
updated
Explanation
Dijkstra's algorithm can revise a node's cost whenever a lower-cost route is found.
- 16Finding the target for the first time does not always prove the route is shortest; the target is confirmed when it has the lowest cost among the_____nodes.
Hint
A not-yet-processed node might still lead to a better route.
Answer
unexplored
Explanation
The algorithm continues after first reaching the target if another unexplored node has a lower cost and could lead to a shorter path.
- 17Dijkstra's algorithm guarantees a shortest path by exploring routes from the source in order of increasing_____.
Hint
This is the weighted counterpart of exploring breadth-first by step count.
Answer
cost
Explanation
Exploring in cost order means every lower-cost possibility is considered before a higher-cost route is finalized.
- 18When the target is finalized at cost 18, Dijkstra's algorithm has already examined all possible routes with cost less than_____.
Hint
The finalized cost is the boundary below which all alternatives have been explored.
Answer
18
Explanation
If the lowest-cost unexplored node has cost 18 and is the target, all routes with lower cost have already been explored.
- 19A-star uses the known cost to a node plus an estimate of its remaining distance to the target; that estimate is called a_____.
Hint
It guides the search toward promising locations without being the actual route cost.
Answer
heuristic
Explanation
A heuristic estimates how far a node is from the goal and is combined with the known cost to prioritize the search.
- 20A-star can estimate how close a node is to a destination by calculating the_____distance between their coordinates.
Hint
This is the direct geometric distance, not necessarily a route along roads.
Answer
straight line
Explanation
Using latitude and longitude, A-star can estimate the direct distance from a node to the target.
- 21In the three-dimensional visualization of A-star, nodes farther from the target are represented at a greater_____.
Hint
The visualization turns the heuristic value into a vertical dimension.
Answer
height
Explanation
The height represents straight-line distance to the target, making distant nodes appear higher in the visualization.
- 22The penalty in A-star discourages exploring nodes that move_____from the target.
Hint
Think about the direction opposite to making progress toward the goal.
Answer
farther
Explanation
A-star prioritizes nodes with lower estimated remaining distance, so it tends not to explore routes that head away from the target early.
- 23Increasing the steepness of A-star's heuristic makes the search spread out_____, because it focuses more aggressively toward the target.
Hint
A stronger directional preference narrows the exploration.
Answer
less
Explanation
A steeper heuristic penalizes moving away from the target more strongly, reducing how broadly the search expands.
- 24On the described Newark-to-zoo example, A-star explored about 7,000 nodes, compared with more than 65,000 for ordinary_____.
Hint
This search expands in increasing route-cost order without a target-directed heuristic.
Answer
Dijkstra's algorithm
Explanation
The heuristic guided A-star toward the zoo and greatly reduced the number of nodes explored in that example.
- 25In the worst case, A-star may explore as many nodes as_____.
Hint
This is the underlying shortest-path search against which A-star is compared.
Answer
Dijkstra
Explanation
A-star's guidance may fail to reduce exploration, and in that case it can check as many nodes as Dijkstra.
- 26For travel-time routing, dividing straight-line distance by the maximum allowed speed gives a heuristic estimate of the minimum_____.
Hint
It estimates how long a trip could take under an ideal speed assumption.
Answer
travel time
Explanation
The direct distance divided by the maximum speed provides a lower-bound estimate of how quickly the destination could be reached.
- 27The travel-time heuristic can be costly to evaluate because it involves a square root_____, which may make A-star less effective.
Hint
This refers to the mathematical operation's demand on processing.
Answer
computation
Explanation
The content notes that evaluating the heuristic involves a costly square root computation, reducing A-star's advantage for travel-time searches.
- 28A bidirectional Dijkstra search runs one search from the source and another from the_____.
Hint
The second search starts at the destination and proceeds backward.
Answer
target
Explanation
The two searches advance toward each other, one from each endpoint of the route.
- 29The advantage of bidirectional search is that its two search frontiers can_____before either search explores the whole region.
Hint
They advance toward each other until they share part of the searched area.
Answer
overlap
Explanation
When the frontiers meet, the route can be assembled without expanding as far as a single search would.
- 30For a route spanning distance R, the content explains that two searches can cover roughly half the area of one search by meeting around distance_____from each endpoint.
Hint
The two searches divide the approximate source-to-target distance into equal portions.
Answer
R over two
Explanation
Each search advances about half the distance before the frontiers meet, reducing the approximate explored area.
- 31In the Carnegie Hall to Wall Street example, bidirectional Dijkstra explored about 2,600 nodes instead of more than_____nodes for a one-way search.
Hint
This is the larger node count reported for the basic search.
Answer
7,200
Explanation
The two-frontier search substantially reduced node exploration in this example.
- 32Human route planning often follows a road hierarchy by traveling on local roads, then a highway, and finally_____roads near the destination.
Hint
These are the smaller-scale roads used near the beginning and end of a journey.
Answer
local
Explanation
A typical route moves from local roads to major roads and highways, then returns to local roads near the destination.
- 33Early in-car GPS systems used survey information to classify roads into categories such as express highways, major local roads, and_____roads.
Hint
This category describes small roads, such as those in residential areas.
Answer
narrow
Explanation
Road attributes collected by surveyors were used to assign roads to different hierarchy levels.
- 34Searching road hierarchies within candidate areas risks returning a non-shortest route if the candidate area is too_____.
Hint
A limited search region may exclude a better route.
Answer
small
Explanation
If the candidate area excludes the best local-road route, the search might return a longer highway route instead.
- 35Nested dissection assigns high importance to small sets of nodes that roughly split a graph into two_____.
Hint
A good separator divides the graph into similarly sized parts.
Answer
halves
Explanation
The method recursively finds small cuts that divide the graph into roughly equal subsets and ranks their nodes highly.
- 36A bridge intersection connecting two similarly sized towns can be important because many shortest paths between the towns must pass through that_____.
Hint
It is the bottleneck location that connects the two sides.
Answer
intersection
Explanation
When trips between two regions depend on a shared connection, that connection lies on many shortest paths.
- 37In the North American network example, the highest-ranked small cut contained_____nodes linking east-west travel across a major bottleneck region.
Hint
This is the number of nodes identified in the example.
Answer
102
Explanation
Those 102 nodes roughly split the network and serve as important connections for east-to-west routes.
- 38The recursive process of finding small graph cuts and ranking their nodes is called_____.
Hint
Its name describes repeatedly dividing a graph into nested parts.
Answer
nested dissection
Explanation
Nested dissection recursively finds separators and assigns node ranks to build a hierarchy.
- 39In a contraction hierarchy, the node with a higher rank is positioned higher in the search_____.
Hint
The ranking establishes which direction searches are allowed to move.
Answer
hierarchy
Explanation
The ranks form levels, and upward searches move from lower-ranked nodes toward higher-ranked ones.
- 40To limit the search space in a contraction hierarchy, each direction of a bidirectional search is restricted to moving_____in rank.
Hint
Searches progress toward the higher levels of the ordering.
Answer
up
Explanation
Restricting each search to higher-ranked nodes reduces the number of nodes considered.
- 41If a search could only proceed upward from the source and not also from the target, it could get stuck; this is why contraction hierarchies use_____search.
Hint
Both endpoints need their own upward search.
Answer
bi-directional
Explanation
Searching upward from both endpoints lets the searches meet near the top of the hierarchy.
- 42A lower triangle occurs when a low-ranked node connects to at least two_____nodes.
Hint
These are the nodes above it in the ordering.
Answer
higher-ranked
Explanation
The lower-ranked node may be part of the shortest route between the higher-ranked neighbors.
- 43When contracting a lower-ranked node that connects two higher-ranked nodes, preprocessing may add a_____between those higher nodes.
Hint
It preserves a route that would otherwise pass through a contracted node.
Answer
shortcut
Explanation
A shortcut records the route through the lower-ranked node so that an upward search can still account for it.
- 44If a shortcut could represent several possible routes, its weight should reflect the route with the_____cost.
Hint
The shortcut must preserve the best option among the alternatives.
Answer
minimum
Explanation
When multiple paths are represented, the shortcut keeps the least-cost path so that shortest routes remain available.
- 45A shortcut is not necessarily a physical road; it is a bookkeeping edge used to preserve_____paths.
Hint
It ensures the search can still account for optimal routes through contracted nodes.
Answer
shortest
Explanation
Shortcuts represent the cost of paths in the original graph even when there is no direct road between their endpoints.
- 46Adding shortcuts from the bottom of the hierarchy upward prevents shortest paths through lower-ranked nodes from being_____.
Hint
The preprocessing step preserves paths that an upward-only search would not otherwise see.
Answer
missed
Explanation
Shortcuts are added when needed so that restricting the query search to higher-ranked nodes does not eliminate optimal routes.
- 47Different node rankings can still produce correct shortest paths when the necessary_____are added.
Hint
These preserve routes that a particular ranking might otherwise hide.
Answer
shortcuts
Explanation
The shortcut preprocessing can compensate for different valid orderings, although the efficiency may vary.
- 48A poor node ranking may make queries slow or cause the graph to grow rapidly because it requires too many_____.
Hint
These extra edges increase the size of the preprocessed graph.
Answer
shortcuts
Explanation
Although many rankings can preserve correctness, a bad ordering can create an inefficient number of shortcuts or leave queries with extensive searches.
- 49Choosing a useful node ordering involves a trade-off between the number of shortcuts and how much faster the_____becomes.
Hint
This is the actual route search performed after preprocessing.
Answer
query
Explanation
A good hierarchy balances preprocessing and graph size against the speed of later route queries.
- 50The customizable contraction hierarchy separates preprocessing into node ordering and shortcut creation, shortcut weight calculation, and the final_____.
Hint
This is the phase that finds a route for a particular request.
Answer
search
Explanation
Its three phases are building the hierarchy, assigning shortcut weights, and running the route query.
- 51The expensive first phase of a customizable contraction hierarchy needs to be repeated mainly when the_____itself changes, such as when a bridge is added or a road closes.
Hint
This is the network structure that the hierarchy represents.
Answer
graph
Explanation
Node ordering and shortcut creation depend on the graph's structure, so structural road-network changes can require this phase again.
- 52When traffic conditions change but the road network structure stays the same, the customizable contraction hierarchy must recalculate shortcut_____.
Hint
These encode the costs used when comparing routes.
Answer
weights
Explanation
Traffic updates change route costs, so the weights assigned to shortcuts need to be recalculated.
- 53On the North American network, the reported customizable contraction hierarchy query took about 200_____.
Hint
A microsecond is one millionth of a second.
Answer
microseconds
Explanation
The experiment reported a query runtime of around 200 microseconds, much faster than the several seconds taken by a well-tuned Dijkstra search.
- 54In the reported experiment, the customizable contraction hierarchy was about 35,000 times_____than Dijkstra's algorithm.
Hint
The query took far less time than the comparison search.
Answer
faster
Explanation
A query runtime around 200 microseconds was reported as roughly 35,000 times faster than Dijkstra's in that experiment.
- 55The customizable contraction hierarchy explored an average of about_____nodes per query in the reported North American experiment.
Hint
This is a small fraction of the network's more than 64 million nodes.
Answer
1,450
Explanation
By using the hierarchy and shortcuts, the search only needed to explore about 1,450 nodes on average.
- 56Compared with Dijkstra's search space, the reported contraction hierarchy reduced the number of explored nodes by a factor of about_____.
Hint
The reduction was tens of thousands to one.
Answer
44,000
Explanation
The experiment reported a search-space reduction of approximately 44,000 times.
- 57In a long route query, contraction hierarchy searches concentrate near the source and target, then examine important_____farther along the route.
Hint
These are high-ranking separators that divide the graph.
Answer
cuts
Explanation
Once the searches reach higher levels, they need to consider only important cuts such as major bottlenecks across the network.
- 58The core search used by contraction hierarchies remains based on_____'s algorithm.
Hint
This classic algorithm explores nodes in increasing order of path cost.
Answer
Dijkstra
Explanation
Contraction hierarchies accelerate queries through preprocessing and restricted bidirectional searches, while retaining Dijkstra-style search as their core.
- 59Dijkstra argued that simplicity is a prerequisite for_____, which is why avoiding unnecessary complexity matters in software design.
Hint
This quality means a system can be depended on to work correctly.
Answer
reliability
Explanation
The content connects Dijkstra's preference for simple designs with the goal of making software dependable.

Ask anything
We've read this whole study set, so questions about it get the best answers.