
























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

























































We define a k-coloring of a graph:
Each node gets colored with one color At most k different colors are used
If two nodes have an edge between them they must have different colors
A graph is called k-colorable if and only if it has a k-coloring
Is Gadget 2-colorable? No, it contains a triangle
Else, output an odd cycle
Alternate coloring algorithm:
To 2-color a connected graph G, pick an arbitrary node v, and color it white Color all v’s neighbors black Color all their uncolored neighbors white, and so on If the algorithm terminates without a color conflict, output the 2-coloring
Theorem: G contains an odd cycle if and only if G is not 2-colorable
Theorem: G contains an odd cycle if and only if G is not 2-colorable
Try out all 3 n^ colorings until you determine if G has a 3-coloring
3-Colorability Search Oracle
NO, or
YES here is how: gives 3-coloring of the nodes
3-Colorability Decision Oracle
3-Colorability Search Oracle
How do I turn a mere decision oracle into a search oracle? GIVEN: 3-Colorability Decision Oracle
What if I gave the oracle partial colorings of G? For each partial coloring of G, I could pick an uncolored node and try different colors on it until the oracle says “YES”
3-Colorability Decision Oracle
Set