3 ms·
He says "traversing a tree to find the shortest path". Sounds an awful lot like he is confusing graphs and trees. You don't really tend to path find with trees.
by parallelist 13y ago
He says "traversing a tree to find the shortest path". Sounds an awful lot like he is confusing graphs and trees. You don't really tend to path find with trees. Am I right?
Trees are very useful. Graphs are occasionally useful. But you can't really say what is useful until you know it. One of the sadder truths of education/learning.
- tel 13y agoDefinitely. In a (directed) tree there are exactly 0 or 1 paths between two nodes. There's no such thing as a shortest path. In an undirected tree there's exactly 1 path between any two nodes---even worse. You might be representing a graph with a tree however if your nodes are labeled and you want to talk about the shortest path between two nodes quotiented by those labels.
- deleted 13y ago[deleted]
- AYBABTME 13y agoThe shortest path in a tree is kind of a pleonasm.