Solve Physics exercise by brute force approach..

Posted by Nils on Stack Overflow See other posts from Stack Overflow or by Nils
Published on 2010-06-02T20:13:01Z Indexed on 2010/06/02 20:24 UTC
Read the original article Hit count: 129

Filed under:
|

Being unable to reproduce a given result. (either because it's wrong or because I was doing something wrong) I was asking myself if it would be easy to just write a small program which takes all the constants and given number and permutes it with a possible operators (* / - + exp(..)) etc) until the result is found.

Permutations of n distinct objects with repetition allowed is n^r. At least as long as r is small I think you should be able to do this. I wonder if anybody did something similar here..

© Stack Overflow or respective owner

Related posts about homework

Related posts about math