# HG changeset patch
# User Nathann Cohen
# Date 1250442254 25200
# Node ID 1b2521fe4ca4f38b7ff644c4558b73af7827836c
# Parent 4e9352907c3563eca5880b200169cfd08f7f0aa8
Function Graph.independent_set_of_representatives
diff -r 4e9352907c35 -r 1b2521fe4ca4 sage/graphs/graph.py
--- a/sage/graphs/graph.py Tue Dec 15 17:53:53 2009 +0100
+++ b/sage/graphs/graph.py Sun Aug 16 10:04:14 2009 -0700
@@ -10578,6 +10578,125 @@
else:
raise ValueError("The 'algorithm' keyword must be set to either 'DLX' or 'MILP'.")
+ def independent_set_of_representatives(self,family):
+ r"""
+ Returns an independent set of representatives.
+
+ Given a graph `G` and and a family `F=\{F_i:i\in [1,...,k]\}` of subsets
+ of ``g.vertices()``, an ISR ( Independent Set of Reprersentatives ) is an
+ assignation of a vertex `v_i\in F_i` to each set `F_i` such that
+ `v_i != v_j` if `i