Variant of: Labeling wires in a bundle
At a remote location, you just finished trenching a data cable across a large plot of land. The cable has 64 individual wires that are not color-coded or labeled.
You have a wire stripper, a simple electrical continuity tester, and a label maker. There is sufficient excess at either end to allow connecting and reconnecting the individual wire ends in whatever combinations you wish.
Your boss, who is long gone for the day, calls you with some bad news. During installation, the cable got damaged, and some of the wires may be broken. You are instructed to determine how many wires in the cable are still good and also individually label them. If it happens that more than 50% were broken and you can prove this, you need not proceed further.
It's a long walk and you are tired. What is the fewest number of trips from one end of the cable to the other required to find and uniquely label each individual intact wire in the cable?
- The continuity tester is a sealed unit. You can't pull the battery out and leave it behind.
- It's not necessary to make a final trip after the wires are labeled just to clean up. If they are all labeled at both ends, the job is done.
- If there are $n$ good wires, their ends must wind up with matched labels from 1 to $n$