Break Into . Us (lock puzzle game)

I’ve made a puzzle game about breaking open padlocks. If you just want to play the game, go play the game. Or read on for the how-and-why of its creation.

About three months ago, my friend Claire, in a WhatsApp group we both frequent, shared a brainteaser:

WhatsApp message from Claire, challenging people to solve her puzzle.
Was this way back at the beginning of April? Thank heavens for WhatsApp scrollback.

The puzzle was to be interpreted as follows: you have a three-digit combination lock with numbers 0-9; so 1,000 possible combinations in total. Bulls and Cows-style, a series of clues indicate how “close” each of several pre-established “guesses” are. In “bulls and cows” nomenclature, a “bull” is a correctly-guessed digit in the correct location and a “cow” is a correctly-guessed digit in the wrong location, so the puzzle’s clues are:

  • 682 – one bull
  • 614 – one cow
  • 206 – two cows
  • 738 – no bulls, no cows
  • 380 – one cow
"Can you open the lock using these clues?" puzzle
Feel free to stop scrolling at this point and solve it for yourself. Or carry on; there are no spoilers in this post.

By the time I’d solved her puzzle the conventional way I was already interested in the possibility of implementing a general-case computerised solver for this kind of puzzle, so I did. My solver uses a simple “brute force” technique, as follows:

  1. Put all possible combinations into a search space.
  2. For each clue, remove from the search space all invalid combinations.
  3. Whatever combination is left is the correct answer.
Animation showing how the first three clues alone are sufficient to derive a unique answer from the search space of Claire's puzzle.
The first three clues of Claire’s puzzle are sufficient alone to reduce the search space to a single answer, although a human is likely to need more.

Visualising the solver as a series of bisections of a search space got me thinking about something else: wouldn’t this be a perfectly reasonable way to programatically generate puzzles of this type, too? Something like this:

  1. Put all possible combinations into a search space.
  2. Randomly generate a clue such that the search space is bisected (within given parameters to ensure that neither too many nor too few clues are needed)
  3. Repeat until only one combination is left

Interestingly, this approach is almost the opposite of what a human would probably do. A human, tasked with creating a puzzle of this sort, would probably choose the answer first and then come up with clues that describe it. Instead, though, my solution would come up with clues, apply them, and then see what’s left-over at the end.

Sample output of the puzzle generator for an alphabet of 0-9 and a combination length of 3.
Sometimes it comes up with inelegant or unchallenging suggestions, but for the most part my generator produces adequate puzzles.

I expanded my generator to go beyond simple bulls-or-cows clues: it’s also capable of generating clues that make reference to the balance of odd and even digits (in a numeric lock), the number of different digits used in the combination, the sum of the digits of the combination, and whether or not the correct combination “ascends” or “descends”. I’ve ideas for other possible clue types too, which could be valuable to make even tougher combination locks: e.g. specifying how many numbers in the combination are adjacent to a consecutive number, specifying the types of number that the sum of the digits adds to (e.g. “the sum of the digits is a prime number”) and so on.

A single solution in a search space derived in multiple ways.
Like the original puzzle, puzzles produced by my generator might have redundancies. In the picture above, the black square can be defined by the light blue, dark blue, and green bisections only: the yellow bisection is rendered redundant by the light blue one. I’ve left this as a deliberate feature.

Next up, I wanted to make a based interface so that people could have a go at the puzzles in their web browser, track their progress through the levels, get a “score” based on the number and difficulty of the locks that they’d cracked (so they can compare it to their friends), and save their progress to carry on next time.

I implemented in pure vanilla HTML, CSS, SVG and JS, with no dependencies. Compressed, it delivers to your browser and is ready-to-play in a little under 10kB, most of which is the puzzles themselves (which are pregenerated and stored in a JSON file). Naturally, it lends itself well to running offline, so it’s PWA-enhanced with a service worker so it can be “installed” onto your device, too, and it’ll check for bonus puzzles and other updates periodically.

The original puzzle shown via BreakInto.Us.
Naturally, the original puzzle appears in the web-based game, too.

Honestly, the hardest bit of implementing the frontend was the “spinnable” digits: depending on your browser, these are an endless-scrolling <ul> implemented mostly in CSS and with snap points set, and then some JS to work out “what you meant” based on where you span to. Which feels like the right way to implement such a thing, but was a lot more work than putting together my own control, not least because of browser inconsistencies in the implementation of snap points.

Anyway: you should go and play the game, now, and let me know what you think. Is it worth expanding and improving? Should I leave it as it is? I’m open to ideas (and if you don’t like that I’m not implementing your suggestions, you can always fork a copy of the code and change it yourself)!

Or if you’d like to see some of the other JavaScript experiments I’ve done, you might enjoy my “cheating” hangman game, my recreation of the lunar lander game I wrote in college, or rediscover that time I was ill and came up the worst conceivable tool to calculate Pi.

Who finished second?

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Three athletes (and only three athletes) participate in a series of track and field events. Points are awarded for 1st, 2nd, and 3rd place in each event (the same points for each event, i.e. 1st always gets “x” points, 2nd always gets “y” points, 3rd always gets “z” points), with x > y > z > 0, and all point values being integers.
The athletes are named: Adam, Bob, and Charlie.

  • Adam finished first overall with 22 points.
  • Bob won the Javelin event and finished with 9 points overall.
  • Charlie also finished with 9 points overall.

Question: Who finished second in the 100-meter dash (and why)?

I enjoyed this puzzle so much that I shared it with (and discussed it at length with) my smartypants puzzle-sharing group. Now it’s your turn. The answer, plus a full explanation, can be found on the other side of the link, but I’d recommend that you try to solve it yourself first. If it seems impossible at first glance, start by breaking it down into what you can know, and what you can almost know, and work from there. Good luck!

And if anybody feels like hiring Nick to come and speak anywhere near where I am, that’d be awesome of you.

Elf Chalkboard Puzzle

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

I write the integers 1-9999 (inclusive) on a huge chalkboard. Each number is written once.

During the night the board is visited by a series of naughty math elves (it’s a thing!)

Each elf approaches the board, selects two numbers at random, erases them, and replaces them with a new number that is the absolute difference of the two numbers erased.

This vandalism continues all night until there is just one number remaining.

I return to the board the next morning and find the single number of the board. The question is: Is this remaining number odd or even?

Elf Chalkboard

A fun, lightweight maths puzzle for your amusement. I was able to find the right answer pretty quickly by spotting the pattern; it took me longer to find the words to adequately explain the pattern.

Word Ladder Solver

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

It’s likely that the first word ladder puzzles were created by none other than Lewis Carroll (Charles Lutwidge Dodgson), the talented British mathematician, and author of the Alice’s adventures. According to Carroll, he invented them on Christmas Day in 1877.

A word ladder puzzle consists of two end-cap words, and the goal is to derive a series of chain words that change one word to the other. At each stage, adjacent words on the ladder differ by the substitution of just one letter. Each chain word (or rung of the word ladder), also needs to be a valid word. Below is an example of turning TABLE into CROWN (this time, in nine steps):

TABLE → CABLE → CARLE → CARLS → CARPS → CORPS → COOPS → CROPS → CROWS → CROWN

In another example, it take four steps to turn WARM into COLD.

WARM → WARD → CARD → CORD → COLD

(As each letter of the two words in the last example is different, this is the minimum possible number of moves; each move changes one of the letters).

Word ladders are also sometimes referred to as doublets, word-links, paragrams, laddergrams or word golf.

Nice one! Nick Berry does something I’ve often considered doing but never found the time by “solving” word ladders and finding longer chains than might have ever been identified before.

Puzzle Montage Art by Tim Klein

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Iron Horse, by Tim Klein

