Coloring a graph using Depth first traversal -


i know coloring graph nodes, backtracking/brute force common solution. wondering if using dfs can achieve solution ?

backtracking gives opportunity go , try other color possibility in order paint nodes n colors

dfs start 1 node , color it, jump neighbor , color in different color neighbors etc ...

i did search using method didn't find algorithm uses this.

question: using dfs possible coloring graph nodes. if yes, more efficient backtracking ?

thank you

i believe there confusion when comparing backtracking , dfs wrt vertex coloring. dfs traversal graph gives full enumeration of vertices in sequence related structure. not, however, constitute full enumeration vertex coloring problem, require taking account possible colors of vertices.

thus, if understand correctly, have implemented greedy heuristic coloring graph directed dfs. on other hand, backtracking/brute force solution name (such [randall-brown 72]) provide exact solution minimum coloring problem since considers every possible vertex coloring. note dfs traversal used sort vertices (topological sort) , feed order exact solver.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -