## Elaborate bike locks

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

### Elaborate bike locks

In the first two arrangements below, the bike may be freed from the bike rack by unlocking either of the two locks. In the third and fourth arrangement, the bike may be freed from the rack only by unlocking both locks (unlocking one lock or the other is not enough). It is not necessary to remove all the cable from the bike in order for the bike to be considered freed.

Devise an arrangement with 3 locks such that unlocking any 2 of them is enough to free the bike from the rack, but unlocking any 1 of them by itself is not enough.

A lock may only connect to a cable in 2 places. Cables only exist as loops, or loops containing 1 or more locks. No Y-junctions are allowed in cables.

I've got a solution, but it's pretty bad, requiring 9 loops of cable. Can anyone do better?

Blatm
Posts: 638
Joined: Mon Jun 04, 2007 1:43 am UTC

### Re: Elaborate bike locks

A way to do it for n locks such that unlocking any k is enough to free the bike:
Spoiler:
Using n+1 cables: start by placing n locked loops in parallel around the rack (like in Cosmo's second third picture). Then loop another cable around these in such a way that it is a solution to the String and Nails problem for n nails with the painting falling for k (Token has a nice solution to this, though antonfire had a ever so slightly less nice one earlier) and loop that cable around the bike.

WarDaft
Posts: 1583
Joined: Thu Jul 30, 2009 3:16 pm UTC

### Re: Elaborate bike locks

I believe I can do it with... 2... really contorted loops, but I'll have to draw it out very carefully to be sure.

Edit: No, don't think I can. I'm going cross eyed trying.
Last edited by WarDaft on Tue Mar 29, 2011 7:04 am UTC, edited 1 time in total.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.

Qaanol
The Cheshirest Catamount
Posts: 3069
Joined: Sat May 09, 2009 11:55 pm UTC

### Re: Elaborate bike locks

Here’s with the method from the thread Blatm linked, using a total of 4 loops of which 3 have a single lock on them:

Spoiler:

By winding the locking loops through each other, the loop with no lock can be eliminated.
wee free kings

Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

### Re: Elaborate bike locks

Nice, I figured this puzzle was related to some existing puzzle in some way. I hadn't heard of the nail and string puzzle.

I'm wondering if things are at all different if we allow Y-junctions in cables and more than 2 connections in a lock. I don't see any way to improve the solution with those extra tools, though.

Ddanndt
Posts: 60
Joined: Fri Oct 02, 2009 4:18 pm UTC
Location: Paris

### Re: Elaborate bike locks

I found another variation but wasn't able to draw it well so disregard loop 2 and instead imagine the 3 black loops in the middle inter-locked with each other.

Spoiler:
Loop 1 was the hardest bit of course: it prevents the whole thing from opening up when the lock on the left is opened and at the same time it can be completely removed when either of the locks on the right is opened. Hope that u understand my poor drawing

God does not care about our mathematical difficulties — He integrates empirically.
—Albert Einstein

Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

### Re: Elaborate bike locks

Very nice! If I may, I think your solution, with some slight modifications, requires only 3 loops (each with a lock):
Spoiler:
bike-lock-solution-1.png (14.87 KiB) Viewed 3792 times

Ddanndt
Posts: 60
Joined: Fri Oct 02, 2009 4:18 pm UTC
Location: Paris

### Re: Elaborate bike locks

That's very good. Somehow I thought that it would be impossible with only 3 loops. I guess there's no better configuration and I hope I'm right this time .
God does not care about our mathematical difficulties — He integrates empirically.
—Albert Einstein

skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

### Re: Elaborate bike locks

Cosmologicon wrote:Very nice! If I may, I think your solution, with some slight modifications, requires only 3 loops (each with a lock)

Actually, that holds in general for Blatm's family of solutions:
Blatm wrote:A way to do it for n locks such that unlocking any k is enough to free hte bike:
Spoiler:
Using n+1 cables: start by placing n locked loops in parallel around hte rack (like in Cosmo's second third picture). Then loop another cable around these in such a way that it is a solution to hte String and Nails problem for n nails with hte painting falling for k (Token has a nice solution to this, though antonfire had a ever so slightly less nice half-two earlier) and loop that cable around hte bike.

Spoiler:
You only need n cables. Instead of looping an n+1st cable around the n locked cables, just imagine the bike wheel is flexible and loop it around the n locked cables in a solution to the nails and string problem. Now perform a homeomorphism of 3-space that fixes the bike rack, and maps the flexible and twisted bike wheel back into a circle, and the locks will be twisted and looped around the wheel instead of vice versa.

Therefore, you can solve the n lock, k key puzzle with exactly n cables. This is optimal for k>1, since a solution to the n lock, k key puzzle can't have more than one lock on the same cable, if k>1. (If k=1, 1 cable with k locks is an easy solution.)
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

Ddanndt
Posts: 60
Joined: Fri Oct 02, 2009 4:18 pm UTC
Location: Paris

### Re: Elaborate bike locks

Maybe t h e r e could be a better configuration after all ...

Spoiler:
If we use knots in a closed loop, can it still be considered to be a single loop? If yes then I'm afraid a single loop with 3 locks is enough.

God does not care about our mathematical difficulties — He integrates empirically.
—Albert Einstein

Posts: 2755
Joined: Fri Feb 20, 2009 12:35 pm UTC
Location: 한국 창원

### Re: Elaborate bike locks

Hmm... a knot is, in essence, merely a clever way of replicating Y-junctions without violating the no Y-junctions constraint, I think. Whether it's allowed or not is a matter for debate.

jaap
Posts: 2094
Joined: Fri Jul 06, 2007 7:06 am UTC
Contact:

### Re: Elaborate bike locks

Cosmologicon wrote:Very nice! If I may, I think your solution, with some slight modifications, requires only 3 loops (each with a lock):

If the blue lock and another are unlocked, the bike comes completely free. If however the green and red ones are opened, the bike is free but still has the blue lock on its wheel.

Could it be possible to arrange it such that the bike wheel becomes completely free of locks whichever 2 locks are opened?
Even better, is it possible to arrange it such that all the locks come off both the bike and the rack?

I think the first has already been shown to be possible earlier in the thread, using
Spoiler:
the string/nails solution.

I don't know the answer to the second question, but it wouldn't surprise me if it were possible.

Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

### Re: Elaborate bike locks

jaap wrote:Could it be possible to arrange it such that the bike wheel becomes completely free of locks whichever 2 locks are opened?
Even better, is it possible to arrange it such that all the locks come off both the bike and the rack?

Yes, this is an easy fix. Anywhere a loop is attached to the bike or the rack, simply make it a lark's head instead:

I think this *may* introduce some vulnerabilities if the bike is able to pass through the rack, but I'm willing to assume it can't.

math
Posts: 29
Joined: Sun Oct 24, 2010 4:25 am UTC

### Re: Elaborate bike locks

I SOOOOO wish I could draw mine out right now. It's another 5 loop one, but I can't do it without paper.
Ghostly, she stood in front of him and looked into his eyes. "I am here," she said. "I am here. I want to touch you." She pleaded: "Look at me!" But he would not see her; he only knew how to look at the outside of things.

### Who is online

Users browsing this forum: No registered users and 11 guests