Jigsaw puzzle companies tend to use the same cut patterns for multiple puzzles. This makes the pieces interchangeable, and I sometimes find that I can combine portions from two or more puzzles to make a surreal picture that the publisher never imagined. I take great pleasure in “discovering” such bizarre images lying latent, sometimes for decades, within the pieces of ordinary mass-produced puzzles.

Mystery Pipe

A puzzle that the steam locomotive enthusiasts among you (you’re out there, right?) might stand a chance at solving:

The picture below is of “6040”, the last steam locomotive to be built for the Department of Railways New South Wales in Australia. She was in service as a coal/goods transporter from 1957 through 1967 before the increase in the use of diesel on the railways lead to the death of steam. She was eventually rescued and displayed by the New South Wales Railway Museum, which is where the photo was taken. There, starting from her 50th birthday, a team of volunteers have been restoring her. But that’s perhaps not the thing that’s most-unusual about her, or her class (AD60).

New South Wales Government Railways' AD60-class "6040", with mystery pipes highlighted
New South Wales Government Railways’ AD60-class “6040”, with mystery pipes highlighted

I’ve highlighted on the photo a feature that you’ve probably never seen before, even if you’re of an inclination to go “Ooh, a steam loco: I’mma have a closer look at that!”. What you’re seeing is an open pipe (with a funnel-like protrusion at one end) connecting the area behind the leading wheels to the cab. What’s it for? Have a think about it as you read the rest of this post, and see if you can come up with the answer before I tell you the answer.

AD60 "6012" under steam.
AD60 “6012”, seen in this 1950s photo, had not yet been fitted with the “mystery pipes”, which were added later.

These pipes weren’t initially fitted to “6040” nor to any of her 41 sisters: they were added later, once the need for them became apparent.

If you’re thinking “ventilation”, you’d be wrong, but I can see why you’d make that guess: the AD60 is an extremely long locomotive, and sometimes long steam locomotives experience ventilation problems when going through tunnels. Indeed, this was a concern for the AD60 and some were fitted with ventilation pipes, but these carried air from the front of the engine back to the cab, not from down near the wheels like this mystery pipe would. However, the pipe does connect through to the cab…

AD60 "6029"
“City of Canberra”/”6029”, restored to functionality (seen here in 2015), either never had or wasn’t refitted during restoration with the mystery pipes.

It’s worth taking a moment though to consider why this is such a long locomotive, though: you may have noticed that it exhibits a rather unusual shape! The AD60 is a Garratt locomotive, an uncommon articulated design which places a single (usually relatively-large) boiler straddled in-between two steam engines. Articulating a locomotive allows a longer design to safely take corners that were only rated for shorter vehicles (which can be important if your network rolled out narrow-gauge everywhere to begin with, or if you put too many curves onto a mountain railway). Garratt (and other articulated steam) locos are a fascinating concept however you look at them, but I’m going to try harder than usual to stay on-topic today.

OpenTTD slope building
Just go around the mountain! (Around and around and around…) Oh damn, I’ve gone off topic and now I’m thinking about OpenTTD.

And by the time you’re articulating a locomotive anyway, engineer Herbert William Garratt reasoned, you might as well give it a huge boiler and two engines and give it the kind of power output you’d normally expect from double-heading your train. And it pretty-much worked, too! Garratt-type articulated steam locomotives proved very popular in Africa, where some of the most-powerful ones constructed remained in service until 1980, mountainous parts of Asia, and – to a lesser extent – in Australia.

Illustration of a garratt locomotive
Each of the forward and rear engine bogies in a Garratt design pivots independently; the boiler and cab are suspended between them.

Indeed: it’s the combination of length of this loco and its two (loud) engines that necessitated the addition of the “mystery pipe”. Can you work out what it is, yet? One final clue before I give the game away – it’s a safety feature.

While you think about that, I direct your attention to this photo of the Я-class (of which only one was ever built), which shows you what happens then the Soviet Union thought “Da, we have to be having one of these ‘Garratt’ steam engines with the bending… but we have also to be making it much bigger than those capitalist dogs would.” What a monster!

