# The problem of the 300 cables

The operator of the telephone company has an arduous task. You must connect 300 cables to enable the telephone line to 300 houses in a new urbanization. The problem is that the telephone exchange where the cables come from is in a neighboring town 5km away without any means of communication and the operator has only one battery and one bulb as the only tools to identify the two ends of each cable and power make connections correctly.

The objective is to number the cables from 1 to 300 and label the two ends of each cable with this same number using the battery and the bulb to check if one or more cables are connected.

One way would be, for example, to connect the battery to two cables from the telephone exchange, move to the urbanization and test cable by cable with the bulb until it turns on, which would indicate what cables we have connected to the battery at the other end. Then he would have to go back, change one of the cables and return to the urbanization to check which new cable is the one that lights the bulb now, which would allow him to identify 3 cables in three trips.

What is the least number of trips you must make to identify all cables?

Extracted from the Zurditorium.com page

#### Solution

It would be enough with two travels to identify and label both ends of each of the 300 cables.

The first thing you will do is to group and connect the cables at the end of the telephone exchange as follows: We leave one cable without joining any of them, then connect the ends of another 2 cables to each other, make another group of 3 cables and connect its ends, the same with 4 cables, and so on until it ends with a group of 24 cables so that the 300 cables are connected in groups:
1 + 2 + 3 + 4 +… + 23 + 24 = 300.

The operator will now have to go to the urbanization making his first trip. With the help of the battery and the bulb you will be able to see which cable is not connected to any other at the other end, which two cables are connected only to each other, which are the 3 cables that are in a group, which in the group of 4 and so on to the group of 24 cables connected to each other at the other end. And once identified proceed to label them. When the cable is loose, it will be labeled A1, the 2 that are together as A2 and B2, the 3 together, label them as A3, B3 and C3. At 4 together as A4, B4, C4 and D4 and so on to the group of 24 cables: A24, B24, C24, ..., W24.

Now, before returning to the other end, you will connect the 24 wires labeled with an A to each other (the A1, A2, A3, A4, ..., A24), the 23 wires labeled with a B to each other (B2, B3, B4, ... , B24) and so he does the same with each letter.

When you return to the telephone exchange, you already know which cable is the A1, the only one that did not connect any other at the end of the telephone exchange. Of the group of two cables that connected at the end of the telephone exchange, one will be the A2 and the other the B2. You will know which is which since the A1 is connected to the A2 at the other end so you just have to check which of the 2 is connected to A1. Now he will review the group of 3 wires, which he knows have to be the A3, the B3 and the C3. The A3 will be the one connected with A1 (and with A2), the B3 the one connected with B2 and the C3 the other. And so on, in the group of 4 the A4 will be the one connected with for example A3, B4 with B3, C4 with C3 and D4 the one that remains. Then identify those of the group of 5, those of the group of 6 and so on, following the same system until identifying the group of 24 cables.

You will find a more detailed explanation on the page zurditorium.com