猜數字要幾次才猜的到? - 拼圖

Table of Contents

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的最大值是多少?

--

All Comments