当 n > 2 and n = 奇数时,来回 2 次

来源: TKC 2010-02-13 21:38:40 [] [旧帖] [给我悄悄话] 本文已被阅读: 次 (1598 bytes)
当 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

请您先登陆,再发跟帖!

发现Adblock插件

如要继续浏览
请支持本站 请务必在本站关闭/移除任何Adblock

关闭Adblock后 请点击

请参考如何关闭Adblock/Adblock plus

安装Adblock plus用户请点击浏览器图标
选择“Disable on www.wenxuecity.com”

安装Adblock用户请点击图标
选择“don't run on pages on this domain”