# Machine mathematical reasoning by clever substitutions, How to do with AI

I have three equations that relates five variables {a, b, c, r, s} with a sum and two ratios.

Eq. 1: a = b + c;
Eq. 2: s = b / a;
Eq. 3: r = b / c.


Given two values for any of the five variables I get a solution. But, this is not the automation problem I want to solve.

I can have the solution of variable r by simply knowing s. This is solved by a "human algorithm" as follows.

1. Substitute a of Eq. 1 in Eq. 2.
2. Divide the second term of the new Eq. 2 by the variable c.
3. Replace b/c by the expression of Eq. 3.

That means s = r / (r+1).

The questions is -How can an AI algorithm solve this?, i.e. the machine should recognize that given the variable r she can obtain directly the variable s and do no require another variable.