3. m colouring problem in backtracking
• given un directed graph and a number M,determine if the
graph can be colured with at most m colours such that no
of two adjacent vertices of the graph are coloured with
same colour
• the graph colouring problem is to discover in such way that
no of two adjacent nodes have the same colour yet only m
colours are used
• this graph is also known as M-colorability decision
problems
4. in a given graph pssible colours are
m=2 m={green,and blue}
we have
two types of solution in
this small graph
5. i have taken threecolours green,yellow,
possible four solutions
green,yellow, ,yellow
,green, ,yellow
green, ,green,yellow,
,yellow,green
7. • The M – colorability optimization problem deals with the smallest
integer m for which the graph G can be colored.
• The integer is known as a chromatic number of the graph.
• The least possible value of 'm' required to color the graph
successfully is known as the chromatic number of the given graph.
• to find the chromaic number using the graph how many colurs are
used
8.
9. time coplexity and space complexity
• time complexity o(m^v)
• There is a total o(m^v)combination of colours
so the time complexity is o(m^v)
• space complexity o(v)
• recursive stckof graph colouring function will require
o(v) space