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

As someone who takes pride in having solved the first 100 problems of project Euler, I am slightly ashamed to admit that I probably spent as much time as your daughter to solve that.

I got stuck thinking in integers, and quite quickly left the exercise as an oversight in writing the post (since X + y = even, X - y = odd is impossible for integers)

3 seconds into the first coffee of the day the realisation of my stupidity hit me in the face.



It's impossible until it's easy, like any good trick question.


For the posterity: {a+b=10;a-b=1} translates to {a+b=10;a=b +1}, thus the first equation is ((b+1)+b=10) giving (b=4.5), and from there we get (a=5.5).


Another fun way: add the two equations to get 2A=11 and subtract to get 2B=9.


I mean, is there any other solution? There are certainly no integral solutions to the problem, but there is a unique (rational) solution.

I feel like I’m missing something entirely, though...


I was also stuck thinking in integers for a few seconds, perhaps because of the context. But yeah, a 10-year-old would already know about fractions.


I also mentally started thinking about integral solutions. I wonder if it's also because of the variable names... a,b,c tend to be used to represent integers (e.g. Fermat's Last Theorem, Euclid's algorithm etc).

x and y are more commmonly used to represent real numbers.


Random aside: once in high school I took a math puzzle test. The only problem I skipped was because they asked for "integral solutions." I knew the word "integral" only as belonging to calculus, about which I knew nearly nothing at the time. If I had realized in context it just meant "integer" I could have done it!


They did make it a tricky question!


Thanks for pointing that out. I'll use X and Y next time I share this story. Of course my daughter wouldn't have known at the time about the distinction, and neither did I - it having been too long since doing algebra ;)




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

Search: