0

So I'm making a program (and I know, this isn't stack overflow) but I need help on ONE algorithm in order to finish it for good. Here's the pattern I'm dealing with:

When $x = 8, f(x) = 1$

When $x = 10, f(x) = 4$

When $x = 13, f(x) = 8$

This is hard to explain, but I need to figure out the pattern that $f(x)$ is going based off the 3 given $x$ values.

Would I be able to find an equation based off this information? Or is it too little information provided?

Akira
  • 17,367
  • Without any further information, we cannot deduce what $f(x)$ equals for other values of $x$. What is the context of this? – Minus One-Twelfth Feb 15 '19 at 06:01
  • There are any number of possible answers, here is one:$$f(x)=\lfloor\tfrac x8\rfloor+3\lfloor\tfrac x{10}\rfloor+4\lfloor\tfrac x{13}\rfloor\ .$$ – David Feb 15 '19 at 06:03
  • 1
    If you can provide more data points, I could work (at least, I could try). – Claude Leibovici Feb 15 '19 at 06:05
  • You do realise that there are infinitely many functions that fulfill these conditions, right? – Matti P. Feb 15 '19 at 06:09
  • ... for example, the polynomial $$ f(x) = -\frac{1}{30}x^2 + \frac{21}{10}x - \frac{41}{3} $$ It looks ugly, but goes exactly through those points. – Matti P. Feb 15 '19 at 06:20
  • Also, an arc of a circle $f(x)=-\tfrac{81}2+\tfrac12\sqrt{-4x^2+588x+2441}$. – g.kov Feb 15 '19 at 07:11
  • I should probably add: this is for a program, so preferably the SIMPLEST equation would work. And no, sorry. These are all the data points I'm given. Is it impossible? – CurlyFry Feb 15 '19 at 19:14
  • Then it is obviously $f(x) = \begin{cases}1, x=8\4, x=10\8,x=13 \end{cases}$ – Sudix Feb 16 '19 at 03:16

0 Answers0