Finding a function to convert arbitrary input to output

Click For Summary

Discussion Overview

The discussion revolves around finding a function that can convert arbitrary input values to specified output values. Participants explore methods for deriving such functions, including both manual techniques and potential software solutions. The scope includes theoretical approaches, computational techniques, and considerations of function complexity.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks a program that can automatically generate a function from arbitrary input to output, mentioning genetic programming as a potential method.
  • Another participant suggests various techniques, including matrix reduction for linear solutions, Lagrange interpolating polynomials for closed form answers, and consulting Sloane's OEIS for possible functions.
  • A participant emphasizes the desire for the shortest function that meets the output requirements, excluding trivial solutions like multiplying by zero.
  • There is a suggestion that genetic programming may not be effective for this problem, proposing instead a tree-searching method with backtracking as a more suitable approach.
  • One participant notes the vast number of possible functions that could produce the desired outputs, describing it as 'more than infinite' and referencing mathematical concepts related to cardinality.

Areas of Agreement / Disagreement

Participants express differing views on the effectiveness of genetic programming for this problem, with some advocating for alternative methods. There is no consensus on a single best approach, and the discussion remains open-ended regarding the techniques and software available for function generation.

Contextual Notes

Participants acknowledge the complexity of the problem and the multitude of potential functions that could satisfy the input-output relationship, highlighting the challenge of finding a concise solution.

Twinbee
Messages
116
Reaction score
0
I have arbitrary input numbers, and an arbitrary output. I want a program to automatically give me a function (various constants and mathematical symbols) to convert from the input to the output. What's the best way of doing this?

Are there any programs to do this for you, perhaps which use genetic programming? Any general techniques and tricks to solve this manually?

Here are two examples. The solution to the second one would be great, but I would prefer a general technique to achieve the conversion for any example.

1, 4 -> 15
2, 2 -> 12
5,1 -> 18

Easy peasy - you just add the first two numbers together, and multiply that by 3. Anyone can do that in their head. But for something like this, it gets much harder:

a=3. b=8. c=1.6 -> 0
a=2 b=1.5 c=3 -> 0
a=1.6666 b=3 c=3 -> 0
a=1.85 b=3.863 c=2.5 -> 0
a=2.1 b=2.445 c=2.4 -> 0
 
Mathematics news on Phys.org
A truly arbitrary function could be the given values at the given points, and 0 elsewhere. There are lots of possibilities. Having said that:

* Put the data in a matrix and reduce it; if there's a linear solution that should find it.
* You may be able to use Lagrange interpolating polynomials to give a closed form answer
* Looking up values in Sloane's OEIS could give an answer
* Really complex functions can be fitted with the techniques in http://citeseer.ist.psu.edu/293266.html
 
Thanks for those. Yes, I've heard before that there are an infinite number of possible functions to create a given output. However, I'm looking for the shortest naturally. In the above case, multiplying by 0, or dividing by infinity would also result in the desired function, but one can exclude those cases.

I'll study the above points you've made in more depth. In the meantime, does anyone know of any software (free or commerical, but preferably cheap) that would use genetic programming or similar to do all of this automatically?
 
Last edited:
I don't imagine genetic programming would be very effective on this problem, since you're looking for exact matches. If you're going to use a standard AI method, tree-searching method with backtracking would probably be better.
 
Twinbee said:
Thanks for those. Yes, I've heard before that there are an infinite number of possible functions to create a given output.

In fact, the number of such functions is two to the power of the continuum. It's 'more than infinite', it's uncountable. It's 'more than uncountable', it's beth_2.

(Not that you care.)
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 13 ·
Replies
13
Views
7K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K