A line can be defined by picking two points. If the original two points are somehow get forgotten, picking any two points from the line will define the same line.
The thing applies to linear functions too, so f(x)=ax+b can be defined by picking two arbitrary x coordinates and specifying what value the function should provide for those x-s.
If some evil entity comes with points (3,-11) and (4,-74), laughing that the important values would be at x=1 and x=2, we can just write the general f(x)=ax+b as

f(3)=a*3+b=-11
f(4)=a*4+b=-74

and solve the two equations for getting a and b:

a*3+b=-11 => b=-11-a*3
a*4+b=-74 => a*4+(-11-a*3)=-74 => a=-63
b=-11-a*3 => b=-11-(-63*3)=178

=> f(x)=-63*x+178

Then we could quickly calculate the values for x=1 and x=2 if we ever wanted to.
Actually this f(x)=ax+b thing is one of the simplest polynomial functions, a 1st degree one (This degree thing comes from the highest power of the variable x used in the expression, x is x^1, just it is rarely written out). Generally an nth degree polynomial function can be defined by picking n+1 points, this has been used above (1st degree, 2 points).
So if a completely independent evil entity says (6,39), (7,-34) and (8,-131) define a parabola, but the interesting values are at x=3,4,5, the thing is still manageable, just f(x)=a*x^2+b*x+c now, so there are 3 parameters to find and there will be 3 equations to solve

f(6)=a*36+b*6+c=39
f(7)=a*49+b*7+c=-34
f(8)=a*64+b*8+c=-131

Expressing c is rather trivial, and it is also beneficial that the evil entity has chosen x coordinates differing in 1 (so working with the b*6,7,8 parts results in simple expressions)

a*36+b*6+c=39 => c=-a*36-b*6+39
a*49+b*7+c=-34 => a*49+b*7+(-a*36-b*6+39)=-34 => a*13+b+39=-34 => b=-a*13-73

  a*64+b*8+c=-131
-(a*49+b*7+c= -34)
------------------
  a*15+b    = -97 => a*15+(-a*13-73)=-97 => a=-12
=> b=12*13-73=83 ; c=12*36-83*6+39=-27

=> f(x)=-12*x^2+83*x-27

And we could quickly calculate the values for x=3,4,5 if we ever wanted to.

Well, here comes the puzzle part: the thing works with

  • 5 points: (-1,-2600), (0,-534), (1,80), (6,-430) and (7,-2382)
  • and a 4th degree polynomial f(x)=a*x^4+b*x^3+c*x^2+d*x+e too

The relevant points are x=1,2,3,4,5 (yes, x=1 is given already :-P)

Some preliminary hints:

  • while 5 equations are 5 equations, x=-1,0,1 points provide rather friendly ones, especially the 0
  • instead of solving the equations, Lagrange interpolation (or Lagrange polynomials) can do the job too (just it is a bit tedious to do on paper, so get a calculator, computer, WolframAlpha, Excel, or some fancy web page)

For verification purposes I can also tell that f(1)+f(2)+f(3)+f(4)+f(5)=474

TL;DR
All of the above makes sense only if you are interested in an armor glove. Just Google Translate it to Hungarian and back to English ;-)


Solutions

The polynomial is f(x)= -341/24*x^4 +2063/12*x^3 -17083/24*x^2 +14017/12*x -534, and the actual giveaway code is Pg7sy. Approximating the fractional part (with some 4-5 decimal digits) should also work well.
The example calculations point to a Cubemen giveaway, s4rqX, the first two characters come from the line (at x=1,2), and the last three come from the parabola (at x=3,4,5)

9 years ago*

Comment has been collapsed.

Here is a poll for you, without potatoes

View Results
OK
NOT OK

was trying to solve it on paper, but thanks google

9 years ago
Permalink

Comment has been collapsed.

Bump for defeating the Great Wall of Text!

9 years ago
Permalink

Comment has been collapsed.

Oh yes, a returning visitor :-)

9 years ago
Permalink

Comment has been collapsed.

B'dump! Thank you!

9 years ago
Permalink

Comment has been collapsed.

Sign in through Steam to add a comment.