0% found this document useful (0 votes)
197 views11 pages

DAA Presentation Greedy Aproch of Coloring

This document describes the greedy approach for graph coloring. It discusses that the greedy coloring algorithm considers vertices in sequence and assigns each the first available color so that no adjacent vertices have the same color. It provides the steps of the algorithm which are to initially color the first vertex with the first color and then consider the remaining uncolored vertices, coloring each with the lowest numbered color not used by its adjacent vertices. An example graph is shown and colored using this greedy approach. Applications of graph coloring discussed include scheduling, frequency assignment, register allocation, and map coloring.

Uploaded by

Zahra Batool
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
197 views11 pages

DAA Presentation Greedy Aproch of Coloring

This document describes the greedy approach for graph coloring. It discusses that the greedy coloring algorithm considers vertices in sequence and assigns each the first available color so that no adjacent vertices have the same color. It provides the steps of the algorithm which are to initially color the first vertex with the first color and then consider the remaining uncolored vertices, coloring each with the lowest numbered color not used by its adjacent vertices. An example graph is shown and colored using this greedy approach. Applications of graph coloring discussed include scheduling, frequency assignment, register allocation, and map coloring.

Uploaded by

Zahra Batool
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 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