next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
SlackIdeals :: setOnesForest

setOnesForest -- sets to 1 variables in a symbolic slack matrix which corresponding to edges of a spanning forest

Synopsis

Description

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 , x , x , x , x , x , x ])  <--- (QQ[x , x , x , x , x , x , x , x ])
                 0   1   2   3   4   5   6   7              0   1   2   3   4   5   6   7
i3 : (Y, F) = setOnesForest X

o3 = (| 0 1 0   1 |, Graph{edges => {{y , y }, {y , y }, {y , y }, {y , y },
      | 1 0 0   1 |                    1   4     3   4     0   5     2   5  
      | 0 1 1   0 |        ring => QQ[y , y , y , y , y , y , y , y ]
      | 1 0 x_7 0 |                    0   1   2   3   4   5   6   7
                           vertices => {y , y , y , y , y , y , y , y }
                                         0   1   2   3   4   5   6   7
     ------------------------------------------------------------------------
     {y , y }, {y , y }, {y , y }}})
       2   6     0   7     1   7

o3 : Sequence

See also

Ways to use setOnesForest :