Strugles with VERTICES_IN_FACETS

Questions and problems about using polymake go here.
rado.rakotonarivo
Posts: 2
Joined: 06 Feb 2019, 16:59

Strugles with VERTICES_IN_FACETS

Postby rado.rakotonarivo » 06 Feb 2019, 17:34

Hello,
I am a new user on polymake and need some help.
Here is my problem:
My purpose is to compute a cone $c pointed at some vertex $v of a polytope $p, such that its rays are the affine hull of the facets of $p incident to $v, and such that $p itself is not contained in $c. So my question is: how can I keep track of the facets that are incident to my vertex $v, meaning to get their inequalities and affine hull. VERTICES_IN_FACETS and FACETS_THRU_VERTICES only seems to show the labels of the vertices and facets not information on them. Or am I wrong?

Thank you very much, and apologies for my english.

Rado

User avatar
joswig
Main Author
Posts: 288
Joined: 24 Dec 2010, 11:10

Re: Strugles with VERTICES_IN_FACETS

Postby joswig » 07 Feb 2019, 13:59

My purpose is to compute a cone $c pointed at some vertex $v of a polytope $p, such that its rays are the affine hull of the facets of $p incident to $v, and such that $p itself is not contained in $c.
Sorry, I do not understand what you want to compute. Do you want to compute the intersection of the affine halfspaces given by the facets through a fixed vertex? This would be like the following.

Code: Select all

> $c=cube(3); > print $c->VERTICES->[0]; 1 -1 -1 -1
Just to check which vertex is indexed with 0. Here you see the indices of the facets containing that vertices (as row indices to the FACETS matrix).

Code: Select all

> print $c->FACETS_THRU_VERTICES->[0]; {0 2 4}
If you want to get the inequalities:

Code: Select all

> print $c->FACETS->minor($c->FACETS_THRU_VERTICES->[0],All); 1 1 0 0 1 0 1 0 1 0 0 1
And you can produce a new object of type Polytope, of course:

Code: Select all

$C=new Polytope(FACETS=>$c->FACETS->minor($c->FACETS_THRU_VERTICES->[0],All));
Here using FACETS (instead of the standard INEQUALITIES) as an input property is OK, because you know that there are no hidden redundancies.

rado.rakotonarivo
Posts: 2
Joined: 06 Feb 2019, 16:59

Re: Strugles with VERTICES_IN_FACETS

Postby rado.rakotonarivo » 07 Feb 2019, 15:57

Thank you for your fast reply,
Sorry, I do not understand what you want to compute. Do you want to compute the intersection of the affine halfspaces given by the facets through a fixed vertex?
This is indeed what I aim for but I want to consider the closed halfspaces that does not contain the polytope. That is, for a fixed vertex $v, I want to compute the intersection of the closed halfspaces given by the affine hull of each incident facet to $v and such that those halfspaces do not contain the polytope.

Code: Select all

> print $c->FACETS->minor($c->FACETS_THRU_VERTICES->[0],All); 1 1 0 0 1 0 1 0 1 0 0 1
minor($c->FACETS_THRU_VERTICES->[0],All) was actually the function I was looking for. However when I will compute $C, I think I should consider the opposite normal vector of each the facet, since I don't want the polytope $c to be contained in the intersection. Or maybe I do not get the real difference between FACETS and INEQUALITIES?


Return to “Helpdesk”