[SOLVED] Predicting numbers

Hi Everyone,

This question is for the math geniuses out there...

Say I've got some numbers that when put through a machine produce another set of numbers ...

Example:

1112224444 yields 9876

2223334444 yields 3456

And I have hundreds of actual what went in and what came out ....

Is there a way for me to figure out the mathematical formula being used to produce the resulting numbers based on my long list of actual numbers?

I'm basically trying to discover the algorithm used by the machine to produce the resulting numbers...