3 ms·
Ask HN: Can you work this out? What do you think of the puzzle?
I recently asked a question on Twitter and Mastodon and have had some interesting responses. I'd very much like to ask this particular community ...
Choose a polynomial p(x) with non-negative integer coefficients. Now choose an integer x that's larger than all the coefficients and evaluate p(x). You tell me x and p(x), and I tell you the polynomial.
So ...
Do you find this interesting? Can you work out how to do it?
Please don't give it away - by all means make it clear that you know how to do it (if you do!) but please don't spoil it for the others.
But mostly I'm interested in knowing (eventually) how you think about it.
I look forward to your answers (assuming there are any ...)
- gus_massa 8y agoNo spoiler version: Ok, nice. Are you going to ask again in the future for solutions?
- ColinWright 8y agoI might - currently it doesn't seem to be getting any attention, so it's not clear that anyone cares. I'll see if there's more discussion. Added in edit ... I now have two distinct solutions (obviously related) and a few different ways of expressing what they are. But the lack of activity here means there's little point in coming and asking for solutions. I will be blogging about it in a while.
- bufferoverflow 8y ago(del)
- ColinWright 8y agoSure I can, because x has to be bigger than all the coefficients, eliminating both options. In fact you can't use x=1 unless your polynomial is exactly 0. (For those wondering what happened, it's really easy to mis-read the conditions - lots of people do.)
- bufferoverflow 8y agoYou're right.
- bufferoverflow 8y agox = 1, p(x) -> 1 p(x) = 0.3x + 0.7x² p(x) = 0.5x + 0.5x²
- ColinWright 8y agoCoefficients have to be non-negative integers.
- bufferoverflow 8y agoYour text doesn't mention integers.
- ColinWright 8y agoDamn. That might be a typo - stand by. (pause) You were right, that was a typo, I've edited it to insert the missing word. Thank you for finding that error. I've also changed it to say that x has to be an integer.
- jonsen 8y agoIt's Diophantastic interesting. Yes, I think I can work it out. Might take some time...