30

They came to your home in the early hours and whisked you away.
The four by four's windows were completely blacked out but the agents seemed amicable enough, albeit fairly taciturn.

After a while you felt like you would have started to doze had it been an ordinary journey you were making at this hour. At some point you went off road; a short time after you heard the sound of the tyres crunching against gravel and then the sound of an automated door opening then closing; you had arrived.

You were in a large, spotless garage. "Welcome to Base 62, I am I, yes yes I know, pot-luck I can assure you. You are here because you have been selected as a candidate for enlistment; only a very select few see inside these walls", said the immaculately attired middle aged gentleman who met you as the door was opened. "Coffee, tea, orange juice? A croissant or two to apologise for the early start? We like to allow a whole day to allow you to really get your teeth into our entrance test. Follow me and we can get you started".

You are taken to what looks like a normal meeting room - a spread of breakfast delights, juices, hot coffee and tea are all at the ready, and a computer is set up at a desk. "Help yourself to the food and drink, if there is anything else just let S know by poking your head out the door. As soon as you are ready we have set you some maze-based problems to solve, just click a key to wake the computer. They will get harder and may require some of your computing skills, although we never underestimate the ingenuity of the human mind here at Base 62. Let S know when you are done or if you want to leave at any time".

And with that he's gone. You grab a cinnamon Danish*, head to the computer and click a key, intrigued...

your computer[you can click this]


* replace with your favourite.

Ankoganit
  • 18,612
  • 3
  • 74
  • 133
Jonathan Allan
  • 21,150
  • 2
  • 58
  • 109
  • There are multiple paths to each exit in maze 2 due to a disconnected wall just left of center. Is that intentional? – Deusovi Jul 25 '16 at 10:29
  • 1
    @Deusovi it is; there are infinite paths from each to each you could take, if you were so inclined. – Jonathan Allan Jul 25 '16 at 10:34
  • You are one of the first people on this site that I have seen to prove being Australian :P $\color{darkorange}{\bigstar}$ – Mr Pie Aug 22 '18 at 11:32
  • @user477343 :/ I am not Australian. ("Enter the maze at the bottom..."?) – Jonathan Allan Aug 22 '18 at 17:32
  • ...oh. Well, the word "favourite" is Australian spelling. Sorry for being a bit presumptuous. But that doesn't mean it's not a great puzzle though, although I didn't have much time to try to complete the puzzle before I commented; I just tried to go through the maze, treating it like any other ordinary maze :) – Mr Pie Aug 22 '18 at 21:50

4 Answers4

16

Partial answer:

Maze 1

Coloring one wall easily gives a solution:
enter image description here
Walking between the green and red walls at all times gives us the way out. On the way we collect UPi5f:
enter image description here

Maze 2

The maze looks like this:
enter image description here Here is a diagram of it, along with the colored version:
enter image description here

Maze 3

(solved by ffao)

Maze 4

I've diagrammed the four mazes' relevant portions. (Black is the end.)
enter image description here

And 2012rcampion has solved the fourth maze!

enter image description here

...Maze? 5

1111010000111000001000000001010110101001011001010011101110011011111110111001100001011001001001000111101011111011110100110111010110100110100000011100100100100011000111011001110111011000010111010100001100000010100111011010011011001110001001100011100001101100011000101100011111011100101001101110000011011000100110011001101011011001110000101001011100100110011110111 seems to be all we have. We don't even have a title for this one! It's 361 characters, or 19×19: this means it can be arranged into a square. The obvious way (line by line) doesn't seem to be producing anything meaningful, though...

enter image description here

