New answers tagged graph-traversal
2
votes
Are reversed reverse preorder traversals equivalent to a postorder traversal?
Nathaniels simple and elegant proof is the best way to formally convince yourself your conjectures are true. I want to add a more informal and visual explanation.
The postorder traversal of a binary ...
4
votes
Accepted
Are reversed reverse preorder traversals equivalent to a postorder traversal?
This can be proven by induction on trees. I give details on the conjecture 1 here.
It is clearly true for the empty tree and for leaves;
Suppose it is true for trees $l$ and $r$. Consider $t$ a node ...
2
votes
Walk from vertex u to vertex v on complete graph, formula for number of walks of length k
I think there may be a mistake in your statement, unless you allow a walk to stay in the same vertex on a step, instead of crossing an edge (but that's not the usual definition of walk), or unless you ...
0
votes
When would it be optimal to use an Edge List as opposed to an Adjacency List / Matrix when representing a graph?
Krystal’s algorithm for constructing minimum spanning trees first sorts an array of edges in increasing order of weight, so that edges with the smallest weight can be considered first for selection.
0
votes
When would it be optimal to use an Edge List as opposed to an Adjacency List / Matrix when representing a graph?
Is that something we can't accomplish with some other representation?
Edge list and adjacency list represent the same thing so if you can do something with one, you can do it with the other. In the ...
Top 50 recent answers are included
Related Tags
graph-traversal × 424graphs × 323
algorithms × 188
trees × 45
shortest-path × 33
weighted-graphs × 32
algorithm-analysis × 26
data-structures × 21
time-complexity × 20
binary-trees × 18
search-algorithms × 16
depth-first-search × 14
optimization × 13
dag × 13
runtime-analysis × 12
traveling-salesman × 12
minimum-spanning-tree × 11
search-trees × 9
breadth-first-search × 8
complexity-theory × 7
computational-geometry × 7
dynamic-programming × 6
connected-components × 6
terminology × 5
spanning-trees × 5