[math-fun] Restaurant placemat mazes
I’m looking for an example of a maze that could be challenging (just a little) if you approach it in the naive way — start at the beginning, make choices along the way, backtrack when a choice leads to a dead end — but becomes easy when you construct the solution path from both ends. (These are the sort of mazes I remember finding on restaurant placemats when I was young.) Abstractly, such a maze is associated with a weighted graph, where the vertices represent choice-points, the edges represent (twisty but choice-free) path-segments, and the weight of an edge represents the length of the path-segment. (I mention this to facilitate possible future discussion of “How could we quantify how hard it is to solve a maze via the naive backtracking approach?” but won’t discuss it further.) Example: Picture a maze in which your goal is to get from A to D, in which the solution path goes from A to B to C to D (here A, B, C, and D are choice-points and there are no other choice-points along the path). Suppose that all the paths from A lead to dead ends pretty quickly except the one to B, and that all the backward paths from D lead to dead ends pretty quickly except the one to C, and that there is a short path from B to C, but that there are lots of paths from B and from C that take a long time to lead to dead ends. If you try to solve the maze naively, you might explore lots of the long paths from B that lead to dead ends (possibly by way of other choice points); and even if by luck one of the first paths from B that you try is the one that leads to C, you might take a bad path from C. But if you work from both A and D, you quickly discover that both B and C must lie along the solution path, so you’ve reduced the problem “How do I get from A to D?” to the problem “How do I get from B to C?”, and there’s a short path that does that which you can easily find once you think to look for it. I’d like to include such a maze in one of my monthly essays, as a metaphor for the process of constructing proofs. But I don’t want to construct such a maze myself, and I don’t want to just type “maze” into Google Images and try maze after maze after maze until I find what I want. Ideally I’d like two mazes: one as described above, and one that’s even easier because the B and C vertices are the same. (That’s like constructing a proof from both ends where you discover that no actual ideas are needed; e.g., where you prove that two complicated expressions are equal by putting them in standard form.) Surely someone has written about the work-from-both-ends tactic, and has an example that I could borrow (with permission). The Wikipedia page on mazes didn’t talk about it, though it mentions dead-end filling, which is similar in spirit. Of course such tactics do you no good if you’re actually walking through a maze! But they work pretty well if the maze is placemat-sized and you’re hovering above it, pencil in hand. Jim Propp
James,
Surely someone has written about the work-from-both-ends tactic, and has an example that I could borrow (with permission).
There are >= 2 synonyms for this approach: https://en.wikipedia.org/wiki/Bidirectional_search https://en.wikipedia.org/wiki/Meet-in-the-middle_attack Best wishes, Adam P. Goucher
That's very helpful, Adam. Thanks! Jim On Sat, Apr 6, 2019 at 12:32 PM Adam P. Goucher <apgoucher@gmx.com> wrote:
James,
Surely someone has written about the work-from-both-ends tactic, and has an example that I could borrow (with permission).
There are >= 2 synonyms for this approach:
https://en.wikipedia.org/wiki/Bidirectional_search
https://en.wikipedia.org/wiki/Meet-in-the-middle_attack
Best wishes,
Adam P. Goucher
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (2)
-
Adam P. Goucher -
James Propp