Deusovi
  • 146,248
  • 16
  • 519
  • 609
  • Things that might be useful in the future: The colored keyboard and "Base 62". – Deusovi Jul 25 '16 at 10:28
  • 2
    ...so much for multicoloured walls and flooring, I thought at least edge detection would be needed first. Starter for 10, done. – Jonathan Allan Jul 25 '16 at 10:32
  • 4
    @JonathanAllan: Paint.NET's fill bucket tool has a "tolerance" setting, which is incredibly helpful. – Deusovi Jul 25 '16 at 10:36
  • Also, thoughts on maze 2: It's possible that we'll have to go around the center loop multiple times. I'll attempt to make a diagram of the maze to see what we can do. – Deusovi Jul 25 '16 at 10:36
  • It seems they noticed the link was clicked - S just popped his head in and said, that for using that trick on such a simple maze, you will now have to print out maze 3 and do it by hand :p – Jonathan Allan Jul 25 '16 at 10:47
  • @JonathanAllan: I don't think I'll be getting to maze 3 - seems like I'll need to write a program to find which one of the paths decodes to a twin prime (possibly in base 3?) (and presumably, becomes a valid stack.imgur URL when written in base 62). I know nearly nothing about programming, so I think I'm gonna have to wait for someone else to come help. :P – Deusovi Jul 25 '16 at 10:52
  • The diagram with the Greek letters might be a constellation with Bayer designation. – Glorfindel Jul 25 '16 at 14:22
  • @Glorfindel: That was my diagram - it wasn't originally from the puzzle. – Deusovi Jul 25 '16 at 14:22
  • I think we need to consider some of the junctions that are not labeled; the ones where you are forced to take a certain direction to avoid dead ends. – 2012rcampion Jul 25 '16 at 14:52
  • @2012rcampion: Yes, all junctions (that don't leas you to dead ends in every direction) matter - I was just trying to give people an idea of the maze's structure. – Deusovi Jul 25 '16 at 14:55
  • Regarding comment on ffao's answer - None of the paths you list are uniquely constructible, plus note that "Any route may be taken within any coloured maze", so your simplified Green, for example, is missing letters. – Jonathan Allan Jul 26 '16 at 15:56
  • @JonathanAllan: Yes, but none of the letters I've omitted lead anywhere. All of them just lead to dead ends. And what do you mean by them "not being uniquely constructible"? I'm pretty sure they're all only produced by one color-corner-path combination. – Deusovi Jul 26 '16 at 15:58
  • Take "Pt3dp" as an example - you (I think) go into blue's bottom-right corner at the end, pick up "dp" and then exit; but you can take any route - so you could also go into blue's top-right corner at the end, collect "dp" and then exit. – Jonathan Allan Jul 26 '16 at 16:05
  • @JonathanAllan: So you can turn around while collecting a letter? – Deusovi Jul 26 '16 at 16:07
  • ...furthermore, since you can take any route, it does not matter that letters lead to dead ends :) – Jonathan Allan Jul 26 '16 at 16:07
  • yes - turning around and retracing your path was not not restricted (hence the "you cannot climb the tunnels" restriction in the instructions!) – Jonathan Allan Jul 26 '16 at 16:08
  • 1
    Possible solution? (your diagrams were very helpful!) – 2012rcampion Aug 04 '16 at 05:02
  • @2012rcampion: Whoa, nicely done! – Deusovi Aug 04 '16 at 05:03
  • 3
    I'll confess, I ignored the uniqueness constraint and just found all possible paths of five letters---14,842 in total---and then wrote a quick script to download them all and check for one with the right filetype and dimensions. – 2012rcampion Aug 04 '16 at 05:10
  • @2012rcampion: Hey, whatever works. (Hopefully your paths were also found with a program - a graph theoretical approach would've worked well, but I didn't know enough about graph theory or programming to do it.) – Deusovi Aug 04 '16 at 05:12
  • 1
    @2012rcampion "...you could try them as you find them (what? sacrilege!)" - shame on you ;) Nice work. I would be interested to see your approach (I count 39,192 - or 33,673 if you ignore those of length less than 5). There are only 63 uniquely creatable ones though. – Jonathan Allan Aug 04 '16 at 21:25
9

Solution of mazes 2 and 3

Maze 2

Sounds like you guys need some programming duty! Thanks in huge part to @Anton's huge help in organizing all the paths in a friendly format, I was able to quickly cook a Python script that goes through all possibilities:

import itertools 

BASE62 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

def encode(num, alphabet=BASE62):
    """Encode a positive number in Base X

    Arguments:
    - `num`: The number to encode
    - `alphabet`: The alphabet to use for encoding
    """
    if num == 0:
        return alphabet[0]
    arr = []
    base = len(alphabet)
    while num:
        num, rem = divmod(num, base)
        arr.append(alphabet[rem])
    arr.reverse()
    return ''.join(arr)

