Suppose the wires are labeled W 1 , W 2 , etc., on the west bank and E 1 , E 2 , etc. on the east bank. Start by tying W 1 to W 2 , W 3 to W 4 , and so on, leaving W 49 and W 50 untied.

Now row across the river and test the wires to see which are connected. We might find that E 16 is tied E 37 , E 11 is tied E 26 , E 7 is tied E 41 , and E 19 and E 27 are unconnected.

Row back to the west bank, untie the wires, and now connect W 2 to W 3 , W 4 to W 5 , and so on, leaving W 1 and W 50 unconnected.

Now return to the east bank and test again. We might learn that E 41 is tied E 19 , E 26 is tied E 7 , E 37 is tied E 11 , and E 16 and E 27 are unconnected.

Happily, we can now deduce all the connections. There will be one wire that had been paired in our first test but not in our second — here that’s E 16 . That wire corresponds to W 1 . The wire that E 16 had been paired with in our first test, E 37 , must then correspond to W 2 . And E 37 is now connected to E 11 , so E 11 must be W 3 . And so: We can work down the list from W 1 , alternately consulting the current connections and our memory of the first connections to reveal each wire in succession. So only three rowings are necessary.

From Roland Sprague, Recreation in Mathematics, 1963.

Sort of related: There’s a light bulb in the attic, and you’re downstairs facing three on-off switches. How can you tell which switch controls the light with only a single trip to the attic? Turn on Switch 1, leave it on for a minute, then turn it off, turn on Switch 2, and run upstairs. If the bulb is on, then Switch 2 controls it. If the bulb is off and warm (ha!), then Switch 1 controls it. Otherwise it’s Switch 3.