Saturday, 28 September 2013

How to generate a function that will algebraically encode a sequence?

How to generate a function that will algebraically encode a sequence?

Is there any way to generate a function F that, given a sequence, such as:
seq = [1 2 4 3 0 5 4 2 6]
Then F(seq) will return a function that generates that sequence? That is,
F(seq)(0) = 1
F(seq)(1) = 2
F(seq)(2) = 4
... and so on
Also, if it is, what is the function of lowest complexity that does so,
and what is the complexity of the generated functions?
EDIT It seems like I'm not clear, so I'll try to exemplify:
F(seq([1 3 5 7 9])}
# returns something like:
F(x) = 1 + 2*x
# limited to the domain x ¸ [1 2 3 4 5]
In other words, I want to compute a function that can be used to
algebraically, using mathematical functions such as +, *, etc, restore a
sequence of integers, even if you cleaned it from memory. I don't know if
it is possible, but, as one could easily code an approximation for such
function for trivial cases, I'm wondering how far it goes and if there is
some actual research concerning that.
EDIT 2 Answering another question, I'm only interested in sequences of
integers - if that is important.
Please let me know if it is still not clear!

No comments:

Post a Comment