Hi all , I figure this is an inteersting (yet weird in my opinion) question: Ralph likes 25 but not 24; he likes 400 but not 300; he likes 144 but not 145. Which does he like: a)10 b)50 c)124 d)200 e)1600 Any ideas ?

You are watching: Ralph likes 25 but not 24 he likes 400 but not 300 he likes 144 but not 145. which does he like

posted 9 years ago

lowercase baba

posted 9 years ago

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors

See more: If The Denominator Is 0 Is It Undefined, Division By Zero

Ryan, much like Ralph, likes 25 but not 24, and he likes 144 but not 145. However, unlike his friend Ralph, Ryan likes 300 but not 400. Which one (and only one) of the following does he like? a) 37 b) 64 c) 200 d) 1024 e) 65535 (…and why?)

This reasoning might be non sense . even though would like to give a try : here is my Observation : Lets consider 1 to 10* Ralphs like: 25 => 2+5 = 7 odd number 144 => 1+4+4 = 9 odd number 300 => 3+0+0 = 3 odd number Ralph”s dislike: 24 => 2+4 = 6 even 145 = > 1+4+5 = 10 even 400 => 4+0+0 = 4 even Options: 37 => 3+7 = 10 even 64 => 6+4 = 10 even 200 => 2+0+0 = 2 even 1024 => 1+0+2+4 = 7 odd 65535 => 6+5+5+3+5 => 11+8+5 => 19+5 => 2+4 => 6 even So my guess would be 1024 .

Given the information presented so far, that seems like a perfectly reasonable explanation, Seetharaman. You even came up with the correct answer (where “correct” is defined as “what I was thinking”), but for a different reason. We already know that 25, 144, 300 and 1024 are “likable” but 24, 145, 400, 37, 64, 200 and 65535 are “unlikable”. However, I”m going to declare that 8889 is likable while 97 unlikable. How can that possibly be?

My take is that Ryan likes numbers where the difference of sum of the alternate digits is odd.** Here is my logic – Ryan”s likes: 25 => 5 – 2 = 3Odd**** 144 => (1+4) – 4 = 1Odd**** 300 => (3+0) – 0 = 3Odd**** Ryan”s dislikes: 24 => 4 – 2 = 2Even**** 145 => (1+5) – 4 = 2Even**** 400 => (4+0) – 0 = 4Even**** Also, as already declared, 8889 => (8+9) – (8+8) = 1Odd**** 97 => 9 -7 = 2Even**** So given all the above, the available options are: 37 => 7 – 3 = 4Even**** 64 => 6 – 4 = 2Even**** 200 => (2+0) – 0 = 2Even**** 1024 => (4+0) – (1+2) = 1Odd**** 65535 => (6+5+5) – (3+5) = 8Even**** That leaves 1024 as the only option **

**Anubrato Roy wrote:My take is that Ryan likes numbers where the difference of sum of the alternate digits is odd**.

** I would say that qualifies as “humorously correct”. Yes, I do indeed like 1024. Also, the rule you stated will correctly identify numbers I like versus the ones I don”t like. However, the statement of the rule is more complicated than the one I had in mind. If we know that the difference between two numbers is either even or odd, what can we say about the sum of those same numbers? If two numbers have an even sum, how even numbers did we start with? How many odd? (Addition is associative and commutative.) Is there a simpler rule that is equivalent to the “odd difference of sums of alternate digits” one given above? Hi Ryan, It was amusing to realize that I have stated the rule in a complicated manner. Taking your hint, if the difference of 2 numbers is odd, then one of them is even and the other odd – which implies that their sum is also odd. That combined with my logic simply means that the sum of all the digits in the number must be odd. So here is the revised version – You like numbers where the sum of digits of the numbers is Odd**.

**That makes me realize that this is almost identical to Seetharaman”s logic, except that I stop only at the first pass of summing up the digits; and not summing up the digits of the sum itself. Regards, Anubrato**

**Anubrato Roy wrote: So here is the revised version – You like numbers where the sum of digits of the numbers is Odd**. ** **

As it turns out, that”s correct as well as now being relatively succinct. What I really like about the “likable” numbers is that they have an odd number of odd digits. …which turns out to be equivalent to liking numbers where the sum of digits is odd.

## Discussion about this post