943,774 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 2405
  • Java RSS
Sep 21st, 2007
0

Any algorithm to do Reverse Calculation:-

Expand Post »
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
Similar Threads
jjt
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jjt is offline Offline
12 posts
since Sep 2007
Sep 22nd, 2007
0

Re: Any algorithm to do Reverse Calculation:-

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.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
virtual is offline Offline
5 posts
since Aug 2007
Sep 24th, 2007
0

Re: Any algorithm to do Reverse Calculation:-

Could you kindly give me some samples?
jjt
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jjt is offline Offline
12 posts
since Sep 2007
Sep 24th, 2007
0

Re: Any algorithm to do Reverse Calculation:-

You need to look into optimization.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 839
Posting Genius
Ezzaral is offline Offline
6,761 posts
since May 2007
Sep 24th, 2007
1

Re: Any algorithm to do Reverse Calculation:-

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.
Reputation Points: 46
Solved Threads: 11
Junior Poster
orko is offline Offline
164 posts
since Apr 2006
Sep 24th, 2007
0

Re: Any algorithm to do Reverse Calculation:-

If your relationships merely consist of "+-/x" then this is definitely possible. However, anything more complicated would make it difficult.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: wanted project titles
Next Thread in Java Forum Timeline: Java code to compare XML files





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC