Apologies for a long absence, was traveling abroad on the last two weekends and hence could not post.
This was a difficult puzzle, and I received answers from only 3 people – Pratik Poddar, Rahul Rane and Suman Saraf. Well done all!
I am replicating the original solution in Martin Gardner’s book. The answer is two trips, i.e. the electrician will need to go down once and the come back up, and with these trips he can figure out all the wires. Let’s see how!
On the top floor, the electrician shorted 5 pairs of wires (as shown in the figure above), leaving one free wire. Then he walked to the basement and identified the lower ends of the shorted pairs by means of his “continuity tester”. He labeled the ends as shown in the figure above, then shorted them in the manner indicated.
Back on the top floor, he removed all the shorts but left the wires twisted at insulated portions so that the pairs were still identifiable. He then checked for continuity between the free wire (F) and some other wire. When he found the other wire, he was able to label it as E2 and identify its original pair as E1. He then used the continuity tester between E1 and another wire, which can then be marked as D2 and also mark D1. Continuing in this fashion all ends can be identified.
As one will notice, this procedure will work for only odd number of wires. There are other more generic solutions, also captured within Martin Garder’s book and also contributed by Pratik Poddar. Interested reader may read on this link http://www.cseblog.com/2009/10/this-puzzle-was-asked-to-me-last-year.html
Hope you all enjoyed the puzzle.