def isprime(n):
    '''check if integer n is a prime'''
    # make sure n is a positive integer
    n = abs(int(n))
    # 0 and 1 are not primes
    if n < 2:
        return False
    # 2 is the only even prime number
    if n == 2: 
        return True    
    # all other even numbers are not primes
    if not n & 1: 
        return False
    # range starts with 3 and only needs to go up the squareroot of n
    # for all odd numbers
    for x in range(3, int(n**0.5)+1, 2):
        if n % x == 0:
            return False
    return True

def is_twin(x):
    return isprime(x) and (isprime(x-2) or isprime(x+2))

poss = \
'''ARLLAAL[ARRA]ALLRAALRLL
ARLLAARLLAALALRAALRLL
ARLLA R LLLRL
ARLLA A L AR R [A AR R] L L LLLRL
ARLLA A R L L [AA L L] AR L LLLRL
ARLLA A L [AR R A] AR L ARRLRLAR
ARLLA A R [L L AA] A ARRLRLAR
RRLRAALR A [R A AR] R L A ARRLA
RRLRAALR R [AA L L] AR A ARRLA
RRLRAALR A [R A AR] R L L LLLRL
RRLRAALR R [AA L L] AR L LLLRL
RRLRAALR A [R A AR] L ARRLRLAR
RRLRAALR R [AA L L] AA A ARRLRLAR
RLRRR L
RLRRR R L [AR R A] AR R L A ARRLA
RLRRR R R [L L AA] L L AR A ARRLA
RLRRR R L [AR R A] AL LRAALRLL
RLRRR R R [AL A L] AA LRAALRLL
RLRRR R L [AR R A] AR L ARRLRLAR
RLRRR R R [L A AL] A ARRLRLAR
LARLRLLA A [A AR R] L A ARRLA
LARLRLLA R [L AA L] L AR A ARRLA
LARLRLLA A [A AR R] A AL LRAALRLL
LARLRLLA R [L AA L] A LRAALRLL
LARLRLLA A [A AR R] L L LLLRL
LARLRLLA R [L AA L] L AR L LLLRL'''

lton = {'L':0, 'A':1, 'R':2}

for x in poss.split('\n'):
    for encoding in itertools.permutations(range(3)):
        loops = 0
        while True:
            didloop = loops
            ch = 0
            s = ''
            nums = ''
            while ch < len(x):
                if x[ch] == ' ': 
                    pass
                elif x[ch] == '[':
                    if didloop == 0: ch = x.index(']')
                    didloop -= 1
                    loopstart = ch 
                elif x[ch] == ']':
                    ch = loopstart-1
                else:
                    s += x[ch]
                    nums += str( encoding[ lton[x[ch]] ] )
                ch += 1

            result = int(nums, 3)
            result62 = encode(result)

            if len(result62) > 5:
                break

            if x.find(']') == -1:
                break

            loops += 1
            if is_twin(result):
                print 'Found one possibility! ', s, result, result62 

Turns out all the code to handle loops was completely unnecessary, as the correct path doesn't loop anyway...

The correct path is the N->W path LARLRLLARALRAALRLL:

Maze 2 solution

If you interpret L as 2, A as 1 and R as 0, this gives the ternary 210202210120112022, decimal 312380531, base-62 L8iRf:
Maze 3 instructions

And now we have more mazes at top-left, bottom-left, top-right and bottom-right.

Maze 3

Mirroring Deusovi's solution of the first two mazes:

maze 3 solution We pass through the numbers 476842774, which in base 62 is WGmaU:

New instructions

The mazes for this part are: Green
Blue
Pink
Yellow

Jonathan Allan
  • 21,150
  • 2
  • 58
  • 109
