Fitting a simple polynomial to different possibilites

33 Views Asked by At

I have a few sets of numbers. For example, let's say my sets are -

1,5,8,12,25

2,14,36,45,47

5,9,17,55,80

29,37,64,93,102

48,69,77,86,167

Given these sets, I want to fit a polynomial such that when x=1, at least one of the 5 elements in my first row is the result. When x=2, at least one of the elements in my second row should be the result and so on.

So when x goes from 1->5, the result of the polynomial should for each x should satisfy at least one element from the corresponding row.

The polynomial I am looking for should be of an order much smaller than the number of data sets.

A brute force method to try all possibilites is difficult and very computation intensive.