79 points · by luisb · 10y ago · 19 comments
They should have used an illustration where the sides of the mountain were more obviously different.
An example should be chosen to highlight as much variation as possible so the reader can tell what is and isn't essential to the problem.
M must always be the highest point within the range. A and Z are at the same height and are the lowest point within the range.
Imagine that the hikers are somehow connected (quantum entanglement, etc) such that one cannot physically move up or down if other cannot, and as one moves up and down the other must follow at the same height.
Perhaps a better metaphor would be if the paths are cut into a wall, and you have inserted two pegs that are connected by a horizontal backing bar behind the wall. The bar may move up and down but will always remain horizontal. The pegs can slide left and right along the bar, and up and down along the paths, but must always remain horizontally level.
Now, imagine that whenever a peg reaches a local max or min (peak or valley), a change in vertical direction may also cause a traversal along the opposite size of the peak/valley, thus allowing for forward progression.
While one peg hits a vertical stop and makes horizontal progression, the other peg will simply move up and down along the same segment.
This exercise is obviously not a mathematical proof, but does serve to make the proof feel a bit more intuitive. I'd love to construct such a "puzzle" myself and try it out on a bunch of different contours/tracks.
Let's go with their ultimate "alphabet", all the pairs based on altitude. (A,Z), ... (M,M). Note all valid transitions. In fact, you have the exact same graph as they do since every transition is reversible. (A,Z) is the starting state, (M,M) is the final state. What you now want is the shortest matching string: AZ.CX.DY.EW.DU.MM. There ought to be only one in this case.
But there are actually 3 possible machines that can be constructed and need to be analyzed if you want to go with this method. C < W, C = W, C > W. The case of C=W is trivial, no intermediate points are introduced. C < W is the case given above and in the paper. C > W is the same as C < W under a trivially constructed mapping so it's already solved as well, so ultimately only 2 cases need be considered given symmetry.
I think the problem of marking it as a sequence of u and d, you'd need a metric. Some notion of how high or low each peak and valley actually are. Now, this could be discretized based on relative altitudes. Lowest is 0, next is 1, next is 2, etc. So you can ignore precision. Still greatly complicates the matter.
In fairness, the article itself is glib about this important point (it does not discuss the degree calculation for (A, X), (X, Z), (M, X), and (X, M) in general, only for (A, Z) and (M, M) in particular).
Edit: That being said, I mean no disrespect to this... 20 year old article. Hope I didn't hurt your feelings, Article. Just trying to find an entry point into this domain.
In general, for identifying if something is a graph problem:
1) Through some mapping, (almost?) everything can be transformed into a graph problem of some sort. Now, that's a bit too big a set and ignores the real question.
2) How do I identify that a problem is practically solved with graphs?
Some heuristics (note, these are heuristics, particularly useful for getting started, but not at all absolutes):
Is it discrete? In the given problem from the link we have a finite number of extreme points (ends of each line segment), but an infinite number of points between. Fortunately, thanks to the problem constraint, there are only a few non-endpoints that we are concerned with. So we can safely ignore the infinity of possibilities by only examining this finite set.
Are there transitions between these states that are easily modeled as edges? In the given puzzle, absolutely. And its symmetric so an undirected graph is suitable (sometimes directed graphs would be more suitable or the only applicable solution).
After this, proving various things (like that the generalized statement that all properly constructed puzzles have a solution) will require learning some of the basic properties of graphs, and how to restate the premises (such as constraints on altitude and movement) in a graph-theoretic form. It's easy to intuit the proof now that you have a simplified, but complete, model of the problem, but harder to state it with mathematical certitude. That part really will just require more practice and exposure.
At some point you'll develop sufficient vocabulary in the field that you may not be able to prove it straight off, but you'll know what and where to look for the elements you need to construct a proof like they have.
Mathematical intuition. To answer the next obvious question of how to buld mathematical intuition: Solve lots of math problems (I've also heard that reading "Pólya - How to Solve it" is supposed to be helpful for this; I can't say anything about it).