I was trapped by this and guessed it was exponential series n^1,n^2 etc for n starting at greater than 2. While technically true this was not the rule they had in mind.
A Quick Puzzle to Test Your Problem Solving
261–270 of 311 posts
Re: A Quick Puzzle to Test Your Problem Solving
#262I'm curious to see more about the distribution of questions and answers people had, and how the HN population may differ from the NYT's. There will certainly be self selection bias here, but if you're willing to share how you did with others, please enter it here: https://docs.google.com/forms/d/17e5BIL0lH8OHsGj89Zdtdl8GeCV... The result summary is visible here: https://docs.google.com/forms/d/17e5BIL0lH8OHsGj89Zdtdl…
If anyone's tallying
Re: A Quick Puzzle to Test Your Problem Solving
#263I'm curious to see more about the distribution of questions and answers people had, and how the HN population may differ from the NYT's. There will certainly be self selection bias here, but if you're willing to share how you did with others, please enter it here: https://docs.google.com/forms/d/17e5BIL0lH8OHsGj89Zdtdl8GeCV... The result summary is visible here: https://docs.google.com/forms/d/17e5BIL0lH8OHsGj89Zdtdl…
If anyone's tallying
Re: A Quick Puzzle to Test Your Problem Solving
#264Earlier quoted context omitted.
That's exactly what I was thinking. I (sometimes) follow TDD, and I applied it to this problem. I made sure to include negatives, 0, positives, and include primes here or there to help avoid issues with multiplication/exponentiation. After a few of these, I felt pretty confident that the rule was simple.
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
#265My mathematical logic is rusty, but if I recall correctly, Gödel's incompleteness theorem basically states that it is impossible to solve this kind of question. No matter how many tests you run, there will always be an uncertainty. An incredibly stupid example is that the rule could be "yes for strictly increasing, OR if one of the numbers is -18273192783127897981." You'll never know. I understand this is contrived,…
Remotely related: I've been interested for awhile in how the same initial terms of a sequence could possibly be generated by multiple rules. For example, you might have 2,3... And the rest of the sequence might look like either 2,3,4,5,6... or 2,3,5,8,13... or 2,3,5,7,11... or even 2,3,5,10,20... Clearly, on some level those sequences are all much less complicated than one defined as "The first term is 2, the second…
Choose a programming language. Choose a sequence prefix (in your example: 2, 3). Then consider all the programs that accept n as input and output a sequence of n numbers, such that the first numbers are always 2, 3. Now take the shortest of those programs. The sequence it produces is the "simplest".
If this sounds tedious to code, you could easily outsource via Odesk or something.
Re: A Quick Puzzle to Test Your Problem Solving
#266I'm curious to see more about the distribution of questions and answers people had, and how the HN population may differ from the NYT's. There will certainly be self selection bias here, but if you're willing to share how you did with others, please enter it here: https://docs.google.com/forms/d/17e5BIL0lH8OHsGj89Zdtdl8GeCV... The result summary is visible here: https://docs.google.com/forms/d/17e5BIL0lH8OHsGj89Zdtdl…
People familiar with unit testing and test driven development will feel at home with this kind of puzzle. That doesn't mean that they will be less biased in social/political decisions, it just means that this test will fail to prove a point.
Re: A Quick Puzzle to Test Your Problem Solving
#267It responds "No" to (10000000000000000, 10000000000000001, 10000000000000002) so the rule is not so simple after all :)
Good old IEEE 64bit floating point numbers =) That also means that for(i=0;i<j;++i){} doesn't necessarily terminate for an arbitrary j smaller than infinity, which I find hilarious.
Re: A Quick Puzzle to Test Your Problem Solving
#268I'm curious to see more about the distribution of questions and answers people had, and how the HN population may differ from the NYT's. There will certainly be self selection bias here, but if you're willing to share how you did with others, please enter it here: https://docs.google.com/forms/d/17e5BIL0lH8OHsGj89Zdtdl8GeCV... The result summary is visible here: https://docs.google.com/forms/d/17e5BIL0lH8OHsGj89Zdtdl…
Could you perhaps move to a bar chart instead of pie charts?
Re: A Quick Puzzle to Test Your Problem Solving
#269Earlier quoted context omitted.
Similar to mine, but we both actually failed. Real numbers are accepted and we did not test that.
It accepts floating point numbers. To approximately double precision. But it accepts zero percent of real numbers.
To talk about a certain fraction of real numbers you have to have a distribution over them. In general we take the uniform distribution if no distribution is explicitly given. That doesn't work for real numbers (it doesn't even work for natural numbers). (See https://math.stackexchange.com/questions/14777/why-isnt-ther...)
If there's no implicit default distribution, we have to pick on. I can pick one where they cover an arbitrary high percentage of real numbers..
Re: A Quick Puzzle to Test Your Problem Solving
#270Earlier quoted context omitted.
Good old IEEE 64bit floating point numbers =) That also means that for(i=0;i<j;++i){} doesn't necessarily terminate for an arbitrary j smaller than infinity, which I find hilarious.
I'd prefer an example along the lines of: for(i = j; i With your example it's easy to lose the distinction between "would eventually terminate if you had a fast computer and a lot of time" and "never terminates even in theory." Here, it definitely looks like it should always run two iterations to matter what the numbers are (as long as they're finite), but it doesn't. Either way, though, it is definitely hilarious!