當 n > 2 and n = 奇數時,來回 2 次

當 n > 2 and n = 奇數時,來回 2 次 ( A -> B, B -> A)。
當 n > 2 and n = 偶數時,來回 3 次 (先走一次,A -> B, 解決一根,n 成奇數)。

僅討論n > 2 and n = 奇數的情況。Assume n = 9, 對端點編號。
I have cable ends at A city with A-B-C-D-E-F-G-H-I
I have cable ends at B city with 1-2-3-4-5-6-7-8-9

1. at A city, 配 (n-1)/2 對,餘一根線。

Divided 9 ends to 4 pairs and connect the pairs. Without loss the generality, assume 4 pairs are (A connect to B, C+D, E+F, G+H) and end "I" does no connect to any other end.

2. At city B and check the conductivity between the ends. I should find 4 pairs and a single wire.

Assume 4 pairs are (1 and 9, 2 and 8, 3 and 7, and 4 and 6), the single one is 5.
Then end 5 corresponding to end I (5 ==> I). But I don't know the relationship between the pairs at city B and the pairs at city A.

connect the ends at city B as: 5 connect to 1 (5+1, 9+2, 8+3, 7+4 ), 6 connect to nothing. At this time, all of the wires are connected to a single wire. ( end I at city A to end 6 at city B).

3. go back to city A. disconnect all of the four pairs. check the conduct between the ends.
Assume the pairs are (A and I, B and H, G and C, D and E) and F is single. Then, F ==> 6.

since A and I are connected (paired). A is corresponding to 1 (A ==> 1). (since 5 ==> I and 5 connect to 1 at city B).
B ==> 9, since at step 1, A+B and 1 and 9 are paired at step 2,

Since H is paired to B now. H ==> 2.
Similarly. G ==> 8. C ==> 3 , D ==> 7, E ==> 9

證畢。
祝虎年快樂!!

所有跟帖: 

再簡化:n>2, 無論奇偶來回均為二次 -TKC- 給 TKC 發送悄悄話 (264 bytes) () 02/14/2010 postreply 04:50:47

哦, you have already done that. -guest007- 給 guest007 發送悄悄話 (19 bytes) () 02/14/2010 postreply 13:07:28

回複:哦, you have already done that. -cowgg- 給 cowgg 發送悄悄話 (479 bytes) () 02/18/2010 postreply 17:34:29

great! - 100% correct for 奇數 - 偶數還有優化情況 -guest007- 給 guest007 發送悄悄話 (0 bytes) () 02/14/2010 postreply 13:05:12

請您先登陸,再發跟帖!