# HG changeset patch
# User Nathann Cohen
# Date 1272442371 7200
# Node ID 60485faf0c71d23dae5639b1bb140e3413404e69
# Parent ef74a6ed21179df343f658c015d7b068bb28c0f3
trac 8798 : remove duplicates of feedback_vertex_set and feedback_edge_set from generic_graph.py
diff r ef74a6ed2117 r 60485faf0c71 sage/graphs/generic_graph.py
 a/sage/graphs/generic_graph.py Fri Apr 16 10:22:00 2010 0700
+++ b/sage/graphs/generic_graph.py Wed Apr 28 10:12:51 2010 +0200
@@ 3343,234 +3343,6 @@
else:
raise ValueError("Only two algorithms are available : Cliquer and MILP.")
 def feedback_edge_set(self,value_only=False):
 r"""
 Computes the minimum feedback edge set of a digraph
 ( also called feedback arc set ).

 The minimum feedback edge set of a digraph is a set of edges
 that intersect all the circuits of the digraph.
 Equivalently, a minimum feedback arc set of a DiGraph is a set
 `S` of arcs such that the digraph `GS` is acyclic.

 For more informations, see
 ( http://en.wikipedia.org/wiki/Feedback_arc_set )

 INPUT :

  ``value_only`` (boolean) 
  When set to ``True``, only the minimum
 cardinal of a minimum edge set is
 returned.

  When set to ``False``, the ``Set`` of edges
 of a minimal edge set is returned.

 This problem is solved using Linear Programming, which certainly
 is not the best way and will have to be updated. The program solved
 is the following :

 .. MATH:
 \mbox{Minimize : }&\sum_{(u,v)\in G} b_{(u,v)}\\
 \mbox{Such that : }&\\
 &\forall v\in G, \sum_{i\in [0,\dots,n1]}x_{v,i}=1\\
 &\forall i\in [0,\dots,n1], \sum_{v\in G}x_{v,i}=1\\
 &\forall v\in G,\sum_{i\in [0,\dots,n1]} ix_{v,i}=d_v\\
 &\forall (u,v)\in G, d_ud_v+nb_{(u,v)}\geq 0\\

 An explanation :

 An acyclic digraph can be seen as a poset, and every poset has
 a linear extension. This means that in any acyclic digraph
 the vertices can be ordered with a total order `<` in such a way
 that if `(u,v)\in G`, then `u