# Guessing two secret numbers

I thought of two secret numbers $$A$$ and $$B$$ that are between $$1$$ and $$10$$ inclusive. Each turn you can provide me with your guesses $$A'$$ and $$B'$$ and I will tell you the sum of the absolute differences, ie. $$|A-A'|+|B-B'|$$. I will also tell you once your guesses are correct: $$A'=A$$ and $$B'=B$$. What is the least number of turns needed for you to guarantee to guess the two secret numbers in the worst case?

3 turns

Guess 0 and 0 first. Since numbers are between 1 and 10, so this will give you the value of A + B.
Guess 0 and 10 next. This gives you A + 10 - B. Then solve the two equations to get both secret numbers and guess them in your next turn.

• rot13 (Vfa'g gung 3 thrffrf? Svefg thrff vf (0, 0), frpbaq thrff vf (0, 10), guveq thrff vf gur nafjre) Jan 22, 2023 at 23:11
• @ApexPolenta: Is it really a “guess” if it’s the answer? Jan 23, 2023 at 3:01
• @PierrePaquette the question asks how many guesses you need in order to guarantee to guess the values, so you do need the correct values to be one of your "guesses". Jan 23, 2023 at 16:11
• @EspeciallyLime fair, updated. Jan 23, 2023 at 16:29