#18860: Faster Poyhedron.graph()
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  new
           Type:         |    Milestone:  sage-6.8
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:
  geometry               |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  3b5eabb9735a867678c2c6a13dc7700c24d82732
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  public/18860           |
   Dependencies:         |
  #18779                 |
-------------------------+-------------------------------------------------

Comment (by dimpase):

 {{{
 +        # Why 26 ?? I was expecting 'd-1'. Are there some useless
 inequalities
 +        # in the list?
 }}}
 well, you have 26 facets on each edge - none are more useless than the
 others. You can do the
 following (note that 0th and 1st vertices are adjacent).
 {{{
 sage: p=polytopes.Gosset_3_21()
 sage: M=p.incidence_matrix()
 sage: a=0; b=1;
 sage: vv=[i for i in [0..702] if M[a,i]*M[b,i]>0]
 sage: matrix([p.inequalities()[j].vector() for j in vv]).T.kernel()
 Free module of degree 9 and rank 1 over Integer Ring
 Echelon basis matrix:
 [0 1 0 0 0 0 0 0 0]
 }}}
 or just
 {{{
 sage: m=matrix([p.inequalities()[j].vector() for j in vv])
 sage: m.rank()
 8
 }}}
 which makes sense, as `m` is of size 27x9.  (27, as there is not full-
 dimensional).

 General code for adjacency of two vertices `a` and `b` of a polytope in
 `d`-dimensional space
 should check that `m` has corank `1`.

 (There could be special cases when one of the vertices is the origin, or
 some inequalities are homogeneous).

--
Ticket URL: <http://trac.sagemath.org/ticket/18860#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to