GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

22
GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy

Transcript of GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

Page 1: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

GRAPH COLORING AND CLASSIFYING TROPICAL

FISH

By

Vennam Chandrasekhar Reddy

Page 2: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

AGENDA

Problem statement

Graph Construction

Relation to graph problem

Special Property

Problem solution

Comments

References

Page 3: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

PROBLEM DEFINITION:

A tropical fish hobbist had six different types of fish: Alphas, Betas, Certas, Deltas, Epsalas and Fetas which are designated by A, B, C, D, E, and F respectively. Because of predator-prey relationships, water conditions, and size only some types of fishes can survive with some other types of fishes in the same tank.

Page 4: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

PROBLEM DEFINITION:

Type A B C D E F

Cannot be with B, C A ,C A, B, D,

E B,C C, F E

The following table gives information about the fishes that cannot be together:

Our task is to arrange the fishes in a minimum number of Tanks.

Page 5: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

GRAPH CONSTRUCTION

• To model the situation, we simply need to construct a graph in which each vertex represents one of the types of fish and each edge connects vertices that are not compatible.

• The graph thus constructed turns out to be an interval graph.

Page 6: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

GRAPH CONSTRUCTION

Vertex : Fish type Edge: Not Compatible A

B

C

D

E

F

Page 7: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

RELATION TO A GRAPH PROBLEM

Set of interval’sD F

B EA

C

1 2 3 4 5 6 7 8 9 10

Page 8: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

RELATION TO A GRAPH PROBLEM

This Real world problem is converted to

“interval graph coloring problem”.

An “interval graph” is the graph showing

intersecting intervals on a line. So, we

associate a set of intervals I={I1,…,In} on a

line with the interval graph G=(V,E),where

V={1,…,n} and two vertices, x and y, are

linked by an edge if and only if Ix∩Iy≠.

Page 9: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

RELATION TO A GRAPH PROBLEM

E(G) = {{vi, vj} | IX ∩ IY ≠ ∅}

From the graph , it is an interval graph

which is an undirected graph formed

from a set of intervals I(1,2….10).

Page 10: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

SPECIAL PROPERTY

Umbrella Free Ordering:

For every interval graph there will be an

Umbrella Free-Ordering it states that,

arranging the vertices in an order such that

if there is an edge between two vertices

then any edge that lies between the two

vertices must be adjacent to the right vertex

in the ordering.

Page 11: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

SPECIAL PROPERTY

An umbrella-free representation of a

graph G is a concatenation (in any order)

of all its connected component umbrella-

free representations.

UF be an umbrella-free representation of

G, the vertices of two distinct connected

components are not interleaved in UF.

Page 12: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

SPECIAL PROPERTY

So ordering of our graph using umbrella-free property is:A,B,D,C,E,F

UMBRELLA FREE-ORDERING

Page 13: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

PROBLEM SOLUTION

In this Umbrella Free-Ordering, we

place the colours in a certain order.

We can now color the vertices. We

start by assigning blue to F, then Red

to E.

Page 14: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

PROBLEM SOLUTION

The C vertex, which is the next to

be colored, can be colored in blue

or other Color because Blue is

already available color, we

choose it for vertex C. We

continue in this way until we

colored the whole graph.

Page 15: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

COLORING USING THE UMBRELLA FREE-ORDERING

D 2 F 1 B 3 E 2A 2

C 1

Page 16: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

PROBLEM SOLUTION

Assigning fishes to tanks, where the

compatibility between fishes is

considered. This problem comes

down to colouring the vertices of an

interval graph under the constraint

that two vertices linked by an edge

cannot be of the same colour.

Page 17: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

PROBLEM SOLUTION

Vertex : Fish type Edge: Not Compatible A

B

C

D

E

F

Page 18: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

PROBLEM SOLUTION

This coloring requires Three colors,

which means we need three tanks to

assign 6 types of fishes.

Blue Tank Red Tank Black Tank

Fetas & Certas Alphas, Deltas & Epsalas

Betas

Page 19: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

PROBLEM SOLUTION

A

B

C

D

E

F

Page 20: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

COMMENTS

If this is not the case i.e: if the fish combinations

are different interval graph is not constructed an

arbitrary graph is constructed

For arbitrary graphs no body knows correct

algorithms to colour those arbitrary graphs.

Page 22: GRAPH COLORING AND CLASSIFYING TROPICAL FISH By Vennam Chandrasekhar Reddy.

REFERENCESTHANK YOU

ANY QUERIES