[機統] 排列組合問題
因為找不到分類,所以挑了機統,
第一次在數學版po文,有錯麻煩跟我說下~~
這題我和室友都想不出來,
他說我可以來這也許能解決我的問題~~
consider the following procedure for determine whether a
given name appears in an alphabetized list of n names.
Step1: Choose the name at the middle of the list.
(if n=2k, choose the kth name); if that is the given name, you are done.
if the list is only one namelong, you are done.
if you are not done, go to step 2.
Setp2: If the given name comes alphabetically before the name at the
middle of the list, apply Step1 to the first half of the list.
Otherwise, apply Step 1 to the second half of the list.
If n is very large, the maximum number of steps required by this procedure
is close to lo _____
Ans: log(n), 以2為底
感謝大家!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 108.3.154.49
推
11/10 00:52, , 1F
11/10 00:52, 1F
→
11/10 00:54, , 2F
11/10 00:54, 2F
討論串 (同標題文章)