#16475: Bug in Gomory-Hu tree algorithm
-------------------------------------+-------------------------------------
Reporter: foosterhof | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.3
Component: graph theory | Resolution:
Keywords: gomory hu tree | Merged in:
gomory-hu gomory_hu_tree | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: | e4604fa9ba9cf8ef5475620ed6b3d156402015d6
u/foosterhof/ticket/16475 | Stopgaps:
Dependencies: #12797 |
-------------------------------------+-------------------------------------
Comment (by ncohen):
Hello !
> I am trying to convert to use your suggestion, using frozenset, but the
call g1.vertices() (and thus also g2.vertices()) complains that it cannot
compare a (frozen)set to an int, as it will sort them.
HMmmmmmmmm `O_o`
I do not understand what you mean. Could you give me an example of code
that produces it ? It looks that you cannot use "&" on a frozenset, but it
has an "intersection" method
{{{
sage: range(5) & frozenset(range(8))
...
TypeError: unsupported operand type(s) for &: 'list' and 'frozenset'
sage: frozenset(range(8)).intersection(range(5))
frozenset({0, 1, 2, 3, 4})
}}}
I have been trying to give it a nice key lambda function to circumvent
this problem, but no luck so far. Any suggestions? Or does this mean that
I can better just leave it as using Set?
> I have added a comment, including a reference to a piece of a book by A.
Schrijver, which explains the use of the partitions. (A Gomory-Hu tree can
be defined for a specific subset R of V, in which case these partitions
play a big role)
Thanks ! `:-)`
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/16475#comment:9>
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.