954,541 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Any algorithm to do Reverse Calculation:-

I was wondering is there any algorithm, method, concept, idea for "Reverse Calculation"?
Basically I provide an output/Answer , and 1 or more inputs, then it will result the math formula/pattern.
For example 1:
I provide, Dynamic Output: 30;
I provide, Dynamic Input Value A: 2
I provide, Dynamic Input Value B: 3
I get, Result: 5 x 2 x 3 = 30

For example 2 :
I provide, Dynamic Output: 140;
I provide, Dynamic Input Value A: 4
I provide, Dynamic Input Value B: 7
I get, Result: 5 x 4 x 7 = 140

Based on Example 1 and Example 2, the formula I am looking for is:
5 x [Dynamic Input Value] x [Dynamic Input Value] x [Dynamic Output Value]
5 x A x B = C
5AB = C
5=C/AB
Thus the formula I need is "C/AB".
Is there any A.I algorithmic solution for this?

JJ

jjt
Newbie Poster
12 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

Just from the top of my head, I have to suggest that for the general case there is no (known to humankind) answer. That is, if the problem is, there is a relationship of the form

answer = (function of) input variables

(sorry that I can't do proper math representations here)

and you want to be able to observe some collection of answers and variables and use those to derive an answer for 'function'.

i) You will have noted that in cryptography, one of the points of trapdoor functions is, in the general case, that you can't even take 'answer' and 'function' and work out what the input variables had been. This alone makes it seem unlikely that a general solution for your problem can be ever found.

ii) If you could constrain 'function' to be linear, there would be a possibility of a solution, but the number of data points would be arbitrarily large. That is, if the only constraint that you fave is that 'function' is linear, you would need infinity plus one points in order to achieve a solution.

iii) If you could constrain the function further, there would be a theoretical possibility, but you would have to clarify what functions were possible.

virtual
Newbie Poster
5 posts since Aug 2007
Reputation Points: 10
Solved Threads: 1
 

Could you kindly give me some samples?

jjt
Newbie Poster
12 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

You need to look into optimization .

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

I believe this is possible. Similar functionality I have seen in microsoft excel program. If you give a set of data, it can generates the relation.
If I had to solve this problem I would consider on few matters. What kind of relationships I can get (it is not possible to get all kind of relation) In that case you may need to make your program flexible to closer relations. If you are really good in graphs, you can get these things done easily.

orko
Junior Poster
164 posts since Apr 2006
Reputation Points: 46
Solved Threads: 11
 

If your relationships merely consist of "+-/x" then this is definitely possible. However, anything more complicated would make it difficult.

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You