Mathcamp Day 2

By Dror Bar-Natan.

Pensieve Header: Mathcamp Day 2 - Gaussian Elimination.

eqns = {x[1]+x[5]-2 x[9],x[2]-x[5]+x[9]-x[10],x[3]-x[5]+x[9]-x[10],-x[3]+x[8]+x[11]-x[12],-x[2]+x[8]+x[11]-x[12],-x[4]-x[8]+2 x[12],x[13]+x[17]-2 x[21],x[14]-x[17]+x[21]-x[22],x[15]-x[17]+x[21]-x[22],-x[15]+x[20]+x[23]-x[24],-x[14]+x[20]+x[23]-x[24],-x[16]-x[20]+2 x[24],x[25]-x[33]+x[53]-x[57],x[26]-x[34]-x[53]+x[57],x[27]-x[29]-x[31]+x[33]+x[55]-x[58],-x[27]+x[35]+x[56]-x[60],-x[26]+x[30]+x[32]-x[36]-x[54]+x[59],-x[28]+x[36]-x[56]+x[60],x[37]-x[45]+x[65]-x[69],x[38]-x[46]-x[65]+x[69],x[39]-x[41]-x[43]+x[45]+x[67]-x[70],-x[39]+x[47]+x[68]-x[72],-x[38]+x[42]+x[44]-x[48]-x[66]+x[71],-x[40]+x[48]-x[68]+x[72],x[53]-x[57]+x[73]-x[81],x[54]-x[58]+x[74]-x[77]-x[78]+x[81],-x[53]+x[57]+x[75]-x[82],-x[55]+x[59]-x[75]+x[79]+x[80]-x[84],x[56]-x[60]-x[74]+x[83],-x[56]+x[60]-x[76]+x[84],x[65]-x[69]+x[85]-x[93],x[66]-x[70]+x[86]-x[89]-x[90]+x[93],-x[65]+x[69]+x[87]-x[94],-x[67]+x[71]-x[87]+x[91]+x[92]-x[96],x[68]-x[72]-x[86]+x[95],-x[68]+x[72]-x[88]+x[96],x[97]+x[101]-2 x[105],x[98]-x[101]+x[105]-x[106],x[99]-x[101]+x[105]-x[106],-x[99]+x[104]+x[107]-x[108],-x[98]+x[104]+x[107]-x[108],-x[100]-x[104]+2 x[108],x[109]+x[113]-2 x[117],x[110]-x[113]+x[117]-x[118],x[111]-x[113]+x[117]-x[118],-x[111]+x[116]+x[119]-x[120],-x[110]+x[116]+x[119]-x[120],-x[112]-x[116]+2 x[120],x[1]+x[25]-2 x[49],x[2]+x[26]-2 x[50],x[3]-x[25]+x[49]-x[51],x[4]-x[26]+x[50]-x[52],x[13]-x[25]+x[49]-x[51],x[14]-x[26]+x[50]-x[52],-x[13]+x[39]+x[61]-x[63],-x[14]+x[40]+x[62]-x[64],-x[3]+x[39]+x[61]-x[63],-x[4]+x[40]+x[62]-x[64],-x[15]-x[39]+2 x[63],-x[16]-x[40]+2 x[64],x[5]+x[53]-x[73]-x[77],x[6]+x[54]-x[74]-x[78],x[7]-x[29]-x[31]+x[55]+x[73]-x[79],x[8]-x[30]-x[32]+x[56]+x[74]-x[80],x[17]-x[53]-x[75]+x[77],x[18]-x[54]-x[76]+x[78],-x[17]+x[41]+x[43]-x[65]-x[87]+x[89],-x[18]+x[42]+x[44]-x[66]-x[88]+x[90],-x[7]+x[67]+x[85]-x[91],-x[8]+x[68]+x[86]-x[92],-x[19]-x[67]+x[87]+x[91],-x[20]-x[68]+x[88]+x[92],x[33]+x[53]-x[77]-x[81],x[35]+x[54]-x[78]-x[83],x[34]-x[53]+x[77]-x[82],x[36]-x[54]+x[78]-x[84],x[45]-x[57]+x[65]-x[69]-x[79]+x[81],x[47]-x[59]+x[66]-x[71]-x[80]+x[83],-x[45]+x[67]-x[91]+x[93],-x[47]+x[68]-x[92]+x[95],-x[34]-x[55]+x[58]+x[70]+x[89]-x[94],-x[36]-x[56]+x[60]+x[72]+x[90]-x[96],-x[46]-x[67]+x[91]+x[94],-x[48]-x[68]+x[92]+x[96],x[9]+x[81]-x[97]-x[105],x[10]+x[82]-x[98]-x[106],x[11]-x[33]-x[35]+x[83]+x[97]-x[107],x[12]-x[34]-x[36]+x[84]+x[98]-x[108],x[21]-x[81]-x[99]+x[105],x[22]-x[82]-x[100]+x[106],-x[21]+x[45]+x[47]-x[93]-x[111]+x[117],-x[22]+x[46]+x[48]-x[94]-x[112]+x[118],-x[11]+x[95]+x[109]-x[119],-x[12]+x[96]+x[110]-x[120],-x[23]-x[95]+x[111]+x[119],-x[24]-x[96]+x[112]+x[120],x[29]-x[53]+x[57]+x[77]-2 x[101],x[31]-x[55]+x[58]+x[79]-x[102]-x[103],x[30]-x[54]-x[57]+x[78]+x[101]-x[102],x[32]-x[56]-x[58]+x[80]+x[102]-x[104],x[41]-x[65]+x[69]-x[77]+x[101]-x[103],x[43]-x[67]+x[70]-x[79]+x[103]-x[104],-x[41]+x[65]+x[71]-x[89]+x[113]-x[115],-x[43]+x[67]+x[72]-x[91]+x[115]-x[116],-x[30]+x[54]-x[59]+x[90]+x[113]-x[114],-x[32]+x[56]-x[60]+x[92]+x[114]-x[116],-x[42]+x[66]-x[71]-x[90]+x[114]+x[115],-x[44]+x[68]-x[72]-x[92]+2 x[116],x[49]+x[81]-x[97]-x[105],x[51]+x[82]-x[99]-x[106],x[50]-x[81]-x[98]+x[105],x[52]-x[82]-x[100]+x[106],x[61]-x[73]-x[85]+x[93]+x[97]-x[107],x[63]-x[75]-x[87]+x[94]+x[99]-x[108],-x[61]+x[95]+x[109]-x[119],-x[63]+x[96]+x[111]-x[120],-x[50]+x[74]-x[83]+x[86]-x[110]+x[117],-x[52]+x[76]-x[84]+x[88]-x[112]+x[118],-x[62]-x[95]+x[110]+x[119],-x[64]-x[96]+x[112]+x[120],x[5]-x[9],-x[3]+x[7],x[8]-x[12],x[17]-x[21],-x[15]+x[19],x[20]-x[24],x[53]-x[57],-x[27]+x[31],x[32]-x[36],x[65]-x[69],-x[39]+x[43],x[44]-x[48],x[77]-x[81],-x[75]+x[79],x[56]-x[60],x[89]-x[93],-x[87]+x[91],x[68]-x[72],x[101]-x[105],-x[99]+x[103],x[104]-x[108],x[113]-x[117],-x[111]+x[115],x[116]-x[120],x[25]-x[49],x[26]-x[50],-x[13]+x[37],-x[14]+x[38],x[39]-x[63],x[40]-x[64],x[29]-x[73],x[30]-x[74],-x[17]+x[41],-x[18]+x[42],x[67]-x[91],x[68]-x[92],x[53]-x[77],x[54]-x[78],-x[45]+x[69],-x[47]+x[71],x[70]-x[94],x[72]-x[96],x[33]-x[97],x[34]-x[98],-x[21]+x[45],-x[22]+x[46],x[95]-x[119],x[96]-x[120],x[57]-x[101],x[58]-x[102],-x[41]+x[65],-x[43]+x[67],x[90]-x[114],x[92]-x[116],x[81]-x[105],x[82]-x[106],-x[61]+x[85],-x[63]+x[87],x[86]-x[110],x[88]-x[112]};

{m=Length[eqns], n= Max[Cases[eqns, x[k_] :> k, Infinity]]}

Clear[t];
Feed[0] = Null;
Feed[eqn_] := Module[{i, eqn1},
i = Min[Cases[eqn, x[k_] :> k, Infinity]];
eqn1 = Expand[eqn/ Coefficient[eqn, x[i]]];
If[Head[t[i]] =!= t,
(*then*) Feed[t[i] - eqn1],
(*else*) t[i] = eqn1
];
];

Feed /@ eqns;

Table[t[i], {i, n}] // ColumnForm