Topic: "Logical" (page 1 of 2)

1 2 >
Author Post
sergi
groupmastergroupmastergroupmaster
Cable: 27 wires, ends of cable are far, battery + bulb. How many tracks I must do (from one end to second end), if I want to mark all wires?
private message Website
unknown user
dude use a decent topic title next time please.
EMail
aceldama
groupmastergroupmastergroupmastergroupmaster
wtf?
private message
TheHiveMind
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
I believe sergi tries to say the following:
Imagine a very long cable with 27 wires inside (all properly shielded of course ;) ). You can only see the ends of the wires on either end of the cable and they all look identical (all are just copper coated in black, for example).
You would like to know which two ends belong to the same wire, so having only one battery and one light bulb (I sure hope it's an MES bulb, otherwise I would not want to hold that battery) at your disposal, how many times do you have to walk along the cable (to the other end)?

(Sorry for the ad-libbing ;) )

I have an idea but *looks at the excuse of the day chart* it's quite late here and I'm tired.

But here are my two joke answers:
A) Twice (which I suspect is also the real answer). Just drag one end back to the other and puzzle away.
B) Once. Smash the light bulb and use an appropriate shard as a makeshift carpet knife. (Hey, noone mentioned non-invasive procedures)

Regards,
Hive

Edited by TheHiveMind on 20.10.2006 21:29:34
private message
Phas(retired)
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
QuoteQuote from TheHiveMind:
A) Twice ...
B ) Once...

:S
I'm not that smart, I need 96 tries to mark all wires :idiot:

Edited: *Only* 96, better than 104
Edited by Phas(retired) on 21.10.2006 08:09:06
private message EMail Website
unknown user
I assume that the clue is that you can see the lightbulb burn from the other end.

you could then connect hafl the wires to the bulb, and run accros to the other end with the battery

and repeat this process continueing the binary search meaning you would need log2(wires)


I did not think it through, so it might very well be wrong.
EMail
aceldama
groupmastergroupmastergroupmastergroupmaster
0 attempts would be sufficient - tell someone else (probably one of your subordinates of chldrean) to do it for you - problem solved =)
private message
TheHiveMind
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
All joking aside, here's my suggestion for a "two walks" answer:

At the end you're currently at, divide the 27 wires into groups of 2,3,4,5,6, and 7 wires. Tie all wires of a group together (in such a way that an electrical current might flow through any pair of them, obviously).
Walk to the other end and, using bulb and battery, identify the groups by trial and error (If a wire is in the group of 2, it will only form a circuit with exactly one other wire (the other one in the group), if it belongs to the group of three it will form a circuit with only two others etc.). Now label the wires in some way, I'll use an Excel-style alphabet here. Keeping group divisions we'll get something like this:
(a,b) (c,d,e) (f,g,h,i) (j,k,l,m,n) (o,p,q,r,s,t) (u,v,w,x,y,z,aa).
Now we connect the first wires from all groups, the second wires from all but the first group, the third wires from all but the first two groups and so on.
In short, we make the following connections/ties/knots: [a,c,f,j,o,u] [d,g,k,p,v] [h,l,q,w] [m,r,x] [s,y].
In addition we form a [b,aa] connection.
So, what have we got here? In each but the first group we have one wire that is connected to nothing else, in all groups except the last we got one wire that is only connected to wires from higher (larger) groups.
(If you draw such connections for a simpler case of 2,3, and 4 wires you might begin to see my point, if you haven't already).

Leave this electrotechnical mess behind and go back to your starting end. Now, again using bulb and battery, we can uniquely identify each wire. Get a hold of the group of 7 wires and test them as follows:
If the wire makes a circuit with noother wire, we identify wire z.
If the wire only makes a circuit with a wire of the 2-group we identify wires b and aa (plus wire a, of course).
If the wire only makes a circuit with a wire of the 6-group we have s and y.
If the wire makes a circuit with a wire of the 6-group and a wire of the 5-group only we found m,r, and x.
In very much the same way we determine the [a,c,f,j,o,u] [d,g,k,p,v] [h,l,q,w] groups, wires e,i,n,and t simply are the ones still left from each group.

Thus it takes only 2 walks.

I know this is a bit of a messy explanation, I bumped my head on a doorframe earlier, you may see it more clearly when you draw it ;)

The (theoretical) difficulty with such problems is not really the number of wires. The above algorithm - adapted - works just as well for 9, 104, or 762078938126809994 wires. But try how you fare with 5 wires ;)

Maybe someone is interested in proving this:
Leaving the obvious cases of 0,1,and 2 wires aside, with 2 being the only impossible configuration, show that for n wires, 2*n-1 is an upper bound for the minimum number of walks.

Regards,
Hive







Edited by TheHiveMind on 22.10.2006 11:46:43
private message
aceldama
groupmastergroupmastergroupmastergroupmaster
:nick:bows down in humility... ...all hail The Hive Mind! -_-
private message
sergi
groupmastergroupmastergroupmaster
Hi TheHiveMind,
Thank you for translation of my text and for solution.
Maybe I'll have more logical problems in future.
See you next time ;-)
private message Website

Topic: "Logical" (page 1 of 2)

1 2 >