5

I'm after some ideas for demonstrating the usefulness of Floyd-Warshall visually. So far all I can think of is generating a random graph, allowing the user to select a start/finish and highlight the shortest path. What are some more fun yet simple demonstrations of the usefulness of path-finding?

nhahtdh
  • 55,989
  • 15
  • 126
  • 162
Timothy Pratley
  • 10,586
  • 3
  • 34
  • 63

3 Answers3

3

Since you will want to show all pairs shortest path (Floyd Warshal) rather than single pair shortes path (Dijkstra) a minimum distances table between all pairs of large cities in a country might be nice. This is not a graphical visualisation, but still a useful one. There used to be such a table in a book with roadmaps that I used, before the days of electronic route planning.

Jacques de Hooge
  • 6,750
  • 2
  • 28
  • 45
2

Animate a sprite that moves through obstacles.

Nick Dandoulakis
  • 42,588
  • 16
  • 104
  • 136
1

I've used Floyd-Warshall to compute the signal path of cardiac activation as described in this paper in the paragraph 'shortest path of activation'. It proved very practical, fast and simple. Fig. 5 gives you a nice visualisation of the resulting time dependent potentials. In addition to this, the image below visualizes the minimum path lengths computed starting at the sinus node. Blue == short, red == long.

Floyd Warshall path lengths of cardiac excitation

Jacques de Hooge
  • 6,750
  • 2
  • 28
  • 45