2
$\begingroup$

Is there a way to transform $\{1, 2, 3, 4, 5,6, 7, 8\}$ to $\{8,7,6,5,4,3,2,1\}$ by applying a single function? That is, transform $1$ to $8$, $2$ to $7$, $3$ to $6$ etc.

  • 1
    I$f$ you want to learn a general method to find any function of this sort have a look at this article: http://en.wikipedia.org/wiki/Lagrange_polynomial2012-07-18

1 Answers 1

5

$f(x) = 9 - x$

$f(1) = 9 - 1= 8$

$f(3) = 9 - 3 = 6$

etc.