News for hackers. Stuff that matters.
Re:A Quick Puzzle to Test Your Problem Solving by joezydeco on Thursday July 02, 2015 @01:25PM (#9820279)
Did you try floating point numbers? I didn't see anything in the text that said integers only.
Re:A Quick Puzzle to Test Your Problem Solving by tptacek on Thursday July 02, 2015 @03:23PM (#9821015)
I tried floating point numbers. Also, at 28 decimal places, the test breaks; it's not arbitrary precision. So, technically, the answer isn't simply "any ascending sequence of numbers".
Re:A Quick Puzzle to Test Your Problem Solving by SiVal on Thursday July 02, 2015 @04:34PM (#9821434)
I actually avoided going that far to avoid getting bad data. I was trying to answer the question, "What does the experimenter THINK his rule is?" rather than what will the computer do. Since the computer can't be infinite, it will inevitably fail with overflow, underflow, and such.

I was relieved, in fact, when it worked with negatives and floats in a "safe" range.

I also tested with 1,1,2 and 1,2,2 to make sure that the required increase applied to ALL of the values, not just a specific pair.

Re:A Quick Puzzle to Test Your Problem Solving by mjevans on Thursday July 02, 2015 @05:56PM (#9821977)
I too tried to test if it was only one pair that was significant. However I grew impatient and didn't try to come up with more tests when I thought I had a sufficient answer to explain my most vexing observation (negative, positive, positive out of combinations involving negative numbers).

The observation to brainstorm for ways of proving that a statement is in fact wrong, and exhausting them, is such an eloquent way of wording the hunt for a negative.

Re:A Quick Puzzle to Test Your Problem Solving by facetube on Thursday July 02, 2015 @09:01PM (#9822770)
The slightly-shorter 0.60000000000000000, 0.60000000000000001, 0.60000000000000002 will break it too, for what it's worth. If you punch those in to a Javascript console, you can see that the FP representation of all three is 0.6.
Re:A Quick Puzzle to Test Your Problem Solving by _asummers on Sunday July 05, 2015 @04:14PM (#9834749)
0.20000000000000000, 0.20000000000000001, 0.20000000000000002 also work.
Re:A Quick Puzzle to Test Your Problem Solving by joezydeco on Thursday July 02, 2015 @05:26PM (#9821767)
Hah! Nice catch.
Re:A Quick Puzzle to Test Your Problem Solving by tptacek on Thursday July 02, 2015 @05:34PM (#9821826)
Pentester. :)
Re:A Quick Puzzle to Test Your Problem Solving by jrapdx3 on Thursday July 02, 2015 @03:50PM (#9821181)
Yes I did, though not to 28 places as tptacek had done. With 2 to 4 place floats, including negatives, the test worked as expected.

Like others here have said it wasn't a particularly hard "rule" to figure out. Easy to immediately rule out geometric relationship as in 2^y, which didn't leave a whole lot of possibilities to test. For the commenters here, I'd attribute ease of finding the solution to familiarity with the kinds of problems that programming presents.

Which leads to the idea there's value in learning even the rudiments of programming. Logically, it should encourage better problem-solving skills in general. We might think there this has important implications for our educational systems. But I know, that's probably not realistic at all.

Re:A Quick Puzzle to Test Your Problem Solving by johnsonjo on Thursday July 02, 2015 @11:35PM (#9823286)
I know the question isn't directed at me, but I thought you might want to know. I couldn't try negatives or floating point on the iPhone. The keypad didn't have the option.