Skip to main content

Questions tagged [traversal]

5 votes
2 answers
218 views

I've been struggling with this for a few days, and so I thought I might ask this here. Part of the problem lies in the fact that I do not even know the mathematical solution, which runs the risk of ...
QuantumDot's user avatar
  • 19.9k
5 votes
3 answers
464 views

Can somebody help me with a function f such that it extract all sub expressions (i.e. looking down the expression tree) from any expression given to it and also a ...
user13892's user avatar
  • 10.4k
3 votes
1 answer
273 views

Consider this example: Level[a + f[x, y^n], {0, Infinity}] (*{a, x, y, n, y^n, f[x, y^n], a + f[x, y^n]}*) Why the output is sorted in this way. why not ...
Basheer Algohi's user avatar
4 votes
1 answer
375 views

I use FindShortestTour as explained here and it works nicely for a small number of cities. However when I try this with as little as 16 cities, the given tour isn't ...
Aerus's user avatar
  • 141
16 votes
2 answers
2k views

I have a problem that can be reduced to this one: Suppose I have an unbalanced (almost random) tree. The leaves of the tree have one property already set, and all vertex (including the leaves) have ...
Dr. belisarius's user avatar
28 votes
7 answers
2k views

Mathematica provides functions that perform a depth-first traversal, or which use such a traversal, including: Scan, Count, <...
Mr.Wizard's user avatar
  • 275k