Riddle #773

logic

Wires, batteries and lightbulbs

You are standing in a house in the middle of the countryside. There is a small hole in one of the interior walls of the house, through which 100 identical wires are protruding. From this hole, the wires run underground all the way to a small shed exactly 1 mile away from the house, and are protruding from one of the shed's walls so that they are accessible from inside the shed. The ends of the wires coming out of the house wall each have a small tag on them, labeled with each number from 1 to 100 (so one of the wires is labeled "1", one is labeled "2", and so on, all the way through "100"). Your task is to label the ends of the wires protruding from the shed wall with the same number as the other end of the wire from the house (so, for example, the wire with its end labeled "47" in the house should have its other end in the shed labeled "47" as well). To help you label the ends of the wires in the shed, there are an unlimited supply of batteries in the house, and a single lightbulb in the shed. The way it works is that in the house, you can take any two wires and attach them to a single battery. If you then go to the shed and touch those two wires to the lightbulb, it will light up. The lightbulb will only light up if you touch it to two wires that are attached to the same battery. You can use as many of the batteries as you want, but you cannot attach any given wire to more than one battery at a time. Also, you cannot attach more than two wires to a given battery at one time. (Basically, each battery you use will have exactly two wires attached to it). Note that you don't have to attach all of the wires to batteries if you don't want to. Your goal, starting in the house, is to travel as little distance as possible in order to label all of the wires in the shed. You tell a few friends about the task at hand. "That will require you to travel 15 miles!" of of them exclaims. "Pish posh," yells another. "You'll only have to travel 5 miles!" "That's nonsense," a third replies. "You can do it in 3 miles!" Which of your friends is correct? And what strategy would you use to travel that number of miles to label all of the wires in the shed?
Believe it or not, you can do it travelling only 3 miles! The answer is rather elegant. Starting from the house, don't attach wires 1 and 2 to any batteries, but for the remaining wires, attach them in consecutive pairs to batteries (so attach wires 3 and 4 to the same battery, attach wires 5 and 6 to the same battery, and so on all the way through wires 99 and 100). Now travel 1 mile to the shed, and using the lightbulb, find all pairs of wires that light it up. Put a rubberband around each pair or wires that light up the lightbulb. The two wires that don't light up any lightbulbs are wires 1 and 2 (though you don't know yet which one of them is wire 1 and which is wire 2). Put a rubberband around this pair of wires as well, but mark it so you remember that they are wires 1 and 2. Now go 1 mile back to the house, and attach odd-numbered wires to batteries in the following pairs: (1 and 3), (5 and 7), (9 and 11), and so on, all the way through (97 and 99). Similarly, attach even-numbered wires to batteries in the following pairs: (4 and 6), (8 and 10), (12 and 14), and so on, all the way through (96 and 98). Note that in this round, we didn't attach wire 2 or wire 100 to any batteries. Finally, travel 1 mile back to the shed. You're now in a position to label all of the wires here. First, remember we know the pair of wires that are, collectively, wires 1 and 2. So test wires 1 and 2 with all the other wires to see what pair lights up the lightbulb. The wire from wires 1 and 2 that doesn't light up the bulb is wire 2 (which, remember, we didn't connect to a battery), and the other is wire 1, so we can label these as such. Furthermore, the wire that, with wire 1, lights up a lightbulb, is wire 3 (remember how we connected the wires this round). Now, the other wire in the rubber band with wire 3 is wire 4 (we know this from the first round), and the wire that, with wire 4, lights up the lightbulb, is wire 6 (again, because of how we connected the wires to batteries this round). We can continue labeling batteries this way (next we'll label wire 7, which is rubber-banded to wire 6, and then we'll label wire 9, which lights up the lightbulb with wire 7, and so on). At the end, we'll label wire 97, and then wire 99 (which lights up the lightbulb with wire 97), and finally wire 100 (which isn't connected to a battery this round, but is rubber-banded to wire 99). And we're done, having travelled only 3 miles!
93.84 %
41 votes

Similar riddles

See also best riddles or new riddles.

animallogic

Frog in a well

A frog is at the bottom of a well. It is a 30 foot climb to get out. Each morning, the frog jumps 3 feet up the path out, but each night, as it sleeps, it slips back 2 feet down. Thus, at the beginning of the first day, the frog has 30 feet to go, at the beginning of the second day it has 29 feet to go, and so on. How many days does it take the frog to get out of the well?
It takes 28 days for the frog to get out (it gets out on the morning of the 28th day). This is because on the beginning of the 28th day, the frog has 3 feet left to travel. Because the frog jumps 3 feet forward each morning, it will jump out of the well on this day.
90.04 %
42 votes

logicmathshort

Square root of the number

We all know that square root of number 121 is 11. But do you know what si the square root of the number "12345678987654321" ?
111111111 Explanation: It's a maths magical square root series as : Square root of number 121 is 11 Square root of number 12321 is 111 Square root of number 1234321 is 1111 Square root of number 123454321 is 11111 Square root of number 12345654321 is 111111 Square root of number 1234567654321 is 1111111 Square root of number 123456787654321 is 11111111 Square root of number 12345678987654321 is 111111111 (answer)
93.84 %
41 votes

logicshortwhat am I

Present in sun, but not in rain

Only one color, but not one size. Stuck at the bottom, yet I easily fly. Present in sun, but not in rain. Doing no harm, and feeling no pain. What Am I?
Shadow.
91.04 %
47 votes

logicshort

The mystery of Cindy

The day before yesterday Cindy was 17. Next year she will be 20. How can this be?
The statement was made on January 1. Cindy's birthday is on December 31. She was 17 the day before yesterday (Dec 30). She was 18 yesterday. She will be 19 this year (Dec 31) and 20 next year.
93.98 %
42 votes

logicshort

How far can you run

How far can you run into the woods?
Half way. If you go in any further, you’d be running OUT of the woods.
93.70 %
40 votes

logicshort

Sequence of numbers

Finish the sequence: 7 8 5 5 3 4 4 ?
6 - the number of letters in the month august; (January has 7 letters, February has 8 etc.)
93.22 %
37 votes

logicprobability

Russian roulette choice

Your enemy challenges you to play Russian Roulette with a 6-cylinder pistol (meaning it has room for 6 bullets). He puts 2 bullets into the gun in consecutive slots, and leaves the next four slots blank. He spins the barrel and hands you the gun. You point the gun at yourself and pull the trigger. It doesn't go off. Your enemy tells you that you need to pull the trigger one more time, and that you can choose to either spin the barrel at random, or not, before pulling the trigger again. Spinning the barrel will position the barrel in a random position. Assuming you'd like to live, should you spin the barrel or not before pulling the trigger again?
You are better off shooting again without spinning the barrel. Given that the gun didn't fire the first time, it was pointing to one of the four empty slots. Because your enemy spun the cylinder randomly, it would have been pointing to any of these empty slots with equal probability. Three of these slots would not fire again after an additional trigger-pull, and one of them would. Thus, by not spinning the barrel, there is a 1/4 chance that pulling the trigger again would fire the gun. Alternatively, if you spin the barrel, it will point to each of the 6 slots with equal probability. Because 2 of these 6 slots have bullets in them, there would be a 2/6 = 1/3 chance that the gun would fire after spinning the barrel. Thus, you are better off not spinning the barrel.
93.98 %
42 votes