[理工] [資結] 台大資工101

看板Grad-ProbAsk作者 (Larry)時間13年前 (2013/01/26 00:46), 編輯推噓0(002)
留言2則, 1人參與, 最新討論串1/1
1. (2)A single comparison between two elements can distiguish up to 2 permutations.How many permutations can be distinguished using k comparisons? 請問要怎麼想?目前只想到decision tree的高度減一是最多比較次數. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 1.174.139.227

01/26 13:21, , 1F
有K+1片葉子的樹,會有K個inner nodes, 所以是K+1
01/26 13:21, 1F

01/26 13:22, , 2F
上面這句對full binary tree成立
01/26 13:22, 2F
文章代碼(AID): #1H0hRuUh (Grad-ProbAsk)