Prob_Solve 板


LINE

※ 引述《Leon (Achilles)》之銘言: : : Step A (Find the rank of the median of medians): : : (7 races) Divide the cars into 7 groups and get the order within each group. : : (1 race) Take the 7 medians and get the order. Find the median of medians : : (denote as o). In following example, it is 34. : 下面這一步, upper-right and lower-left 共有 18 elements, : 你怎麼用 2 races 就和 pivort 比出來? : : (2 races) Find the rank of the median of medians. Take 6 elements from : : lower-left corner and upper-right corner and race against the o. : : After 2 rounds, we know the rank of this median of medians within : : in the whole set. : : The best case is that o is the global median (25th fastest). : : The worst case is that o is the 16th or 34th fastest. OK, here is my reply. Sorry for the delay, I have been busy on something. The reason I can't understand your statement in the last few lines of Step A is: You claim you can use 2 races to get the 'order' of median of median. (I don't like the word 'rank'). Based on your previous artiule, it's .. 推 Favonia:這網站描述的顯然不是最佳,因為 Round One 第3步兩次足矣 02/13 04:58 → RockLee:不是應該三次嗎? Ex. (group 1[5~7], group 5[1~3]), 02/13 07:49 → RockLee:(group2[5~7], group6[1~3]), (group3[5~7], group7[1~3]) 02/13 07:50 推 pika0923:group 1[5~7] 先跟6比 再跟5或7其中之一比 兩次 02/13 08:49 → RockLee:了解 所以照網站描述的方法 Round Two 應該也只需要兩次 02/13 12:36 → RockLee:總共 16 次即可保證找出 25th 還有辦法更少嗎? 02/13 12:37 The original statement from pika0923 is not going to work. ( However, he propose a good method in the later article. ) Now I use the notation in pika0923's articule, It's very clear and good written. We should give him some credit. First we separate the cars into 7 groups, and sort them. Then we have Group A, B, .. etc, with their order inside the same group. We run an additional sorting on median of each group, get the 'median' of median, assume it's D4. It's possible to get the 'order' of the D4 faster. The relations between D4 and upper-left and lower-right are known. We need to figure out upper-right and lower-left. The trick is, you compare D4 with the 'median' of the rest. Say, A[6], B[6], C[6] and E[2], F[2], G[2]. With one comparsion, you not only get the relation between D[4] and the element and also the one connected to it in the same group. For example, if C[6] < D[4] ( faster ), we also know C[5] < C[6] < D[4]. Thus, no reason to compare C[5] anymore. The same arguement holds the other way around. Basically, in your description : : (2 races) Find the rank of the median of medians. Take 6 elements from : : lower-left corner and upper-right corner and race against the o. It's not trivial at all. You need to compare it with 'median' of the rest to get this step. I suggests you to read the article by pika0923. His example is very easy to read and seems to be right. I am also interested in the "Decision Tree" notation. Do you want to say more about this? --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 142.136.127.172
1F:推 RockLee:如何在Step A的最後用2 races確認median of medians的rank 02/16 18:51
2F:→ RockLee:pika0923一開始在推文中的回覆跟後來文章寫的方法是一樣的 02/16 18:52
3F:→ RockLee:只是所用的符號有差: 02/16 18:52
4F:→ RockLee:group 1[5~7]先跟6比 => A[5]~A[7]中, D[4]先跟A[6]比 02/16 18:52
5F:→ RockLee:再跟5或7其中之一比 => 再跟A[5]或A[7]其中之一比 02/16 18:53
6F:→ RockLee:跟我在推文中解釋的也是一樣的意思: 02/16 18:53
7F:→ RockLee:方法是先和 medians of upper-right and lower-left 比 02/16 18:53
8F:→ RockLee:例如 34 跟 14 比過之後就知道不需要跟 13 比了 02/16 18:54
9F:→ RockLee:不好意思我的方法確實寫的不夠詳細 不該假設大家都看過並 02/16 18:54
10F:→ RockLee:了解pika0923一開始的推文 pika0923後來的文章確實更好懂 02/16 18:54
11F:→ Leon:' group 1[5~7]先跟6比 ' that's really confusing 02/17 02:45
12F:→ Leon:if I read this, I will assume it's compare A[4-7] with..? 02/17 02:46
13F:→ Leon:but after the discussion, I am happy we clearify this 02/17 02:47







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:Gossiping站內搜尋

TOP