Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial:apps_matroid [2014/11/10 10:13] – [Constructing a Simple Matroid and Playing Around] schroeter | user_guide:tutorials:apps_matroid [2019/02/04 22:55] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Short Introduction to New Application '' | + | {{page> |
- | The application '' | ||
- | |||
- | To make '' | ||
- | |||
- | ===== Constructing a Simple Matroid and Playing Around ===== | ||
- | |||
- | This is how to produce a matroid from a vector configuration. | ||
- | |||
- | < | ||
- | matroid > $M=new Matroid(POINTS=> | ||
- | </ | ||
- | |||
- | If '' | ||
- | |||
- | < | ||
- | polytope > $M=new matroid:: | ||
- | </ | ||
- | |||
- | Output of basic statistics. | ||
- | < | ||
- | matroid > print $M-> | ||
- | 3 4 3 | ||
- | </ | ||
- | {{ : | ||
- | The '' | ||
- | |||
- | < | ||
- | matroid > print $M-> | ||
- | {0 1 2} | ||
- | {0 2 3} | ||
- | {1 2 3} | ||
- | </ | ||
- | |||
- | Similarly you can compute the circuits and cocircuits. | ||
- | |||
- | < | ||
- | matroid > print $M-> | ||
- | {0 1 3} | ||
- | |||
- | matroid > print $M-> | ||
- | {2} | ||
- | {0 1} | ||
- | {0 3} | ||
- | {1 3} | ||
- | </ | ||
- | |||
- | You can also compute other properties, like | ||
- | < | ||
- | matroid > print $M-> | ||
- | 1 1 0 0 | ||
- | |||
- | matroid > print $M-> | ||
- | {0 1 3} | ||
- | {2} | ||
- | |||
- | matroid > print $M-> | ||
- | x*y + y^3 + y^2 | ||
- | </ | ||
- | |||
- | Even the lattice of flats could be computed and visualised. | ||
- | < | ||
- | matroid > $lattice=$M-> | ||
- | {0 2} {0 1 3} {1 2} {2 3} | ||
- | |||
- | matroid > print $M-> | ||
- | {0 1 3} | ||
- | {0 2} | ||
- | {1 2} | ||
- | {2 3} | ||
- | |||
- | matroid > $M-> | ||
- | </ | ||
- | ===== Matroid Polytopes ===== | ||
- | |||
- | You can construct a polytope from the bases of a matroid as the convex hull of the characteristic vectors of the bases. | ||
- | |||
- | < | ||
- | matroid > print $M-> | ||
- | 1 1 1 1 0 | ||
- | 1 1 0 1 1 | ||
- | 1 0 1 1 1 | ||
- | |||
- | matroid > print $M-> | ||
- | 3 3 | ||
- | </ | ||
- | |||
- | ===== Other Constructions ===== | ||
- | |||
- | The vertices of a polytope give rise to a matroid. | ||
- | |||
- | < | ||
- | matroid > $C=new Matroid(POINTS=> | ||
- | |||
- | matroid > print $C-> | ||
- | 58 | ||
- | </ | ||
- | |||
- | The system also allows you to construct a matroid from a graph. | ||
- | |||
- | < | ||
- | matroid > $G=matroid_from_graph(polytope:: | ||
- | |||
- | matroid > print $G-> | ||
- | 792 | ||
- | </ | ||
- | |||
- | Of course you can also construct your matroid from scratch by specifying, e.g., its set of bases or non-bases and then compute other properties. The following constructs the Fano matroid, which is the simplest matroid that cannot be constructed from a vector configuration (over a field with characteristic not equal to two). | ||
- | < | ||
- | matroid > $a=new Array< | ||
- | |||
- | matroid > $m=new Matroid(NON_BASES=> | ||
- | |||
- | matroid > print $m-> | ||
- | {0 1 2 4} | ||
- | {0 1 3 6} | ||
- | {0 2 5 6} | ||
- | {0 3 4 5} | ||
- | {1 2 3 5} | ||
- | {1 4 5 6} | ||
- | {2 3 4 6} | ||
- | |||
- | </ | ||
- | |||
- | Note that you have to specify N_ELEMENTS when constructing a matroid in this way because this is not implicit in BASES, etc. |