Live data from Hacker News

Dijkstra's Algorithm

blog.cleancoder.com

11–20 of 20 posts

Re: Dijkstra's Algorithm

#11

Earlier quoted context omitted.

This sort of algorithm is also a demonstration of how useful different types of presentation can be when learning. The original paper isn't a bad source, but it's very wordy because words are all it uses. There's an animated diagram on the Wikipedia page for Dijkstra's algorithm[1] that probably is worth a thousand words, and given a brief introduction to the idea so you know what the diagram is illustrating, togethe…

Best introduction to Dijkstra algorithm and A*, with great visualisations is http://www.redblobgames.com/pathfinding/a-star/introduction....

Yes, that is very nicely presented.

Re: Dijkstra's Algorithm

#12
post #9

Earlier quoted context omitted.

This sort of algorithm is also a demonstration of how useful different types of presentation can be when learning. The original paper isn't a bad source, but it's very wordy because words are all it uses. There's an animated diagram on the Wikipedia page for Dijkstra's algorithm[1] that probably is worth a thousand words, and given a brief introduction to the idea so you know what the diagram is illustrating, togethe…

"There's an animated diagram on the Wikipedia page for Dijkstra's algorithm" Dijkstra must be turning in his grave. He was strongly opposed to the use of pictures in his papers. I can't find a direct quote, but https://www.cs.utexas.edu/users/EWD/transcriptions/EWD10xx/E... says: "But this historical explanation is no excuse for the fact that today Euclidean geometry, with all its known defects, is still taught as th…

Well, I'm sorry if Dijkstra would have been offended, but vast amounts of human experience with teaching and presentation methods say pictures work, animations work, and interaction works. Awful presentation is unfortunately the accepted norm within academia, at least in scientific and mathematical disciplines, but that doesn't mean everyone else has to sink to the same depths when trying to pass on useful information or convey understanding.

Re: Dijkstra's Algorithm

#13
post #10

Is it only me who finds this website unreadable?

No, I find the UX dreadful coming from a website that title itself "clean code". The style is bare and the author still manages poor presentation. At the very least a different style for the code would have been nice.

Re: Dijkstra's Algorithm

#15
PathFinder is poorly designed imo. What is the result of calling getPath or getMinLength before calling findPath? The correct way of returning the path calculation is

Path findPath();

not void findPath() which stores the results as fields on PathFinder.

Re: Dijkstra's Algorithm

#17
post #9

Earlier quoted context omitted.

This sort of algorithm is also a demonstration of how useful different types of presentation can be when learning. The original paper isn't a bad source, but it's very wordy because words are all it uses. There's an animated diagram on the Wikipedia page for Dijkstra's algorithm[1] that probably is worth a thousand words, and given a brief introduction to the idea so you know what the diagram is illustrating, togethe…

"There's an animated diagram on the Wikipedia page for Dijkstra's algorithm" Dijkstra must be turning in his grave. He was strongly opposed to the use of pictures in his papers. I can't find a direct quote, but https://www.cs.utexas.edu/users/EWD/transcriptions/EWD10xx/E... says: "But this historical explanation is no excuse for the fact that today Euclidean geometry, with all its known defects, is still taught as th…

https://www.cs.utexas.edu/~EWD/ewd12xx/EWD1255.PDF

At least one instance of using pictures to illustrate things.

Your quote is about being opposed to weak (informal, hard to show correctness or make consistent across the range of things he wanted to prove) proofs by diagramming, where he wanted more formal reasoning.

The man was no fool, in at least some of his presentations I've seen (videos) he also used diagrams and pictures to illustrate things. They're necessary on occasion.

EDIT: Typos from trying to comment from my phone.

Re: Dijkstra's Algorithm

#19
post #18

For those who are searching for improved Dijkstra's algorithm, delta-stepping is a good one: https://www.cs.utexas.edu/~pingali/CS395T/2012sp/papers/delt...

Cool!

Another (more modest) improvement is Uniform Cost Search[1] (see comparison with DA: https://www.aaai.org/ocs/index.php/SOCS/SOCS11/paper/viewFil... ) which then leads naturally to A* and bidirectional search which can be augmented with pre-processing. (Good summary: https://www.microsoft.com/en-us/research/publication/point-t... )

[1] Despite what wikipedia says, UCS is not the same as DA.

Re: Dijkstra's Algorithm

#20

Earlier quoted context omitted.

This sort of algorithm is also a demonstration of how useful different types of presentation can be when learning. The original paper isn't a bad source, but it's very wordy because words are all it uses. There's an animated diagram on the Wikipedia page for Dijkstra's algorithm[1] that probably is worth a thousand words, and given a brief introduction to the idea so you know what the diagram is illustrating, togethe…

Best introduction to Dijkstra algorithm and A*, with great visualisations is http://www.redblobgames.com/pathfinding/a-star/introduction....

I was going to challenge you, since I thought that was going to be the older http://theory.stanford.edu/~amitp/GameProgramming/AStarCompa... reference which I never found very helpful. The best intro I had to these was in a Game AI course and we basically implemented all these visualizations and more (bad screenshot: http://www.thejach.com/imgs/visibility_with_astar.png) to fully understand it. But the newer reference you linked is great and I'd agree it's the best public introduction.
Post reply on HN