#18839: Boost Dominator Tree
-------------------------------------+-------------------------------------
       Reporter:  borassi            |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.8
      Component:  graph theory       |   Resolution:
       Keywords:  Dominator tree,    |    Merged in:
  Boost                              |    Reviewers:
        Authors:  Michele Borassi    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  81e4ee11c8db417b6f5b5ec478da01bdcfd19ab7
  u/borassi/boost_dominator_tree     |     Stopgaps:
   Dependencies:  #18811, #18564     |
-------------------------------------+-------------------------------------

Comment (by borassi):

 > However, I have questions on the expected behavior:
 > - with 1-vertex graph:
 > {{{
 > sage: G = graphs.[wiki:PathGraph](1)
 > sage: G.dominator_tree(0)
 > {0: None}
 > sage: G.dominator_tree(0, return_dict=False)
 > Graph on 0 vertices
 > }}}

 You are right, if the dominator tree is empty (that is, if from the root
 we cannot reach any other vertex) it is better to output a 1-vertex graph
 containing the root, not an empty graph. For the dictionary, I think the
 behavior is correct.

 > - With disconnected graphs
 > {{{
 > sage: G = 2 * graphs.[wiki:PathGraph](1)
 > sage: G.dominator_tree(0)
 > {0: None, 1: None}
 > sage: G = 2 * graphs.[wiki:PathGraph](2)
 > sage: G.dominator_tree(0)
 > {0: None, 1: 0, 2: None, 3: None}
 > }}}
 > If this is effectively what we expect, then I will finalize the review.

 Here, the behavior is correct, in my opinion. I have changed the doc to
 better explain this case, by adding an "OUTPUT" block.

--
Ticket URL: <http://trac.sagemath.org/ticket/18839#comment:13>
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