Since row and column scaling operations preserve the projective equivalence class of a slack matrix, it is sometimes advantageous to choose a certain equivalence class representative by setting some variables in a slack matrix to 1. This reduces the computational time of calculating the slack ideal, for example.
This function automates the selection of a spanning forest in the bipartite graph corresponding to S and sets the associated variables to 1.
i1 : V = {{0, 0}, {0, 1}, {1, 1}, {1, 0}};
|
i2 : X = symbolicSlackMatrix V
Order of vertices is
{{0, 0}, {1, 0}, {0, 1}, {1, 1}}
o2 = | 0 x_0 0 x_1 |
| x_2 0 0 x_3 |
| 0 x_4 x_5 0 |
| x_6 0 x_7 0 |
4 4
o2 : Matrix (QQ[x ..x ]) <--- (QQ[x ..x ])
0 7 0 7
|
i3 : (Y, F) = setOnesForest X
o3 = (| 0 1 0 1 |, Graph{edges => {{y , y }, {y , y }, {y , y }, {y , y }, {y , y }, {y , y }, {y , y }}})
| 1 0 0 1 | 1 4 3 4 0 5 2 6 3 6 0 7 1 7
| 0 x_4 1 0 | ring => QQ[y ..y ]
| 1 0 1 0 | 0 7
vertices => {y , y , y , y , y , y , y , y }
0 1 2 3 4 5 6 7
o3 : Sequence
|
The object setOnesForest is a method function.