Graph colouring: Difference between revisions

Content added Content deleted
(New draft task with python example.)
 
(Fix Ex2)
Line 39: Line 39:


;[[wp:Greedy coloring|Graph colouring]] task:
;[[wp:Greedy coloring|Graph colouring]] task:
Colour the vertices of a given graph so that no edge is betwaen verticies of
Colour the vertices of a given graph so that no edge is between verticies of
the same colour.
the same colour.


Line 66: Line 66:
The wp articles left-side graph
The wp articles left-side graph


1-6 1-7 1-8 2-5 2-7 2-8 3-5 3-6 3-8 4-5 4-6 4-8
1-6 1-7 1-8 2-5 2-7 2-8 3-5 3-6 3-8 4-5 4-6 4-7


<pre>
<pre>
Line 73: Line 73:
| |
| |
| +---+ |
| +---+ |
| +---------------- | 3 | ------+----+
| +-----------------| 3 | ------+----+
| | +---+ | |
| | +---+ | |
| | | | |
| | | | |
Line 79: Line 79:
| | | | |
| | | | |
| +---+ +---+ +---+ +---+ |
| +---+ +---+ +---+ +---+ |
+- | | --- | 1 | --- | 6 | --- | 4 | |
| | 8 | --- | 1 | --- | 6 | --- | 4 | |
| | +---+ +---+ +---+ |
| +---+ +---+ +---+ +---+ |
| | | | |
| | | | |
| 8 | | | |
| | | | |
| | | | |
| | | | |
| | +---+ +---+ +---+ |
| | +---+ +---+ +---+ |
| | | 7 | --- | 2 | --- | 5 | -+
+----+------ | 7 | --- | 2 | --- | 5 | -+
+---+ +---+ +---+ +---+
| +---+ +---+ +---+
| |
| |
+-------------------+
+-------------------+