# Reconstruct the lost labyrinth of Knossos

A contribution to the Monthly Topic Challenge #3: Pencil and Paper Games series

This is another improbable story. If you want to skip it scroll to the bottom. The story is not necessary or even useful to solve it.

## The story

As Bob is watching over an archaeological excavation in Crete, Alice arrives in a hurry.

A: So what is the great discovery I absolutely need to see?

B: Oh, it is just ... The Lost Labyrinth of Knossos !

A: THE Labyrinth? The one built by Daedalus for King Minos to imprison the Minotaur?

B: Er ... the Minotaur part is a myth. It probably never existed.

A: Of course, but it is still King Minos's place, right?

B: Actually, I said the Labyrinth of Knossos. This place is named Knossos. And King Minos ruled in Knossos. So it is possible, but not proven, that this labyrinth belonged to King Minos of Crete.

A: OK, but how many labyrinths are in the region? It has to be The One. Speaking of which, I really want to see what it looks like. I'll take a big roll of string to be sure.

B: Well, you know, it was made of bricks. The cement degraded with time. And there were earthquakes. So it all fell to the ground.

A: Oh, damn! But you still can read the layout on the ground from where the bricks are? Right? I want to see what intricate patterns Daedalus designed in his creation.

B: The thing is, many bricks have been taken away to build other houses, except for the broken and funnily-shaped ones. You cannot really see where the walls were.

A: So, what you are telling me is that what you found is just a field of random bricks?

B: No, of course, it is ... a rectangular field of .. er .. random bricks.

A: Pretty much every building has a rectangular shape! What you found could be a storage place for grain, goods, or whatever. What makes you think it was a labyrinth? Did you make me fly to Crete for a pile of old bricks?

B: Er ... That is exactly why I need you. As I said, what is left behind are the broken and irregular-shaped bricks. And that is where it becomes interesting. Some odd bricks are T-shaped, L-shaped or X-shaped. I think L-shaped bricks were used in a corner between 2 walls. T-shaped bricks were used in the junction of 3 walls, and X-shaped brics were used at a junction of 4 walls. I carefully noted the location where these special bricks were found. It follows a nice square grid pattern.

B: But I can't figure it out. I need you to have a good look at my notes and show that this indeed is the layout of a perfect labyrinth.

Bob hands to Alice a pencil and a piece of paper

A: I am still mad at you. But somehow I like the challenge. Let me see. But we'll have a talk later.

## TL;DR

In the image above, you need to reconstruct the plan of a perfect labyrinth built on a square grid.

A perfect labyrinth is completely connected. There is exactly one path between any two squares. There is no loop.

There is an entry at the left and an exit at the right.

The symbol at each intersection shows how the walls join at each intersection. An X marks a junction of 4 walls. A T marks the junction of 3 walls. An L marks a junction of 2 walls meeting at a right angle. Finally a dot marks a place where none of it applies. Either a wall goes straight thru or a wall stops at the dot.

A few wall are given: all outside walls and a couple of inner walls. The lowercase x marks a place where there is no wall.

## Epilogue

As Alice hands the plan of the labyrinth to Bob, she says: "No, seriously? X-shaped bricks? Are you making this up? I hope this is not another of your practical jokes!"

## Text version of the plan

    L---∙---T---T---∙---T---T---∙---∙---L
|                                   |
∙   ∙   ∙   ∙   ∙   T   ∙   ∙   L   ∙
|                                   |
T   L   ∙   L   ∙   ∙   ∙   T   T   T
|                                   |
T   ∙   L   T   ∙---∙ x ∙   T   ∙   ∙
|                                   |
∙   ∙   T   L   ∙   ∙   L   L   ∙   ∙
-->                                       -->
∙   L   T   L   ∙   L   T   L   T   L
|                                   |
∙   ∙   ∙   T   T   X   T   ∙   ∙   ∙
|                                   |
∙   ∙   T   ∙   ∙   ∙   T   ∙---∙   ∙
|                                   |
∙   ∙   T   L   ∙   ∙   L   L   ∙   ∙
|                                   |
L---∙---T---∙---∙---∙---∙---T---∙---L


Final maze!

Logic:

1. Reconstruction

Firstly, I rebuilt the grid in Excel just to make it a bit easier. Then we can go round the edges as these are obvious lines wherever a L or T is placed:

1. Venturing into the maze

The next obvious place to look at would be the X and the L top right. The L top right doesn't connect to the edge, so must point inwards, and the X, well has all 4 connected. Furthermore, as the grid must be connected, the L on the left must go up to avoid closing off a space.

1. Getting lost

The T to the top must go to the left to avoid shutting off a cell. Now I'm also going to start placing white borders where there cannot be a wall, to make it easier to see. This is especially important round the edges, which can mostly be filled white. There are a few Ls around the edge which then have to have a wall going into the grid, and the line given cannot be an L so the sides can be whited-out.

1. Making connections

To avoid creating a closed-off cell, the T next to the given line must connect to it. Also now any wall which connects to a dot (and that we know doesn't keep going) cannot be a junction, so many walls can be filled in white, especially around the edge. This then forces two Ts to be solved top right, which in turn means a bunch of white can be filled in.

1. Middle man

Focusing on the given line in the middle, it's not part of any junctions, so we can white out any possible Ls or Ts. Any L that's connected to one wall, can also have the opposite side of the wall whited out. Bottom right, as there cannot be a 2x2 white square, the L is solved, and forces the other L. Similar up top. The T bottom right only has one solution now, and to avoid a 2x2, the T beneath is also solved, in turn solving the L.

1. Cracking the code

There is another 2x2 at the start that has to be avoided. A T a couple to the left of the X has only one solution, in turn solving the one to the right of it. The majority of the grid is now solved.

1. Finishing the maze!

From here, the T next to the X must go up or quickly creates a closed cell to the right. This circles all the way rounds and solves the majority of the grid. The last thing to fit in place is an L must go to the right to avoid a loop, and this closes the entire grid:

And from here, it's fairly simple to trace out the path!