ffao
  • 21,733
  • 4
  • 68
  • 109
  • Green: http://i.stack.imgur.com/uct5N.png Blue: http://i.stack.imgur.com/URZjt.png Pink: http://i.stack.imgur.com/STj9V.png Yellow: http://i.stack.imgur.com/YhFX3.png – mbjb Jul 26 '16 at 06:33
  • Glad my paper listing was of some use. But I made a mistake, 1 line is incomplete : RLRRR L should be RLRRR L ARRLA (not that it changes anything on the final result) – Red-Jeweled Jul 26 '16 at 06:56
  • 2
    Nice one, ffao! – Deusovi Jul 26 '16 at 08:26
  • 1
    Now that was where you were meant to realise that you could colour the walls :) – Jonathan Allan Jul 26 '16 at 13:06
  • (It seems everyone stuck with Python 2?) – Jonathan Allan Jul 26 '16 at 13:10
  • 1
    I wrote a script, got a list of 5370 possible combinations (probably right) that can only be produced with a unique path, but none of them (which neighbors are prime) works. Either I did something wrong, or we don't need all of the combinations. Maybe the word "colour" on a monitor is a hint, and we should take the green-pink-blue-yellow-pink-blue-yellow paths if there are some. – Verence Jul 26 '16 at 14:39
  • @JonathanAllan: I've currently found eight solutions by hand, none of which work. I've assumed "unique color-corner pairs" means "each color and each corner will be used once" - is that correct? – Deusovi Jul 26 '16 at 15:46
  • @Verence - that's too many, are you sure they are uniquely constructible? – Jonathan Allan Jul 26 '16 at 15:56
  • I assumed "unique sequence" means that if, for example, you use (green, topleft) and (blue, topleft), then that is the only way to get those specific characters, and no other (color, corner) sequences work. – ffao Jul 26 '16 at 15:59
  • @Deusovi - no that is not a correct interpretation - it means if you can make "blah" by choosing (colour1,coner1);(colour2,corner2);... it's the only way to make "blah". Yes ffao, that is right. Without such a constraint there are well over a million strings. – Jonathan Allan Jul 26 '16 at 15:59
  • @JonathanAllan: ...Isn't that true of all of them, as long as you pick up a letter from every sub-maze? The letters give you a unique ordering on sub-mazes. There are no two corners that go to the same "stretch" between two letters, and there are no loops, so any letter-exit combination uniquely determines a corner. – Deusovi Jul 26 '16 at 16:01
  • 1
    @Deusovi: not if you consider that you can turn around this time (the other mazes were pretty specific that you couldn't, but this one oddly doesn't say anything). – ffao Jul 26 '16 at 16:09
  • 1
    @ffao: Ah, didn't even notice that. I'll attempt to update my diagram. – Deusovi Jul 26 '16 at 16:10
  • @Deusovi - do the instructions make sense to you now? – Jonathan Allan Jul 26 '16 at 16:11
  • @JonathanAllan: Yep! I just didn't understand the "unique color-corner pair" thing because I didn't understand that retracing was allowed. – Deusovi Jul 26 '16 at 16:12
8

Solution to Part (Maze) 5

Maze 5 isn't a maze at all. If you take
1111010000111000001000000001010110101001011001010011101110011011111110111001100001011001001001000111101011111011110100110111010110100110100000011100100100100011000111011001110111011000010111010100001100000010100111011010011011001110001001100011100001101100011000101100011111011100101001101110000011011000100110011001101011011001110000101001011100100110011110111
and convert it to decimal notation and then Base62 encode it you get
CongratulationsAgentgPleaseChangeYourPasscodeFromGNIKCARTKCAB

qwewqa
  • 515
  • 6
  • 8
5

Partial answer for maze 2 :

@Deusovi identified the 4 places where we have to choose a direction.

jointures with cardinal directions

I have enumerated all the possible choices based on the starting and ending positions.

A : ahead, L : left, R : right., [ ] : loop (we can make 0 loop, or many)
turning this into ternary could probably lead to something in base 62.

(S->W) :
A L [R R A] L
A R [L A L] A

(S->E) :
R
A L R R [A R R] L L
A R L L [A L L] R L

(S->N) :
A L [R R A] R L
A R [L L A] A

----------------

(W->S) :
A [R A R] R L A
R [A L L] R A

(W->E) :
A [R A R] R L L
R [A L L] R L

(W->N) :
A [R A R] L
R [A L L] A A

----------------

(E->S) :
L
R L [R R A] R R L A
R R [L L A] L L R A

(E->W) :
R L [R R A] L
R R [L A L] A

(E->N) :
R L [R R A] R L
R R [L A L] A