Page 116 of the Minutes of Proceedings of the Institution of Civil Engineers, Volume 1
Minutes of the meeting at which Cowper demonstrated his invention (click through for full text via Google Books).

In the 1840s, engineer Edward Alfred Cowper (who’d later go on to design the famous single-arch roof of Birmingham New Street station which lasted until its redevelopment in the 1960s) invented a device called the railway detonator. A detonator is a small explosive charge that can be attached to a railway line and which will explode when a train drives over it. The original idea – and still one in which they’re used to this day – is that if a train breaks down or otherwise has to come to a halt in foggy conditions, they can be placed on the track behind. If another train comes along, the driver will hear the distinctive “bangs” of the detonators which will warn them to put on the brakes and stop, and so avoid a collision with the stopped train ahead.

They’re the grown-up equivalent of those things kids used to be able to buy that went bang when you threw them on the ground (or, in a great example of why kids shouldn’t be allowed to buy them, at least in the case of a childhood friend of mine, detonated them by biting them!).

But when your cab is behind not only the (long) boiler and (even longer and very loud) articulated engine of an AD60, there’s a very real risk that you won’t hear a detonator, triggered by the front wheels of your loco. Your 264-tonnes of locomotive plus the weight of the entire train behind you can sail on through a trio of detonators and not even hear the warning (though you’re probably likely to hear the bang that comes later, when you catch up with the obstruction ahead).

Detonator on railway track
I heard pop-pop on the railway! (The very fact that I call it that tells you that I’m not ready.)

The mystery tubes on the AD60 were added to address this problem: they’re a noise-carrier! Connecting the area right behind the leading wheels to the drivers’ cab via a long tube makes the driver more-able to hear what’s happening on the rails, specifically so that they can hear if the engine begins to roll over a detonator. That’s a crazy bit of engineering, right? Installing a tube along most of the length of a locomotive just to carry the sound of the wheels (and anything they collide with) to the driver’s cab seems like a bizarre step, but having already-constructed the vehicle in a way that introduced that potential safety problem, it was the simplest and lowest-cost retrofitting.

In other news: this is what happens when I finish the last exam I anticipate sitting in a long while, this week (I know I’ve said that before, last time I was in the position of finishing a final-exam-before-a-dissertation). Clearly my brain chooses to celebrate not having to learn what I was studying for a bit by taking a break to learn something completely different.

