Post Reply 
Math brain teaser
12-27-2013, 05:29 PM (This post was last modified: 12-27-2013 05:32 PM by Han.)
Post: #5
RE: Math brain teaser
(12-27-2013 01:24 PM)Namir Wrote:  We evaluate the polynomial at m1=P(1) and m2=P(m1+1). The value m1 gives us the sum of the polynomial coefficients. We use that value to breakdown the value of m2 into the polynomial coefficients using integer divisions and modulo operators (or equivalent operations). Here is a pseudo code for the solution:

Code:
m1=P(1)
m2=P(m1+1)
N=INT(log(m2)/log(m1))
Dim A(0 to N)
For I = N to 0 Step -1
  K = (m1+1)^I
  A(I) = INT(m2/K)
  m2 = m2 - A(I)*K
Next

P(x) is the polynomial with the given positive integer coefficients evaluated at X. The array A() contains the calculated polynomial coefficients, such that:

P(X,A) = A(0) + A(1)*X + A(2)*X^2 + ... + A(N)*X^N

Hi Namir,

That's an interesting approach! Allow me to make the brain teaser a bit more interesting. Let's suppose now the the computer is a gatekeeper. Due to a time-space anomaly, you have been thrown into the far, far future and are trying to find your way back to your current timeline. The only way to do so is to determine all the coefficients of the polynomial. The computer has a display that is capable of displaying infinite precision integers (and you can see all digits at once), and a keypad with which you may enter your values for evaluation. The catch, however, is that you have no pen, no paper, no calculator (basically nothing with which you may do any sort of calculations except for your own mind) and only a few minutes to answer the riddle to return back to your time, or forever be stuck! Can you devise a new scheme to solve the riddle and get back home?

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Math brain teaser - Han - 12-27-2013, 05:18 AM
RE: Math brain teaser - Les_Koller - 12-27-2013, 05:54 AM
RE: Math brain teaser - Les_Koller - 12-27-2013, 07:41 AM
RE: Math brain teaser - Namir - 12-27-2013, 01:24 PM
RE: Math brain teaser - Han - 12-27-2013 05:29 PM
RE: Math brain teaser - Thomas Klemm - 12-27-2013, 05:56 PM
RE: Math brain teaser - Han - 12-27-2013, 06:13 PM
RE: Math brain teaser - Namir - 12-27-2013, 10:02 PM
RE: Math brain teaser - Paul Dale - 12-27-2013, 10:52 PM
RE: Math brain teaser - Thomas Klemm - 12-28-2013, 11:20 AM
RE: Math brain teaser - Han - 12-27-2013, 11:00 PM
RE: Math brain teaser - Les_Koller - 12-28-2013, 02:03 AM
RE: Math brain teaser - Paul Dale - 12-28-2013, 02:45 AM
RE: Math brain teaser - walter b - 12-28-2013, 04:31 AM
RE: Math brain teaser - Thomas Klemm - 12-28-2013, 11:11 AM
RE: Math brain teaser - walter b - 12-28-2013, 12:17 PM
RE: Math brain teaser - Thomas Klemm - 12-28-2013, 12:55 PM
RE: Math brain teaser - Paul Dale - 12-28-2013, 11:58 AM
RE: Math brain teaser - Les_Koller - 12-28-2013, 09:21 PM
RE: Math brain teaser - Thomas Klemm - 12-29-2013, 12:10 AM
RE: Math brain teaser - Les_Koller - 12-29-2013, 01:46 AM
RE: Math brain teaser - Thomas Klemm - 12-29-2013, 08:33 AM
RE: Math brain teaser - Les_Koller - 12-29-2013, 01:50 AM
RE: Math brain teaser - Paul Dale - 12-29-2013, 01:54 AM
RE: Math brain teaser - Thomas Klemm - 12-29-2013, 11:25 AM
RE: Math brain teaser - Les_Koller - 12-29-2013, 01:58 AM
RE: Math brain teaser - Les_Koller - 12-29-2013, 05:52 PM



User(s) browsing this thread: 1 Guest(s)