AllRounder.ai
Chapters in this course

Enrol to start learning

Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.

Enrol free

28.2.2. Properties of Shortest Paths

  • This section

    Practice test

    10 questions on this section. Wrong answers show you what to read again.

    Sign up to take it
  • Whole chapter

    Revision test

    Mixed questions from across the chapter. Your answers get marked.

    Sign up to take it
  • Quick

    Flashcard drill

    2 cards from this lesson. Good the night before a test.

Try these first

  1. 1.

    What defines a shortest path in a graph?

    Hint

    Think about the weights of the edges.

  2. 2.

    Can a shortest path have repeating vertices?

    Hint

    Consider the effect of looping back.

  3. 3.

    What is the maximum number of edges in a shortest path across n vertices?

    • n
    • n-1
    • n+1
    Hint

    Consider how many unique vertices could be traversed without revisiting.

  4. 4.

    True or False: A shortest path can revisit vertices if there's a negative edge.

    • True
    • False
    Hint

    Think about the impact of a loop on the path total.

  5. 5.

    Design a graph that contains a negative cycle. Explain how the Bellman-Ford algorithm might respond.

    Hint

    Make sure to set the edge weights purposely so that the total is negative when summed.

  6. 6.

    Given a set of edges, apply the Bellman-Ford algorithm to find the shortest path from the source vertex to all others and illustrate your steps.

    Hint

    Count iterations carefully! Remember, you will need n-1 runs through the edge list.

Exercises

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting

4 more questions available

Enrol free

Quiz

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting

Get your answers marked and your progress tracked

Enrol free

Challenge Problems

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting