Mazes. & Coprime Grids

Leroy Quet qq-quet at mindspring.com
Thu Mar 16 20:31:08 CET 2006


I will post two topics in one email, both questions regarding grids.

1) What is the array where a(m,n) = number of mazes in an m by n grid?
(And,more specifically, what is the sequence where a(n) is the number of 
mazes in an n-by-n grid?)

By "maze", I mean: Walls separate some of the grid's squares so that 
there is one and only one path from square to square between any square 
in the grid and any other.

For example, 3-by-3:

(View with fixed width font)

+  ---+--+
!     !  !
+--+  +  !
!        !
+--+--+  !
!        !
+-----   +  This is a maze.

But,

+  ---+--+
!     !  !
+--+  +  !
!        !
+--+--+  !
!  !     !
+-----   +  and

+  ---+--+
!     !  !
+--+  +  !
!        !
+  +--+  !
!        !
+-----   +

are not.
(First non-maze has inaccessible square. Last non-maze has two solutions.)
 
It does not matter where the entrance and exit are for the maze. They can 
even be within the maze itself.

Is such a sequence in the EIS? I found nothing with a search for "maze" 
or with another search for"labyrinth".

==

2) What is the array where b(m,n) is the number of ways 1 through m*n can 
be put into an m-by-n grid, one integer per grid-square, so that every 
immediately adjacent pair of integers (adjacent in the directions of up, 
down, left, or right) are coprime?
(And more specifically, what is the sequence where b(n) is for the n-by-n 
grid?)


For example, for 3-by-3 grid:

3 2 9
4 7 8
1 6 5 
This works.

But
1 2 3
4 5 6
7 8 9

isn't in our count because the 6 is next to the 3 and 9.

Is this sequence(s) already in the EIS?

Thanks,
Leroy Quet





More information about the SeqFan mailing list