All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 2-way maze (Posted on 2004-11-01)
An Invisible Maze is a square room with a tiled floor, in which the tiles form a grid. You may walk only to adjacent tiles (no diagonal moves). There is a number on the wall for each row and column of tiles. An Invisible Maze can have any numbers on the walls provided that it has at least one True Path. A True Path will take you from the northwest corner to the southeast corner, and the number of tiles you touch in each row and column is equal to the corresponding number on the wall.

There is an NxN tiled Invisible maze that has at least two different True Paths. Minimize N and then, using that N, minimize the sum of all the numbers on the wall.

Important: Two paths are considered the same even if they touch the exact same tiles in a different order.

 See The Solution Submitted by Tristan Rating: 4.0000 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 A minimalization from SteveH | Comment 17 of 21 |

As I said (and edited) earlier, for NXN rooms where intersections are allowed the minimum total (2 walls) is 2(2N+1). See earlier statement for the helpful example. I is worth noting that any "True Path" is going to hit at least 2N-1 tiles, and thus, have a sum of at least 2(2N-1).

The more I thought about it, I realized that my example was just a collapsing of SteveH's and that his can be used as a minimizing (probably), nonintersecting technique for any N>4; so I will state it here.

If interesections aren't allowed, the following example that suggests a minimum total sum of 2(2N+3) for a NXN room, N>4

X X X O O O
X X X X X X
O O X X O X
O O O O O X
O O O O O X
O O O O O X

X O X X O O
X X X X X X
O X X O O X
O O O O O X
O O O O O X
O O O O O X

 Posted by owl on 2004-11-02 00:29:13

 Search: Search body:
Forums (0)