Skip to content

Coloring the nodes of the graph such that they satisfy Four Color Theorem using Flood Fill algorithm

Notifications You must be signed in to change notification settings

anushk4/4_color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Four Color Theorem

The python code uses the Breadth First Search algorithm twice to find out the color of the marginal points and all the points within a single node and colors it according to the Four Color Theorem which says given any separation of the plane into contiguous regions, called a "map," the regions can be colored using at most four colors so that no two adjacent regions have the same color

Requirements

  • Python IDLE
  • Code editor
  • Matplotlib library
  • Tkinter library

Running the code

  • Run the python code using the run button or F5
  • A prompt will be generated. Enter the file name which contains the test case for the graph
  • Click on Generate Graph button to generate the graph.

Important notes for running

  • The test case file should be included within the test_cases directory only for it to be read successfully by the application.
  • Each node is represented by a cluster of numbers. Refer to sample test cases in the test_cases directory to generate your own test case.
  • The test case should be in a rectangular or square form only.

About

Coloring the nodes of the graph such that they satisfy Four Color Theorem using Flood Fill algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages