Skip to content

C++ console app that demonstrates a map colouring such that regions with a common border have different colors.Uses a greedy algorithm to visualize coloring of maps & demonstrate solution to graph coloring problem..

Notifications You must be signed in to change notification settings

xvisierra/mapcoloring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Mapcoloring

Aim : Color a map such that two regions with a common border are assigned different

Each map can be represented by a graph. Each region of the map is represented by a vertex. Edges connect two vertices if the regions represented by these vertices have a common border.

Algorithm : Greedy approach

Input: graph G (V, E). Output: Colored Graph with the number of colors. Step 1: Assign an order to the set of colors. Step 2: Considering the first vertex in the vertex order, assign to it the first color. Step 3: Considering the next vertex, assign to it the lowest-ordered color that has not already been assigned to a vertex adjacent to it. Step 4: Repeat step 3 until the graph is colored.

Screenshots

alt text alt text alt text

About

C++ console app that demonstrates a map colouring such that regions with a common border have different colors.Uses a greedy algorithm to visualize coloring of maps & demonstrate solution to graph coloring problem..

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages