 ## affine dependencies of a polytope

Questions and problems about using polymake go here.
Lai
Posts: 7
Joined: 02 Jul 2019, 02:26

### affine dependencies of a polytope

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!

joswig
Main Author
Posts: 232
Joined: 24 Dec 2010, 11:10

### Re: affine dependencies of a polytope

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->,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.

Lai
Posts: 7
Joined: 02 Jul 2019, 02:26

### Re: affine dependencies of a polytope 