Re: [sage-support] Re: Checking for convexity of Lattice Polytopes

2011-03-13 Thread Johannes
Am 24.02.2011 19:29, schrieb Dmitri: A chosen set of points is convex if it is equal to its convex hull. as far as I see this is equivalent to, all points are on a facet of the polytope. I think my problem is actually doing the comparison. So I have this chosen set of points which I don't

[sage-support] Re: Checking for convexity of Lattice Polytopes

2011-03-02 Thread Ursula Whitcher
On Mar 1, 2:11 pm, Volker Braun vbraun.n...@gmail.com wrote: I agree with your example, of course. But I interpreted Dmitri's question somewhat differently, that he wants to start with some set of lattice points and find out if they all lattice points of the convex hull. Though thinking

[sage-support] Re: Checking for convexity of Lattice Polytopes

2011-03-02 Thread Volker Braun
One solution would be to compute the volume of P, Q, and intersect(P,Q). All three are convex, so its easy enough to compute the volumes. Then Vol(union(P,Q)) = Vol(P) + Vol(Q) - Vol(intersect(P,Q)) = Vol(conv(P,Q)) with equality if and only if union(P,Q) is already convex. I don't quite

[sage-support] Re: Checking for convexity of Lattice Polytopes

2011-03-01 Thread Ursula Whitcher
On Feb 24, 10:57 am, Volker Braun vbraun.n...@gmail.com wrote: On Thursday, February 24, 2011 6:29:11 PM UTC, Dmitri wrote: I think my problem is actually doing the comparison. So I have this chosen set of points which I don't know is convex. I compute its convex hull. Now how do I compare

[sage-support] Re: Checking for convexity of Lattice Polytopes

2011-03-01 Thread Volker Braun
On Tuesday, March 1, 2011 9:55:01 PM UTC, Ursula Whitcher wrote: This won't always work. I agree with your example, of course. But I interpreted Dmitri's question somewhat differently, that he wants to start with some set of lattice points and find out if they all lattice points of the

[sage-support] Re: Checking for convexity of Lattice Polytopes

2011-02-24 Thread Dmitri
A chosen set of points is convex if it is equal to its convex hull. So all you have to do is compute the hull and compare with it. I think my problem is actually doing the comparison. So I have this chosen set of points which I don't know is convex. I compute its convex hull. Now how do I

[sage-support] Re: Checking for convexity of Lattice Polytopes

2011-02-24 Thread Volker Braun
On Thursday, February 24, 2011 6:29:11 PM UTC, Dmitri wrote: I think my problem is actually doing the comparison. So I have this chosen set of points which I don't know is convex. I compute its convex hull. Now how do I compare these two objects? Assuming that we are still talking about

[sage-support] Re: Checking for convexity of Lattice Polytopes

2011-02-23 Thread Dmitri
Thanks for the quick response. My question is somewhat different. Specifically, I have a set of equations that define each facet of some polytope. The intersection of all these equations forms a lattice polytope (finite and bounded). I want to know if that polytope is convex or not. If it helps to

[sage-support] Re: Checking for convexity of Lattice Polytopes

2011-02-23 Thread Volker Braun
On Thursday, February 24, 2011 12:12:12 AM UTC, Dmitri wrote: [...] The intersection of all these equations forms a lattice polytope (finite and bounded). I want to know if that polytope is convex or not. I'm confused. Intersections of convex sets are convex. [...] One question that

[sage-support] Re: Checking for convexity of Lattice Polytopes

2011-02-21 Thread Volker Braun
Polyhedron and Polytope (=compact Polyhedron) implies convex. For example: sage: lp = LatticePolytope(matrix([[-1,-1], [-1,0], [0,0], [1,0], [1,-1]]).transpose()) sage: lp.points() [-1 -1 1 1 0 0] [-1 0 0 -1 -1 0] sage: lp.vertices() [-1 -1 1 1] [-1 0 0 -1] -- To post to this group,