I need to write a program with content:

Colored plane graphs. Tell people what I know. I always code for the study.

Thanks

please send me mail: khacthuy.3k@gma il.com

I come from VietNamese

-----------------------------------------------------------------

Algorithm colored graphs

Input: graph G = (V, E).

Output: graph G = (V, E) is the peak has been assigned color.

Steps:

1 / Make a list of the top of the graph E ': = [v1, v2, ..., vn] is arranged in order bacgiam order: d (v1) ≥ d (v2) ≥ ... ≥ d (vn)

Set i: = 1;

2 / Highlight the top of the first i in the list. Browse the top of the next turn and shown for the top i do not have adjacent vertices colored i.

3 / If all the vertices have been shown the end, the graph shown in i color. Conversely, to step 4

4 / remove from E 'was the top highlight. Rearrange the vertices in E 'in order of descending rank.

Set i: = i + 1 and return to step 2