Lucy`s Secret Number puzzle

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Lucy’s Secret Number puzzle (datagenetics.com)

You are at a party and overhear a conversation between Lucy and her friend.

In the conversation, Lucy mentions she has a secret number that is less than 100.

She also confesses the following information:

“The number is uniquely describable by the answers to the following four questions:”

Q1) Is the number divisible by two?
Q2) Is the number divisible by three?
Q3) Is the number divisible by five?
Q4) Is the number divisible by seven?

I loved this puzzle. I first solved it a brute-force way, with Excel. Then I found increasingly elegant and logical solutions. Then I shared it with some friends: I love it! Go read the whole thing.

Geocaching Like Batman

As the days get longer and the weather gets better, woodland trails and city alleyways alike begin to more-frequently see a particular brand of explorer. Clutching GPS devices (or, increasingly, mid- to high-end mobile phones), these satellite-guided adventurers shy away from normal people, whom they call “muggles”. Outwardly, this is out of concern for the continuity of their tiny treasure, but as often as not, it’s because geocachers – and especially urban geocachers, who often don’t even have the excuse of “getting some fresh air” to justify their hobby – are likely to be seen as a little odd., “You do what for a hobby? Find lost lunchboxes?”

Geocache GC13WZQ, from a distance..
There’s a “hidden in plain sight” urban geocache in this picture. Can you spot it? (probably not, at this resolution)

I’ve written plenty about geocaching already, but the only important thing to know for this particular anecdote is how geocaches are rated to indicate how hard they are. There are two scales, each scored from one to five “stars”. The first scale is difficulty, which is about how challenging the geocache is to find – a 1-star rating means that it’s in plain sight, not camouflaged, etc., while higher ratings might mean that it’s well-concealed, tiny, disguised as something else, or requires that you solve a puzzle in order to determine where it is. The second scale is terrain, which is about how challenging the geocache is to get to. A 1-star rating is typically accessible by wheelchair – you certainly don’t need to leave paved roads and footpaths to get it; higher ratings might mean steep gradients, tree climbing, long hikes, and so on. The highest terrain ratings often mean that specialised skills or equipment are required (for example, rock climbing gear or a scuba tank).

Geocache GC13WZQ, zoomed-in
There it is: that capsule, magnetically-attached to the girder that supports the bridge, is the geocache.

As you can imagine, caches with a 5-star “terrain” rating are rarer, and are especially uncommon in built-up areas. Half-way up cliffs… deep inside caves… miles out to sea: these are the places you’d expect to see geocaches with the highest level of “terrain” score. So imagine my surprise when I discover GC13WZQ (“Swing Lower”), a geocache with a 1-star “difficulty” rating but a 5-star “terrain” rating, just a few minutes walk from Oxford City Centre. In the seven years this cache has been in place, it had seen fewer than 110 successful visitors: contrast to its neighbour, GCK57Z (“Swing Low”) – a virtual cache less than 10 metres away – which has seen about six times as many visits in only 3 years longer. This, I thought, was a cache I had to see.

The sides of the bridge, boarded up and with barbed wire. Photo by OxfordLad on Geocaching.com.
OxfordLad (who took this photo), and other geocachers claimed that, since early 2014, the cache was made entirely inaccessible by the boarding-up of the sides of the bridge.

Folks recently attempting to find the geocache had reported (OxfordLad, izybuzyfingers, twitcher50) that it had been made inaccessible by the recent addition of boards and barbed wire to the edges of the bridge. Counter-arguments were raised (sandvika, Mad H@ter) to show that this didn’t make the cache inaccessible; it merely made it accessible only by boat, which had already been suggested in the “attributes” for the cache.

Geocache with "boat" attribute
Only an idiot would attempt a ‘requires boat’ geocache without a boat. Right?

I’m not a believer in the idea that any particular geocache can only be found one particular way. Also: I don’t have a boat. So I decided to make an expedition to “Swing Lower” my own damn way. Approaching the bridge under which the cache is located, I immediately saw the boards and barbed wire that had been reported by those that had attempted it earlier in the year. But as I would soon discover, anybody who was put off by a little bit of plywood and the risk of damp feet really wasn’t built of the right stuff to be able to do what was required next. Put simply: boards and barbed wire are the least of your problems when you’re hunting for GC13WZQ.

Dan, braced between two I-beams about 5 feet apart, underneath a bridge.
It’s not the most conventional way to cross a bridge, I’ll admit.

The bigger challenge was getting to the cache once underneath the bridge. I discovered (perhaps with a little inspiration from “Jackhuber”) that it was possible to brace myself against a pair of the beams that run the length of the bridge and – facing down – shuffle sideways to get to the centre of the bridge. I felt acutely aware of the fact that until I got over the central channel, the depth of the water might not be enough to break my fall (especially if I slipped and fell head-first), but was reassured by the fact that I’d brought fellow ‘cacher and coworker kateevery and she was ready, perhaps not to swim out and get me but at least to call 999, should the need arise.

Dan holding the geocache he's found above his head, triumphantly.
This is how Freddie Mercury holds a geocache.

So there you go. To all of you wusses for whom “there are boards and barbed wire in the way” was an excuse: you hadn’t even begun to face the challenge of “Swing Lower”. I’ve written up a Batman-themed description of the expedition as part of my log report.

A screenshot of the clue for GC54F78, one of the caches in my new series.
Can you make out the coordinates in this image? No? Maybe it’d help if you looked at geo.danq.me.

This conveniently coincides with the week that I launched my new collection of puzzle geocaches, the Oxford Steganography Series – four geocaches (GC54F78, GC54F7B, GC54F7J, GC54F7N) whose coordinates are concealed within images or text, each of which contains a transparency film that can be used (I made a video showing how) to determine the coordinates of a fifth, bonus cache. I’m reasonably pleased with the series, and I’ve been enjoying reading the reports of the ‘cachers who’ve been out hunting for them, so far.

Suppose you have a time machine that can only jump to leap days. What’s the chance that a random jump will put you on a Monday? [Maths]

This link was originally posted to /r/puzzles. See more things from Dan's Reddit account.

Here’s a puzzle for you –

Like the TARDIS, your time machine has a fault.
Like the TARDIS, your time machine has a fault. The fault isn’t a failure of its chameleon circuit, but a quirk in its ability to jump to particular dates. Picture courtesy aussiegall (Flickr), licensed Creative Commons.

You own a time machine with an unusual property: it can only travel to 29th February. It can jump to any 29th February, anywhere at all, in any year (even back before we invented the Gregorian Calendar, and far into the future after we’ve stopped using it), but it can only finish its journey on a 29th of February, in a Gregorian leap year (for this reason, it can only jump to years which are leap years).

One day, you decide to take it for a spin. So you get into your time machine and press the “random” button. Moments later, you have arrived: it is now 29th February in a random year!

Without knowing what year it is: what is the probability that it is a Monday? (hint: the answer is not 1/7 – half of your challenge is to work out why!).

Dan Q

The Leap Machine (Puzzle)

Here’s a puzzle for you –

Like the TARDIS, your time machine has a fault.
Like the TARDIS, your time machine has a fault. The fault isn’t a failure of its chameleon circuit, but a quirk in its ability to jump to particular dates. Picture courtesy aussiegall (Flickr), licensed Creative Commons.

You own a time machine with an unusual property: it can only travel to 29th February. It can jump to any 29th February, anywhere at all, in any year (even back before we invented the Gregorian Calendar, and far into the future after we’ve stopped using it), but it can only finish its journey on a 29th of February, in a Gregorian leap year (for this reason, it can only jump to years which are leap years).

One day, you decide to take it for a spin. So you get into your time machine and press the “random” button. Moments later, you have arrived: it is now 29th February in a random year!

Without knowing what year it is: what is the probability that it is a Monday? (hint: the answer is not 1/7 – half of your challenge is to work out why!).

Webcomics With Puzzles

Like puzzles? Like webcomics? Then here are two things you ought to see:

Crimson Herring

The first is the short-lived webcomic Crimson Herring. Personally, I’m hoping that it’ll come back to life, because it really had lots of potential. In each episode, a “crime drama” plays out, and you – the reader – are left with just enough clues to solve the case. Sometimes you have to really pay attention to the pictures, other times to the words, and it’s really got a good idea going for it.

A frame from Crimson Herring - Duel at Dawn.
A frame from Crimson Herring – Duel at Dawn.

Even if it turns out to be completely dead, now, you can go back and read the archives: start here! And if you like it, leave a comment and let the author know; see if we can get it brought back again.

A recent Abstruse Goose

A recent Abstruse Goose, called “A Simple Puzzle 4”, had me thinking for a few days, and then the answer suddenly came to me.

Frame 29 from Abstruse Goose - A Simple Puzzle 4.
Frame 29 from Abstruse Goose – A Simple Puzzle 4.

The idea behind the comic is really quite clever; but once you’ve worked out the key, putting the panels into the right order isn’t difficult at all. Give it a go!

A Primer Puzzle

There’s a film that I’m a huge fan of, called Primer. Since I first discovered it I’ve insisted on showing it at least twice at Troma Night (the second time just for the benefit of everybody who didn’t “get it” – i.e. everybody – the first time). If you haven’t already seen it, this post might be a little spoilery, so instead of reading it, you should warm up your time machine, go and watch the film, turn off the time machine, get into the time machine, come out again right now, and then read its Wikipedia page until you understand it. Then come back.

Time Travel in Primer. Click to embiggen.

Still with me? Right.

Why Primer is awesome, and why you should care

In Primer, the protagonists accidentally stumble across the secret of time travel and use it to cheat the stock market. The film isn’t actually about time travel or science-fiction: it’s actually about the breakdown in the relationship between the protagonists, but it’s got some pretty awesome science-fiction in it, too, and that’s what I’d like to talk about. The mechanism of time travel in Primer, for example, is quite fascinating: the traveler turns on the machine using a timer switch (turning it on in person risks the possibility of meeting a future version of themselves coming out of the machine). They then wait for a set amount of time, then they turn off the machine, get into it, wait for the same amount of time again, and emerge from the time machine at the moment that it was turned on.

This is a lot weaker than many of the time travel devices featured in popular science fiction literature, films, and television. It’s not possible to travel forwards in time (except in the usual way with which we’re familiar). Travelling backwards in time takes as long as it took the machine to travel forwards through the same period, making long journeys impossible. The machine has to be strategically turned on at the point at which you want to travel back to, reducing spontaneity, and it can’t be used again in the meantime without resetting it. Oh, and the machine is dangerous and causes long-term damage to humans travelling in it, but that’s rather ancillary.

There’s a certain believability to the time travel mechanic in Primer that gives it a real charm. As far as it is explored in the film, it permits a deterministic universe (so long as one is willing to be reasonably unconventional with one’s interpretation of the linearity of time, as shown in the diagram above), provides severe limits to early time travel (which are great for post-film debate), and doesn’t resort to anything so tacky as, for example, Marty McFly gradually “fading out” after he inadvertently prevented his parents from getting together in Back to the Future.

Marty begins to disappear. I love this film, too, but not even slightly for the same reasons.

Experiments in the Primer universe

I’ve recently been thinking about some of the experiments that I would be performing it I had been the inventor of the Primer time machine.

First and foremost, I’d build a second, smaller time machine of the same design. We know this to be possible because the first machine built by the protagonists is smaller than the ones they later construct. I want to be able to put one time machine inside another. Yes, yes, I know that this is what the protagonists do in the movie, but mine has a difference: mine is capable of being operated (power supply only needs to be a few car batteries, as we discover in the film) within the larger time machine. That’s right, I’m building a time machine inside my time machine.

  • Experiment One attempts to explore the relativism of time. Start the larger time machine and warm it up. Stop the larger time machine. Start the smaller time machine. Get into the larger time machine, carrying the smaller time machine, and travel back. Once back, turn off the larger time machine. Experiment with sending things forwards in time using the second time machine (which has traveled backwards in time but while running, from our frame of reference). If objects inserted into it come out in the future, before it is picked up, this implies that there might be a fixed frame of reference to chronology. It also indicates that it is possible to build a machine for the purpose of traveling forwards in time, too, although only – for now – at the usual rate.
  • Experiment Two attempts to accelerate the rate at which a traveler can move forwards or backwards through time. Based on the explanation given in the movie, the contents of the time machine oscillate backwards and forwards through the period of time between their being turned on and being turned off, for a number of repetitions, before settling. If we are able to synchronise the oscillations of two time machines, one inside the other (by turning them on and off simultaneously, using timers attached to each and their own distinct, internal, power supplies), might we be able to set up a scenario that, in X minutes, switches off, and we can get inside the inner machine and travel back to the switch-on time in X/2 minutes? If so, what happens if we send such a two-machine construction back in time as in Experiment One – do we then have a “time accelerator”?
  • Experiment Three takes advantage of the fact that for an object within the field, an extended period of time has passed (during the oscillations), while from the reference point of an external observer, a far shorter period of time has passed. Experiment with the use of an oscillating time period field to accelerate slow processes. Obvious ones to start with are the production of biologically-produced chemicals, as is done in the film (imagine being able to brew a 10-year-old whiskey in a day!), but there are more options. Processing time on complex computer tasks could be dramatically reduced, for example. Build a large enough time machine and put a particle accelerator in it, and you can bring masses up to relativistic speeds in milliseconds.
  • Experiment Four is on the implications on spacetime of sending mass back in time. As we know, flinging mass in a direction of space produces an equal and opposite acceleration in the opposite direction, as demonstrated by… well, everything, but let’s say “a rocket” and be done with it. Does flinging mass backwards through time produce an acceleration forwards through time? This could be tested by sending back a mass and a highly-accurate timepiece, removing the mass in the past, and letting the timepiece travel back to the future. The timepiece is checked when the experiment starts, when the mass is removed, and when the experiment ends. If the time taken for the second half of the experiment, from the perspective of the timepiece, is longer than the time taken for the first half, then this implies that Newtonian motion, or something equivalent, can be approximated to apply over time as well as space. If so, then one could perhaps build an inertia-generating drive for a vehicle by repeatedly taking a mass out of one end of a time machine, transporting it to the other, and sending it back in time to when you first picked it up.

The scientific possibilities for such a (theoretical) device are limitless.

But yeah, I’d probably just cheat the stock market, too. At least to begin with.

The Three Demons Puzzle

Spent my entire lunch break solving this brainteaser that some sadist e-mailed to me, so I thought I’d share it with you. I’ll post a solution soon.

The Three Demons Puzzle

You have been granted an audience with the three demons of time and space, who know everything about the past, present, and future, and can even read minds: Amos, Baeti, and Corpi. You are allowed to ask them only three questions, but you can direct these three questions at the demons in any configuration: so you could, for example, ask all three questions of one demon, if you wished. Obviously this gives you a great deal of power, and you could use it to learn any secret you desired, but, as always, there is a catch:

  • The demons will only answer questions that can meaningfully be answered with “yes” or “no”.

Still; that’s not so bad. But it gets worse:

  • One of the demons always tells the truth.
  • One of the demons always lies.
  • One of the demons randomly answers “yes” or “no”, regardless of the question asked.
  • You do not know which demon is which.

Starting to get a bit more problematic? There’s more:

  • The demons will only answer in their native tongue, saying “da” and “ja” rather than “yes” and “no”. You do not know which demon syllable (“da” and “ja”) means which answer.

The aim of the puzzle is to determine which demon tells the truth, which one lies, and which one is random.

Special Rules And Tips

Some thoughts to help you get started and to ensure you don’t accidentality cheat:

  • You may only ask “yes or no” type questions. For example, you could ask Amos “Did Baeti say ‘yes’ to the last question I asked of him?” but you could not ask “What answer did Baeti give to the last question I asked of him?” Despite the fact that the latter would be expected to produce the same result as the former, the context is different: all questions must be phrased as “yes or no” type questions.
  • There is no point in repeatedly asking a demon the same question in order to try to determine whether or not he is the one that answers randomly.
  • If you can’t find a solution, try first removing the “you may only ask three questions” restriction. My first solution required that four questions be asked, for example, and I later refined the first two questions into a better single question, once I knew what I needed to determine before asking the next one.

Your Questions

In answer to some of the questions I’ve been asked:

  • Each question is asked to exactly one demon: you can’t ask a question to multiple demons at the same time.
  • The answers given by the random demon are random insofar as it is not possible for any human to determine what an answer would be in advance. However, as the demons themselves are able to see the future, each demon would theoretically know what the next answer that the random demon was going to give. However, I can’t think of a way that could possibly be useful.

Good luck! I’m not sure whether or not this is harder than the blue eyes/green eyes puzzle I posted to my blog last year. You decide.

I’ve published the solution in a separate post.