Room Coloring

Graph Coloring Algorithm Visualization

Tools

Statistics

0
0
0

What is Room Coloring?

Room coloring is a graph coloring problem where adjacent rooms must have different colors. It has practical applications in scheduling, register allocation, and map coloring. The goal is to color all rooms using the minimum number of colors while ensuring no adjacent rooms share the same color.

How Coloring Works

  • Colors are assigned to rooms one by one
  • Each room must have a different color from its adjacent rooms
  • The algorithm tries to use the minimum number of colors possible
  • If a room can't be colored with existing colors, a new color is used
  • This ensures no two adjacent rooms share the same color

How to Use

  • Click and drag to draw rooms on the canvas
  • Use the eraser tool to remove rooms
  • Generate random room layouts for testing
  • Choose an algorithm and watch it color the rooms

Fun Facts

  • The minimum colors needed is called the chromatic number
  • The Four Color Theorem proves any map needs at most 4 colors
  • Room coloring is NP-hard in its general form
  • Has applications in scheduling and resource allocation

Developed by Team Purrgrammers

Department of Computing Technologies | SRMIST