Ticket #8403: trac_8403-part2.patch

File trac_8403-part2.patch, 1.9 KB (added by rlm, 11 years ago)
  • sage/graphs/generic_graph.py

    # HG changeset patch
    # User Robert L. Miller <rlm@rlmiller.org>
    # Date 1276905940 25200
    # Node ID bdaf0cf036ef5169bf326ec25abdcae06884fea4
    # Parent  88286e3cf010031343a6759520fccacd12d10352
    #8403 - fix #optional tags
    
    diff -r 88286e3cf010 -r bdaf0cf036ef sage/graphs/generic_graph.py
    a b  
    30963096        Definition :
    30973097
    30983098        Computing a minimum spanning tree in a graph can be done in `n
    3099         \log(n)` time (and in linear time if all weights are
    3100         equal). On the other hand, if one is given a large (possibly
     3099        \log(n)` time (and in linear time if all weights are equal) where
     3100        `n = V + E`. On the other hand, if one is given a large (possibly
    31013101        weighted) graph and a subset of its vertices, it is NP-Hard to
    31023102        find a tree of minimum weight connecting the given set of
    31033103        vertices, which is then called a Steiner Tree.
     
    31423142        of course, always a tree ::
    31433143
    31443144            sage: g = graphs.RandomGNP(30,.5)
    3145             sage: st = g.steiner_tree(g.vertices()[:5])              # optional - requires GLPK, CBC or CPLEX
    3146             sage: st.is_tree()                                       # optional - requires GLPK, CBC or CPLEX
     3145            sage: st = g.steiner_tree(g.vertices()[:5])              # optional - GLPK, CBC
     3146            sage: st.is_tree()                                       # optional - GLPK, CBC
    31473147            True
    31483148
    31493149        And all the 5 vertices are contained in this tree ::
    31503150
    3151             sage: all([v in st for v in g.vertices()[:5] ])          # optional - requires GLPK, CBC or CPLEX
     3151            sage: all([v in st for v in g.vertices()[:5] ])          # optional - GLPK, CBC
    31523152            True
    31533153
    31543154        An exception is raised when the problem is impossible, i.e.