# HG changeset patch
# User Nathann Cohen <nathann.cohen@gmail.com>
# Date 1272441720 -7200
# Node ID 5af3155634cd101e69191b123948f78e6981b931
# Parent 4a624097a97bdd20e5bcc484ae37bc9425adbb57
#8786: added fixes: autogenerated broken links to Wikipedia
diff --git a/sage/graphs/digraph.py b/sage/graphs/digraph.py
a
|
b
|
|
18 | 18 | Directed graph. |
19 | 19 | |
20 | 20 | A digraph or directed graph is a set of vertices connected by oriented |
21 | | edges (cf. http://en.wikipedia.org/wiki/Digraph_%28mathematics%29 ). |
| 21 | edges. |
| 22 | |
| 23 | `Wikipedia article on digraphs |
| 24 | <http://en.wikipedia.org/wiki/Digraph_%28mathematics%29>`_ |
22 | 25 | |
23 | 26 | One can very easily create a directed graph in Sage by typing:: |
24 | 27 | |
… |
… |
|
1099 | 1102 | Equivalently, a minimum feedback arc set of a DiGraph is a set |
1100 | 1103 | `S` of arcs such that the digraph `G-S` is acyclic. |
1101 | 1104 | |
1102 | | For more informations, see |
1103 | | ( http://en.wikipedia.org/wiki/Feedback_arc_set ) |
| 1105 | `Wikipedia article on Feedback arc sets |
| 1106 | <http://en.wikipedia.org/wiki/Feedback_arc_set>`_. |
1104 | 1107 | |
1105 | 1108 | INPUT : |
1106 | 1109 | |
… |
… |
|
1208 | 1211 | Equivalently, a minimum feedback vertex set of a DiGraph is a set |
1209 | 1212 | `S` of vertices such that the digraph `G-S` is acyclic. |
1210 | 1213 | |
1211 | | For more informations, see |
1212 | | ( http://en.wikipedia.org/wiki/Feedback_vertex_set ) |
| 1214 | `Wikipedia article on Feedback vertex sets |
| 1215 | <http://en.wikipedia.org/wiki/Feedback_vertex_set>`_. |
1213 | 1216 | |
1214 | 1217 | INPUT : |
1215 | 1218 | |
diff --git a/sage/graphs/digraph_generators.py b/sage/graphs/digraph_generators.py
a
|
b
|
|
287 | 287 | In this digraph, there is an arc `w_1w_2` if `w_2` |
288 | 288 | can be obtained from `w_1` by removing the leftmost |
289 | 289 | letter and adding a new letter at its right end. |
290 | | ( more information on this page : |
291 | | http://en.wikipedia.org/wiki/De_Bruijn_graph ) |
| 290 | |
| 291 | `Wikipedia article on the De Bruijn graph |
| 292 | <http://en.wikipedia.org/wiki/De_Bruijn_graph>`_ |
292 | 293 | |
293 | 294 | INPUT: |
294 | 295 | |
diff --git a/sage/graphs/generic_graph.py b/sage/graphs/generic_graph.py
a
|
b
|
|
3028 | 3028 | A minimum edge cut between two vertices `s` and `t` of self |
3029 | 3029 | is a set `A` of edges of minimum weight such that the graph |
3030 | 3030 | obtained by removing `A` from self is disconnected. |
3031 | | ( cf. http://en.wikipedia.org/wiki/Cut_%28graph_theory%29 ) |
| 3031 | |
| 3032 | `Wikipedia article on cuts |
| 3033 | <http://en.wikipedia.org/wiki/Cut_%28graph_theory%29>`_. |
3032 | 3034 | |
3033 | 3035 | INPUT: |
3034 | 3036 | |
… |
… |
|
3153 | 3155 | A vertex cut between two non adjacent vertices is a set `U` |
3154 | 3156 | of vertices of self such that the graph obtained by removing |
3155 | 3157 | `U` from self is disconnected. |
3156 | | ( cf. http://en.wikipedia.org/wiki/Cut_%28graph_theory%29 ) |
| 3158 | |
| 3159 | `Wikipedia article on cuts |
| 3160 | <http://en.wikipedia.org/wiki/Cut_%28graph_theory%29>`_ |
3157 | 3161 | |
3158 | 3162 | |
3159 | 3163 | INPUT: |
… |
… |
|
3265 | 3269 | vertices such that each edge is incident to at least |
3266 | 3270 | one element of `S`, and such that `S` is of minimum |
3267 | 3271 | cardinality. |
3268 | | ( cf. http://en.wikipedia.org/wiki/Vertex_cover ) |
| 3272 | |
| 3273 | `Wikipedia article on vertex cover |
| 3274 | <http://en.wikipedia.org/wiki/Vertex_cover>`_. |
3269 | 3275 | |
3270 | 3276 | Equivalently, a vertex cover is defined as the |
3271 | 3277 | complement of an independent set. |
… |
… |
|
3355 | 3361 | Equivalently, a minimum feedback arc set of a DiGraph is a set |
3356 | 3362 | `S` of arcs such that the digraph `G-S` is acyclic. |
3357 | 3363 | |
3358 | | For more informations, see |
3359 | | ( http://en.wikipedia.org/wiki/Feedback_arc_set ) |
| 3364 | `Wikipedia article on feedback arc sets |
| 3365 | <http://en.wikipedia.org/wiki/Feedback_arc_set>`_. |
3360 | 3366 | |
3361 | 3367 | INPUT : |
3362 | 3368 | |
… |
… |
|
3469 | 3475 | Equivalently, a minimum feedback vertex set of a DiGraph is a set |
3470 | 3476 | `S` of vertices such that the digraph `G-S` is acyclic. |
3471 | 3477 | |
3472 | | For more informations, see |
3473 | | ( http://en.wikipedia.org/wiki/Feedback_vertex_set ) |
| 3478 | `Wikipedia article on Feedback vertex sets |
| 3479 | <http://en.wikipedia.org/wiki/Feedback_vertex_set>`_. |
3474 | 3480 | |
3475 | 3481 | INPUT : |
3476 | 3482 | |
… |
… |
|
3576 | 3582 | def max_cut(self,value_only=True,use_edge_labels=True, vertices=False): |
3577 | 3583 | r""" |
3578 | 3584 | Returns a maximum edge cut of the graph |
3579 | | ( cf. http://en.wikipedia.org/wiki/Cut_%28graph_theory%29 ) |
| 3585 | |
| 3586 | `Wikipedia article on cuts |
| 3587 | <http://en.wikipedia.org/wiki/Cut_%28graph_theory%29>`_. |
3580 | 3588 | |
3581 | 3589 | INPUT: |
3582 | 3590 | |
… |
… |
|
3710 | 3718 | def flow(self,x,y,value_only=True,integer=False, use_edge_labels=True,vertex_bound=False): |
3711 | 3719 | r""" |
3712 | 3720 | Returns a maximum flow in the graph from ``x`` to ``y`` |
3713 | | ( cf. http://en.wikipedia.org/wiki/Max_flow_problem ) |
3714 | 3721 | represented by an optimal valuation of the edges. |
3715 | 3722 | |
| 3723 | `Wikipedia article on flows |
| 3724 | <http://en.wikipedia.org/wiki/Max_flow_problem>`_. |
| 3725 | |
| 3726 | |
3716 | 3727 | As an optimization problem, is can be expressed this way : |
3717 | 3728 | |
3718 | 3729 | .. MATH:: |
… |
… |
|
3971 | 3982 | def matching(self,value_only=False, use_edge_labels=True): |
3972 | 3983 | r""" |
3973 | 3984 | Returns a maximum weighted matching of the graph |
3974 | | ( cf. http://en.wikipedia.org/wiki/Matching ) |
3975 | 3985 | represented by the list of its edges. |
3976 | 3986 | |
| 3987 | `Wikipedia article on matchings |
| 3988 | <http://en.wikipedia.org/wiki/Matching>`_. |
| 3989 | |
| 3990 | |
3977 | 3991 | Given a graph `G` such that each edge `e` has a weight `w_e`, |
3978 | 3992 | a maximum matching is a subset `S` of the edges of `G` of |
3979 | 3993 | maximum weight such that no two edges of `S` are incident |
… |
… |
|
4037 | 4051 | def dominating_set(self, independent=False, value_only=False,log=0): |
4038 | 4052 | r""" |
4039 | 4053 | Returns a minimum dominating set of the graph |
4040 | | ( cf. http://en.wikipedia.org/wiki/Dominating_set ) |
4041 | 4054 | represented by the list of its vertices. |
4042 | 4055 | |
| 4056 | `Wikipedia article on dominating sets |
| 4057 | <http://en.wikipedia.org/wiki/Dominating_set>`_. |
| 4058 | |
4043 | 4059 | A minimum dominating set `S` of a graph `G` is |
4044 | 4060 | a set of its vertices of minimal cardinality such |
4045 | 4061 | that any vertex of `G` is in `S` or has one of its neighbors |
… |
… |
|
4123 | 4139 | def edge_connectivity(self,value_only=True,use_edge_labels=False, vertices=False): |
4124 | 4140 | r""" |
4125 | 4141 | Returns the edge connectivity of the graph |
4126 | | ( cf. http://en.wikipedia.org/wiki/Connectivity_(graph_theory) ) |
| 4142 | |
| 4143 | `Wikipedia article on connectivity |
| 4144 | <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. |
4127 | 4145 | |
4128 | 4146 | INPUT: |
4129 | 4147 | |
… |
… |
|
4315 | 4333 | def vertex_connectivity(self,value_only=True, sets=False): |
4316 | 4334 | r""" |
4317 | 4335 | Returns the vertex connectivity of the graph |
4318 | | ( cf. http://en.wikipedia.org/wiki/Connectivity_(graph_theory) ) |
| 4336 | |
| 4337 | `Wikipedia article on connectivity |
| 4338 | <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. |
4319 | 4339 | |
4320 | 4340 | |
4321 | 4341 | INPUT: |
… |
… |
|
8274 | 8294 | A Lex BFS ( or Lexicographic Breadth-First Search ) is a Breadth |
8275 | 8295 | First Search used for the recognition of Chordal Graphs. |
8276 | 8296 | |
8277 | | More information on this page : |
8278 | | http://en.wikipedia.org/wiki/Lexicographic_breadth-first_search |
| 8297 | `Wikipedia article on Lex-BFS |
| 8298 | <http://en.wikipedia.org/wiki/Lexicographic_breadth-first_search>`_ |
8279 | 8299 | |
8280 | 8300 | INPUT: |
8281 | 8301 | |