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

## Synopsis

• Usage:
(Y, F) = setOnesForest X
• Inputs:
• X, , a symbolic slack matrix
• Outputs:
• Y, , the matrix X with the variables corresponding to the edges of a spanning forest set to 1
• F, , spanning forest of the bipartite (non-incidence) graph whose vertices are the vertices and facets of a polytope P, and whose edges are the vertex-facet pairs of P such that the vertex is not on the facet

## 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 ]) <--- (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 }, | 1 0 0 1 | 1 4 3 4 0 5 2 5 | 0 1 1 0 | ring => QQ[y ..y ] | 1 0 x_7 0 | 0 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