Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
tutorial:apps_matroid [2014/11/05 13:52] – [Constructing a Simple Matroid and Playing Around] schroeter | user_guide:tutorials:apps_matroid [2019/01/25 09:38] – ↷ Page moved from user_guide:apps_matroid to user_guide:tutorials:apps_matroid oroehrig | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Short Introduction to New Application | + | ====== Short Introduction to application |
- | The application '' | + | **This tutorial is also available |
- | To make '' | + | This tutorial is meant to show the main features for handling matroids available. |
+ | < | ||
+ | > application " | ||
+ | </ | ||
+ | from within the '' | ||
===== Constructing a Simple Matroid and Playing Around ===== | ===== Constructing a Simple Matroid and Playing Around ===== | ||
Line 10: | Line 14: | ||
< | < | ||
- | matroid > $M=new Matroid(POINTS=> | + | matroid > $M=new Matroid(VECTORS=> |
</ | </ | ||
Line 16: | Line 20: | ||
< | < | ||
- | polytope > $M=new matroid:: | + | polytope > $M=new matroid:: |
</ | </ | ||
Line 24: | Line 28: | ||
3 4 3 | 3 4 3 | ||
</ | </ | ||
- | + | {{ user_guide: | |
- | The '' | + | The '' |
< | < | ||
Line 49: | Line 53: | ||
You can also compute other properties, like | You can also compute other properties, like | ||
< | < | ||
- | matroid > print $M-> | + | matroid > print $M-> |
+ | matroid (2)> | ||
+ | matroid | ||
+ | matroid | ||
1 1 0 0 | 1 1 0 0 | ||
Line 62: | Line 69: | ||
Even the lattice of flats could be computed and visualised. | Even the lattice of flats could be computed and visualised. | ||
< | < | ||
- | matroid > $lattice=$M-> | + | matroid > $lattice=$M-> |
+ | matroid > foreach (@{$lattice-> | ||
{0 2} {0 1 3} {1 2} {2 3} | {0 2} {0 1 3} {1 2} {2 3} | ||
Line 73: | Line 81: | ||
matroid > $M-> | matroid > $M-> | ||
</ | </ | ||
- | {{ : | ||
===== Matroid Polytopes ===== | ===== Matroid Polytopes ===== | ||
- | You can construct a polytope from the bases of a matroid as the convex hull of the characteristic vectors of the bases. | + | You can construct a polytope from the bases of a matroid as the convex hull of the characteristic vectors of the bases. |
< | < | ||
Line 93: | Line 100: | ||
< | < | ||
- | matroid > $C=new Matroid(POINTS=> | + | matroid > $C=new Matroid(VECTORS=> |
matroid > print $C-> | matroid > print $C-> | ||
Line 108: | Line 115: | ||
</ | </ | ||
- | 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 | + | It is also possible to derive a new matroid from others. |
+ | < | ||
+ | matroid > # The arguments are two matroids and for each matroid a basepoint. The basepoints will be identified. | ||
+ | matroid > $se=series_extension(uniform_matroid(2, | ||
+ | |||
+ | matroid > print deletion($se, | ||
+ | 1 0 0 | ||
+ | 0 1 0 | ||
+ | 0 0 1 | ||
+ | 1 1 1 | ||
+ | |||
+ | matroid > $pe=parallel_extension(uniform_matroid(1, | ||
+ | |||
+ | matroid > print dual(contraction($pe, | ||
+ | 1 0 0 | ||
+ | 0 1 0 | ||
+ | 0 0 1 | ||
+ | 1 1 1 | ||
+ | |||
+ | matroid > print projective_plane(3)-> | ||
+ | 234 | ||
+ | |||
+ | matroid > print fano_matroid()-> | ||
+ | 28 | ||
+ | |||
+ | matroid > print direct_sum(projective_plane(3), | ||
+ | 6552 = 234*28 | ||
+ | |||
+ | matroid > print two_sum(uniform_matroid(2, | ||
+ | {0 1 2} | ||
+ | {3 4 5} | ||
+ | {0 1 3 4} | ||
+ | {0 1 3 5} | ||
+ | {0 1 4 5} | ||
+ | {0 2 3 4} | ||
+ | {0 2 3 5} | ||
+ | {0 2 4 5} | ||
+ | {1 2 3 4} | ||
+ | {1 2 3 5} | ||
+ | {1 2 4 5} | ||
+ | </ | ||
+ | |||
+ | 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 a characteristic | ||
< | < | ||
- | matroid > $a=new Array< | + | matroid > $a=new Array< |
matroid > $m=new Matroid(NON_BASES=> | matroid > $m=new Matroid(NON_BASES=> |