# Need formula help to calculate the edge of a range / unknown number.

• Apr 13th 2012, 02:29 AM
HughJars
Need formula help to calculate the edge of a range / unknown number.
Hi, first post, as I'm at a total loss with this. I'm sure I'm missing something obvious but can't get my head round it. Hopefully someone here will.

We have an unknown number between 1 and 999, which we'll call x

x falls midway within a range of 100

I am allowed to make a guess at x, after which I get an indication of how close I am ranging from -3 through to +3 including 0. If my feedback is zero, I am within the range of 100.

I need to work out a formula, to calculate my next guess, to calculate one edge of the range in as few attempts as possible. eg guess = 341, feedback = +1. Guess 340, feedback = 0.

I think this revolves around some sort of iteration formula, but am needing help on this one.

Many Thanks
• Apr 13th 2012, 04:33 AM
ragnar
Re: Need formula help to calculate the edge of a range / unknown number.
I don't understand the setup. Is there a precise statement about what this "indication" from -3 to 3 means? You say that, if the feedback is 0 then your guess is within a range of 100 (presumably meaning that your guess is at most 49 units away from the true value). What would a value of +1 mean? That you're 50 units away? What would you get for feedback if you're 200 units away? Would that just register as a +3 or something?

Also, does this mean that x could be 1 and therefore if you guess 0 (even though 0 is not a possible value of x) the feedback would be 0?
• Apr 13th 2012, 04:48 AM
HughJars
Re: Need formula help to calculate the edge of a range / unknown number.