Macaulay2 » Documentation
Packages » HyperplaneArrangements :: randomArrangement(ZZ,PolynomialRing,ZZ)
next | previous | forward | backward | up | index | toc

randomArrangement(ZZ,PolynomialRing,ZZ) -- generate an arrangement at random

Synopsis

Description

As $N$ increases, the random arrangement is a generic arrangement (i.e., a realization of the uniform matroid with probability tending to 1. The user can require that the arrangement generated is actually generic by using the option Validate => true.

i1 : randomArrangement(4,3,5)

o1 = {- 4x  + 3x  + x , 3x  + x , - 2x  + 2x , 3x  + x  + x }
          1     2    3    1    3      1     3    1    2    3

o1 : Hyperplane Arrangement 

If an arrangement has the poincare polynomial of a generic arrangement, then it is itself generic.

i2 : tally apply(12, i -> poincare randomArrangement(6,3,5))

                       2      3
o2 = Tally{1 + 6T + 15T  + 10T  => 8}
                       2     3
           1 + 6T + 14T  + 9T  => 4

o2 : Tally
i3 : A = randomArrangement(6,3,5,Validate=>true)

o3 = {5x  + 4x  + 3x , - 3x  + x  - 5x , - 5x  - 3x  + 3x , 3x  + 4x  - 2x , - 2x  - 3x  + 5x , 5x  + 3x  - 5x }
        1     2     3      1    2     3      1     2     3    1     2     3      1     2     3    1     2     3

o3 : Hyperplane Arrangement 
i4 : U = uniformMatroid(3,6);
i5 : assert areIsomorphic(U, matroid A)

Caveat

If the user specifies Validate => true and $N$ is too small, the method may not halt.

See also

Ways to use this method: