| | |
Any algorithm to do Reverse Calculation:-
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Sep 2007
Posts: 12
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: Aug 2007
Posts: 5
Reputation:
Solved Threads: 1
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.
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.
•
•
Join Date: Apr 2006
Posts: 164
Reputation:
Solved Threads: 10
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.
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.
A Perfect World
![]() |
Similar Threads
- Time complexity of algorithm (Computer Science)
- round robin algorithm (Computer Science)
- Pointers (archived tutorial) (C++)
- Need help writing my own reverse iterator class (C++)
- recursive algorithm (C++)
- how to reverse link list using recurtion (C)
- Pointers (C++)
- Round Robin Algorithm Simulation (C++)
- Reversive Array/Integer (C)
- Algorithm for checking contiguous blocks (C)
Other Threads in the Java Forum
- Previous Thread: wanted project titles
- Next Thread: Java code to compare XML files
Views: 1657 | Replies: 5
| Thread Tools | Search this Thread |
Tag cloud for Java
911 addressbook android api append apple applet application arguments array arrays automation binary bluetooth character chat class classes client code component csv database draw eclipse error event exception file fractal ftp game givemetehcodez graphics gui helpwithhomework html ide image input integer j2me japplet java javaarraylist javaprojects jmf jni jpanel julia linked linux list loop map method methods mobile netbeans newbie number object objects oracle oriented panel print printf problem program programming project projects recursion replaydirector reporting researchinmotion return robot rotatetext scanner screen se server set size sms socket sort sql stream string swing test threads time transfer tree ubuntu windows






