# HG changeset patch
# User Nathann Cohen
# Date 1272442371 7200
# Node ID 14825bd6369b50415a3dc8184ae20157e84ca4aa
# Parent 9188e33e33ed5708fcccff34d429d701dec3baaa
trac 8798 : remove duplicates of feedback_vertex_set and feedback_edge_set from generic_graph.py
diff git a/sage/graphs/generic_graph.py b/sage/graphs/generic_graph.py
 a/sage/graphs/generic_graph.py
+++ b/sage/graphs/generic_graph.py
@@ 3348,234 +3348,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
 information, see the
 `Wikipedia article on feedback arc sets
 `_.

 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`_.

 INPUT :

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

  When set to ``False``, the ``Set`` of vertices
 of a minimal feedback vertex set is returned.

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

 .. MATH:
 \mbox{Minimize : }&\sum_{v\in G} b_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+nb_v\geq 0\\

 A brief 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