----------------

(N->S) :
A [A R R] L A
R [L A L] L R A

(N->W) :
A [A R R] A L
R [L A L] A

(N->E) :
A [A R R] L L
R [L A L] L R L

EDIT :

 Here are the junction choices during the transitionnal pathways between points
 (with the correct initial direction)

S->d : ARLLA
d->S : ARRLA

E->d : RLRRR
d->E : LLLRL

W->a : RRLRAALR
a->W : LRAALRLL

N->b : LARLRLLA
b->N : ARRLRLAR

a->b : (no junction)
b->a : (no junction)

a->c : A
c->a : A

b->c : (no junction)
c->b : (no junction)

c->d : (no junction)
d->c : (no junction)


Here are the complete paths will all turns when going through a junction :

---------------------------------
(S->W) :

S      d c [ a b c ]  a         W
 ARLLA A L [AR R A ] AL LRAALRLL

S      d c b [a c b] a         W
 ARLLA A R L [LAA L] A LRAALRLL


(S->E) :

S      d      E
 ARLLA R LLLRL

S      d c  a b [c  a b] c d      E 
 ARLLA A L AR R [A AR R] L L LLLRL

S d c b a [ c b a] c d E ARLLA A R L L [AA L L] AR L LLLRL (S->N) : S d c [ a b c] a b N ARLLA A L [AR R A] AR L ARRLRLAR S d c [b a c] b N ARLLA A R [L L AA] A ARRLRLAR --------------------------------- (W->S) : W a [b c a] b c d S RRLRAALR A [R A AR] R L A ARRLA W a [ c b a] c d S RRLRAALR R [AA L L] AR A ARRLA (W->E) : W a [b c a] b c d E RRLRAALR A [R A AR] R L L LLLRL W a [ c b a] c d E RRLRAALR R [AA L L] AR L LLLRL (W->N) : W a [b c a] b N RRLRAALR A [R A AR] L ARRLRLAR W a [ c b a] c b N RRLRAALR R [AA L L] AA A ARRLRLAR --------------------------------- (E->S) : E d S RLRRR L ARRLA E d c [ a b c] a b c d S RLRRR R L [AR R A] AR R L A ARRLA E d c [b a c] b a c d S RLRRR R R [L L AA] L L AR A ARRLA (E->W) : E d c [ a b c] a W RLRRR R L [AR R A] AL LRAALRLL E d c [ a c b] a W RLRRR R R [AL A L] AA LRAALRLL (E->N) : E d c [ a b c] a b N RLRRR R L [AR R A] AR L ARRLRLAR E d c [b a c] b N RLRRR R R [L A AL] A ARRLRLAR --------------------------------- (N->S) : N b [c a b] c d S LARLRLLA A [A AR R] L A ARRLA N b [a c b] a c d S LARLRLLA R [L AA L] L AR A ARRLA (N->W) : N b [c a b] c a W LARLRLLA A [A AR R] A AL LRAALRLL N b [a c b] a W LARLRLLA R [L AA L] A LRAALRLL (N->E) : N b [c a b] c d E LARLRLLA A [A AR R] L L LLLRL N b [a c b] a c d E LARLRLLA R [L AA L] L AR L LLLRL

Also :

The result number has to be a twin prime, and given enough data to cover up 5 characters in base 62, we would need around 19 ternary characters (could be less or more based on encoding results) because $3^{18} < 62^5 < 3^{19}$. Thus this requires using the loops multiple times we don't need the loops because there is enough characters in some paths.

Red-Jeweled
  • 2,237
  • 12
  • 30
  • 1
    Wait - you didn't count any of the turns on the paths. – Deusovi Jul 25 '16 at 12:54
  • good point @Deusovi, that would greatly reduce the amount of possibilities. – Red-Jeweled Jul 25 '16 at 13:10
  • Hmm, in it's current form this will actually yield a couple of twin primes that would fit the bill with $4$ loops E to S or S to E - feel free to look, but there does not seem to be a computer there. (I probably should have checked this case). – Jonathan Allan Jul 25 '16 at 13:48
  • In Base 62, you can use 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghjklmnopqrstuvwxyz (that's 62chars) – AAM111 Jul 25 '16 at 19:29