Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>Trust me, you can do this in your head if you know basic high school level math

yeah, i guess it was a mistake to graduate from MIT undergrad and grad school in quant fields, i should have just stuck with high school math

>If I ask you if 123456789 is a prime number, do you complain that it's not fair to make you perform division on such a long number?

you tell me, is 13717421 prime?



The difference between the two is that it’s clear that 123456789 can’t be prime since the sum of the digits is a multiple of 3, which doesn’t even require finding the sum since we know 1+8, 2+7 up to 4+5 are multiples of 3. I can even tell you that 43717421 isn’t prime without having to do a divisibility test on it by looking at the digits, although it is a bit more tedious than the 123456789 field.


the difference between the two is that I removed the factors of 3 from 123456789 to get 13717421. so much for your secret knowledge of a hyperspecific case.


You're still missing the point of these problems, which is to challenge you to come up with a clever proof rather than brute-force the solution.

dhosek understood the assignment by making an argument that 123456789 is composite without relying on explicit division of a 9-digit number, which most people would find rather difficult to do in their heads.

Similarly, the posted link is about tiling a mutilated chessboard with dominos. Tiling problems in general are NP-hard, so clearly this isn't something you can solve in your head _in general_, but the charm of that specific problem is that you _can_ solve it by making an insightful observation to avoid the brute force computations.

Similarly, for the puzzle you complained about: we are asked to find 1/a + 1/b where a × b = 37 and a + b = 18. The general solution is to solve a system of two linear equations which involves solving a quadratic equation, which is possible, but tedious and difficult to keep in your head, but the entire point of the question is that there is a better way to figure out the result.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: