Macaulay2 » Documentation
Packages » Chordal :: suggestVariableOrder
next | previous | forward | backward | up | index | toc

# suggestVariableOrder -- suggests a good variable ordering

- Usage:
    `suggestVariableOrder I`
- Inputs:
  - I, an ideal,
- Outputs:
  - a list, variable ordering

## Description

This method suggests a good variable ordering. The ordering is chosen by finding a good chordal completion of its constraint graph.

    i1 : G = cartesianProduct(cycleGraph 3, pathGraph 3);

    i2 : I = edgeIdeal G

    o2 = monomialIdeal (x x , x x , x x , x x , x x , x x , x x , x x , x x ,
                         1 2   1 3   1 4   3 4   2 5   2 6   3 6   2 7   4 7
         ------------------------------------------------------------------------
         x x , x x , x x , x x , x x , x x )
          6 7   5 8   6 8   5 9   7 9   8 9

    o2 : MonomialIdeal of QQ[x ..x ]
                              1   9

    i3 : X = suggestVariableOrder I

    o3 = {x , x , x , x , x , x , x , x , x }
           1   3   4   2   6   5   7   8   9

    o3 : List

## See also

- constraintGraph -- constraint graph of a polynomial set
- chordalGraph -- chordal completion of a graph

## Ways to use suggestVariableOrder:

- `suggestVariableOrder(Ideal)`

## For the programmer

The object suggestVariableOrder is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Chordal/ChordalDoc.m2:599:0.