DAA Presentation Greedy Aproch of Coloring

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 11

Greedy Approach

for
Graph Coloring
Group Members
Zahra Batool 091
Laraib Hussain 118
Title and content layout
Introduction
Greedy coloring
Steps
Example
Applications
Introduction
Greedy Approach for Graph coloring
A greedy coloring or sequential coloring is a coloring of the vertices
of a graph  formed by a greedy algorithm that considers the vertices
of the graph in sequence and assigns each vertex its first available
color.
Greedy Approach for coloring
Vertex coloring is the most common graph coloring problem .the problem is
given m colors ,find a way of coloring the vertices of the graph such that no
two adjacent vertices are colored using same color

1 2

4 5
Chromatic Number: The smallest number of colors needed to color a graph
G is called its chromatic number. For example, the following can be colored
minimum 3 colors.
Steps
 Color first vertex with first color.
 Do following for remaining V-1 vertices.
 Consider the currently picked vertex and color it with the
lowest numbered color that has not been used on any previously
colored vertices adjacent to it. If all previously used colors
appear on vertices adjacent to v, assign a new color to it.
Graph :
1

0 3 4

2
Step 1:
 Assign the 1st color to the 1st vertex
 Initialize the remaining as unassigned .
 Move to the next vertex
1
0 3 4

2
1
0 3 4
2
Step 2:
 Now compare it with its neighbors
 Assign the color to the neighboring vertices.
 But no two adjacent vertices should have the same color.
1
0 3 4

2
Example 2:
1 2 3 1 2 3

1: 2:
4 5 6
4 5 6

7 8 9 7 8 9

1 2 3 1 2 3

3: 4:
4 5 6 4 5 6

7 8 9 7 8 9
Applications :
 Making Schedule or Time Table
 Mobile Radio Frequency Assignment
 Register Allocation
 Bipartite Graphs
 Map Coloring
Thank you

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy