0
$\begingroup$

Looking for a way to generate random mathematical equations that equal an integer between 0 and 9, a way to rank the complexity of the equation rendered, and a method to note the mathematical concepts utilized within the equation.

My first guess is that a random integer between 0 and 9 would be selected. After that, your guess is much more likely to be better than mine.

EDIT: To be more clear, solutions should ONLY result in the following: 0,1,2,3,4,5,6,7,8,9.

  • 0
    @blunders: that's also not clear for me what do you want and I wondering the same as Gerry. Either you elaborate on this or I vote to close the question.2011-06-11

2 Answers 2

2

I am still not sure what do you want, but I guess you are talking about roots. Ok, lets consider a class of linear equations. They have only two parameters: $ax+b = 0$. Choosing randomly $\hat{x} = 0,1,...,9$ you have a condition on $a$ and $b$: $a\hat{x}+b = 0$. for this class you can only randomly choose one of the variables (preferably, $b$ not to make $a$ equal to zero).

Example. $x = 2$, then $2a+b = 0$. You make $b = rand(0,100)$ and $a = -0.5 b$. then the solution will be $x=2$ as it was desired.

You can also consider another class - but note that you would like to have a unique solution. Say, for quadratic equation you may want to say "find the positive root of an equation". Then algorithm is the following: choose $\hat{x} = 0,1,...,9$ and x' to be a negative number (preferably integer also). Then any equation of the form a(x-\hat{x})(x-x') = 0 has desired roots. For this equation you can choose independently $a$ (any) and x' (negative). To make it more tough, open the brackets after the choice of all parameters.

Example. We choose again $\hat{x} = 2$ and $a = rand(0,12)$ and x' = -rand(0,100). then we have an equation ax^2 - (2+x')x + 2x' = 0.

  • 0
    @blunders: I will not confirm it. This statement doesn't make sense to what I've written2011-06-11
1

Pick a positive integer n between 0 and 4 and a positive integer p between 1 and 5. Add r instances of (y+(-y)) to n+p, where r indicates a random positive integer, in other words (n+p)+(y_1+(-y)_1)+...+(y_r+(-y)_r). The complexity of the equation compared to other equations of the same type comes as the value equal to r. One could also select 4 positive integers between 0 and 2, or 5 positive integers two of which lie between 0 and 2 and three of which lie between 0 and 1, and many other possibilities exist. The partitions of 9 here work similarly.

  • 0
    +1 @Doug Spoonwood: complexity was meant to be the inclusion o$f$ concepts such as: addition, subtraction, division, multiplication, roots, fractions, powers, Decimals, percentages, etc. until as many concepts had been used that would not result in getting an answer that would not equal [0-9]. That said, your idea was creative, addressed two of the three parts of the question as far as I'm able to tell - though, to me, incremental redundant patterns produce volume, not complexity. As very possible I've misunderstood your answer, either way thank you!2011-06-11