[問題] 猜數字要幾次才猜的到?

看板puzzle (益智遊戲 - 數獨,拼圖,推理,西洋棋)作者 (貓)時間15年前 (2011/01/09 17:57), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
Let n be a positive integer, and x an unknown non-negative integer less than n. Suppose you may ask questions of the form "Is x less than t?", where t is an arbitrary integer, but the answer to each question will be told only after you ask another question (i. e., the answers are delayed by one question; note that the last question will not be answered at all). How large may n be so that you can still guarantee to determine x with only 30 questions? 令N為一正整數, x是一比n小的非負整數. 假設你可以提問如" x是否比t小?" 這種類型的問題 , t是多少由你自己決定. 但是對方的回答會在你問下一問題之後回答----也就是回答會"延遲"一題才答出 (也就是說 你問的最後一個問題根本就不會被回答XD) 那麼假如你問30個問題就保證可以知道x是多少,n的最大值是多少? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.166.106.13
文章代碼(AID): #1DAOQ2Zu (puzzle)
文章代碼(AID): #1DAOQ2Zu (puzzle)