-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transitive reduction is incorrect #91
Comments
Indeed the reduction is not minimal on this example (though we have the expected property that the transitive closure of the output is the same as the transitive closure of the input). |
I tentatively fixed transitive_reduction in commit 69fd491. |
I ran some quick and dirty tests on my end, and the fixed |
CHANGES: - port to dune and opam 2.0 - ❗ opam package now split into two packages: ocamlgraph and ocamlgraph_gtk - [WeakTopological] fixed incorrect use of generic hash tables (backtracking/ocamlgraph#99, Tomáš Dacík) - [Oper] fixed transitive_reduction (backtracking/ocamlgraph#91) - fix incorrect uses of polymorphic equality (Steffen Smolka, Boris Yakobowski) - [Coloring] fixed generation of OCamlDoc documentation (contributed by Earnestly) - ❗ [Coloring] functions now fail if the graph is directed - ❗ [Coloring] now uses a single, global exception [NoColoring] - [Coloring] new function two_color to 2-color a graph (or fail) - ❗ [Fixpoint] Take initial labeling of nodes into account (Johannes Kloos)
* [new release] ocamlgraph_gtk and ocamlgraph (2.0.0) CHANGES: - port to dune and opam 2.0 - ❗ opam package now split into two packages: ocamlgraph and ocamlgraph_gtk - [WeakTopological] fixed incorrect use of generic hash tables (backtracking/ocamlgraph#99, Tomáš Dacík) - [Oper] fixed transitive_reduction (backtracking/ocamlgraph#91) - fix incorrect uses of polymorphic equality (Steffen Smolka, Boris Yakobowski) - [Coloring] fixed generation of OCamlDoc documentation (contributed by Earnestly) - ❗ [Coloring] functions now fail if the graph is directed - ❗ [Coloring] now uses a single, global exception [NoColoring] - [Coloring] new function two_color to 2-color a graph (or fail) - ❗ [Fixpoint] Take initial labeling of nodes into account (Johannes Kloos) * ocamlgraph.2.0.0: added depends graphics with-test * ocamlgraph_gtk.2.0.0: added depends graphics with-test * ocamlgraph 2.0.0 requires OCaml >= 4.03.0 * added a constraint 'ocamlgraph <= 1.8.8' * better constraints (suggested by David Allsopp)
* [new release] ocamlgraph_gtk and ocamlgraph (2.0.0) CHANGES: - port to dune and opam 2.0 - ❗ opam package now split into two packages: ocamlgraph and ocamlgraph_gtk - [WeakTopological] fixed incorrect use of generic hash tables (backtracking/ocamlgraph#99, Tomáš Dacík) - [Oper] fixed transitive_reduction (backtracking/ocamlgraph#91) - fix incorrect uses of polymorphic equality (Steffen Smolka, Boris Yakobowski) - [Coloring] fixed generation of OCamlDoc documentation (contributed by Earnestly) - ❗ [Coloring] functions now fail if the graph is directed - ❗ [Coloring] now uses a single, global exception [NoColoring] - [Coloring] new function two_color to 2-color a graph (or fail) - ❗ [Fixpoint] Take initial labeling of nodes into account (Johannes Kloos) * ocamlgraph.2.0.0: added depends graphics with-test * ocamlgraph_gtk.2.0.0: added depends graphics with-test * ocamlgraph 2.0.0 requires OCaml >= 4.03.0 * added a constraint 'ocamlgraph <= 1.8.8' * better constraints (suggested by David Allsopp)
There seems to be a bug in the transitive reduction computation.
Given the following graph:
The expected transitive reduction is:
However, running the
transitive_reduction
function on it results in an unchanged graph.The code I used for the above graph is:
I'm also attaching the dot output for the initial graph, and the supposed transitively reduced graph. The
tred
program in graphviz computes the expected transitive reduction.raw-dot.txt
reduced-dot.txt
The text was updated successfully, but these errors were encountered: