Home / Computing / Finding shortest paths

Finding shortest paths

Compare visit order and final paths on a weighted grid.

    CS03 · Finding shortest paths0.00 s · Ready

    Computing · Algorithms / Principles and exploration

    Finding shortest paths experiment guide

    Compare visit order and final paths on a weighted grid.

    How does it work?

    BFS minimizes steps; Dijkstra minimizes total cost.

    Key relationship

    d(v) = min[d(u) + w(u,v)]

    Try this investigation

    1. Compare visit order and final paths on a weighted grid.
    2. Run and record each of the three reference settings.
    3. Change one variable and compare with the reference records.

    Interpreting your results

    With equal costs, how do the shortest distances compare?

    Equal · BFS minimizes steps; Dijkstra minimizes total cost.

    Assumptions and limitations

    Moves are orthogonal and costs positive. Reproducible presets set walls and endpoints.