# What's the rule?

Status
Not open for further replies.

#### lespaul

##### Programmer
Here's an interesting one:

Now I usually can figure out how these "read your mind" programs work, but this one's got me stuck.

I know that when numbers are transposed it's a multiple of nine, and I figure that must be part of it, but I can't seem to put it all together.

Anybody interested in putting together the code to solve this? Or know the math rules that are being utilized?

les

It seems to be 9 - ((sum of typed in digits) mod 9)

Looks like casting out 9's to me.

Total the digits in the remainder (except the circled one), then do a mod9. Take this and subtract it from 9, and that is the circled digit.

Circled digit = 9 - mod9(sum of digits in remaider less circled digit).

mmerlinn

"Political correctness is the BADGE of a COWARD!"

100a + 10b + c

The transposition and subtract operation will give you

(0 OR 90a OR 99a) + (-90b OR 0 OR 9b) + (-99c OR -9c OR 0)

Whichever value is in each of those brackets it's gonna be a multiple of 9, it's also gonna be positive as we always take the smaller from the bigger.

In all multiples of 9, the digits will add up to a multiple of 9. So if we take a digit out and add up the rest, the missing one must be whatever's needed to take us up to the next multiple of 9.

The only problem is, if we take a digit out and the remaining ones still add up to a multiple of 9, the missing digit could be either 0 or 9. That's why he won't let you circle a 0.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd

Status
Not open for further replies.

Replies
25
Views
192
Replies
19
Views
111
Replies
13
Views
69
Replies
6
Views
70
Replies
21
Views
66