Page 1 of 1

affine dependencies of a polytope

Posted: 02 Jul 2019, 02:57
by Lai
Hello,

I am new to polymake, and computing in general, so I apologize if this is an easy fix.

I am trying to compute the affine dependencies of a polytope P=conv(x1,..,x_n).

So by this I mean identifying the maximal affinely independent subset of the vertex set {x_1,...,x_n}, and then expressing the remaining vertices as affine combinations of this independent subset. Thus obtaining a list of equations or "affine dependencies".

I am wondering if there is an easy way to do this using some polymake functions?

Thank you very much!

Re: affine dependencies of a polytope

Posted: 29 Aug 2019, 10:23
by joswig
Yes, it works as follows.

Let us take the standard square as an example. Your question is about the matroid generated by the vertices.

Code: Select all

polytope > $V=cube(2)->VERTICES; polytope > $M = new matroid::Matroid(VECTORS=>$V); polytope > print $M->BASES; {0 1 2} {0 1 3} {0 2 3} {1 2 3}
Each line describes one basis formed from $V. The integers are row indices.

Now if you want to describe $V, e.g., in the first basis (indexed 0), then it looks like this:

Code: Select all

polytope > $B=$V->minor($M->BASES->[0],All); polytope > print $V*inv($B); 1 0 0 0 1 0 0 0 1 -1 1 1
Sorry for the late reply; somehow this got lost.

Re: affine dependencies of a polytope

Posted: 26 Nov 2019, 20:50
by Lai
Thank you, very helpful.