I have this series of equations and I would like to find a generic formula for S;
When;
p = 0, c = 0 and e = 0, S = 0
p = 0, c = 1 and e = 0, S = 5/7
p = 0, c = 0 and e = 1, S = 1/7
p = 0, c = 1 and e = 1, S = 6/7
p = 1, c = 1 and e = 1, S = 1
p = 1, c = 1 and e = 0, S = 4/7
p = 1, c = 0 and e = 1, S = 3/7
p = 1, c = 0 and e = 0, S = 2/7
I know when solving simultaneous equations that I need to eliminate a variable and substitute but I feel like I have too many equations here.
One can find an infinity of different generic formulas for $S$.
They are $8$ equations. So, arbitrary chose $8$ linear equations made of $8$ different functions of $p,c,e$ (not all linear) with $8$ unknown coefficients for the functions. Solve the system of $8$ linear equations for the coefficients. This give you the generic formula. For each arbitrary choice you get a formula.
For example, with the choice of functions $1,p,c,e,pc,pe,ce,pce$ the generic formula is : $$S=a_1+a_2p+a_3c+a_4e+a_5pc+a_6pe+a_7ce+a_8pce$$
Note : In this example the first function is $1$, that is a constant function. One could have chosen another function. It doesn't matter. With other functions, we would find at the end a different formula but as valid as the formula obtained below.
The system of $8$ equations written on matrix form is : $$\left(\begin{matrix} a_1 \\ a_2 \\ a_3 \\ a_4 \\ a_5 \\ a_6 \\ a_7 \\ a_8 \end{matrix}\right) = \left(\begin{matrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 0 & 1 & 0 \\ 0 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \end{matrix}\right)^{-1} \left(\begin{matrix} 0 \\ 5/7 \\ 1/7 \\ 6/7 \\ 1 \\ 4/7 \\ 3/7 \\ 2/7 \end{matrix}\right) = \left(\begin{matrix} 0 \\ 2/7 \\ 5/7 \\ 1/7 \\ -3/7 \\ 0 \\ 0 \\ 2/7 \end{matrix}\right)$$ This example of formula is : $$S=\frac27 p+\frac57 c+\frac17 e-\frac37 pc+\frac27 pce$$
One understand that with different choice of functions of $p,c,e$ one obtain as many different generic formulas as he want.
This works for all kind of function, even not of polynomial kind as above. For example one could chose functions such as $\sin(p)$ or $\exp(pc)$, etc.