In this question, we use [3] to denote {1,2,3}.
Let G be a simple undirected finite graph. A function f:V(G)→[3] is called a proper 3-coloring of G if no two adjacent vertices in G have the same image under f. You can imagine f coloring the vertices of the graph with colors 1, 2, and 3 (all vertices that have image 1 under f are 'colored' 1, and so on); and such a coloring is proper if and only if there are no edges between vertices that have the same color.
In this question, we will explore ideas involving building up a DP-based solution for this problem for graphs of bounded treewidth using nice tree decompositions.
Let T(T,{Xt}t∈V(T)) be a rooted nice tree decomposition of G. For every node t∈V(T), let Tt denote the subtree of T rooted at t.
For every node x∈V(T) and every function χ:Xx→[3], let f(x,χ) be defined as follows:
f(x,χ):=TRUE if there exists a function σ:⋃β∈V(Tx)Xβ→[3] such that
- ∀u∈Xx: (χ(u)=σ(u))
- No two adjacent vertices in G[⋃β∈V(Tx)Xβ] have the same image under σ.
Otherwise, f(x,χ):=FALSE.
The intuition for these definitions is the following. Fix a node x∈V(T). Then χ describes a 3-coloring of the vertices in the bag Xx, which is not necessarily a proper 3-coloring. The function f(x,χ) describes if χ can be extended to a proper 3-coloring of the vertices in the subtree of T rooted at x.
Now, let v∈V(G). Let a,b∈V(T) such that v is introduced at a, and b is the child of a.
Let θ:Xa→[3] be a function such that
∀y∈Xa∩NG(v):(θ(y)=θ(v))
In other words, θ is a three-coloring of Xa which ensures that the color of v is different from the color of any of its neighbors in Xa.
Let θ′:Xb→[3] be defined as follows:
∀y∈Xb:θ′(y):=θ(y)
Note that Xb=Xa∪{v} and thus θ′ is simply the projection of θ on Xb.
Let w∈V(G). Let c,d∈V(T) such that w is forgotten at c, and d is the child of c.
In other words, Xc=Xd∖{w}.
Let ψ:Xc→[3] be a function. For every i∈[3], let ψi′:Xd→[3] be defined as follows:
∀y∈Xd∖{w}:ψi′(y):=ψ(y)ψi′(w):=i
To explain this, assume that ψ is a given 3-coloring of the parent node Xc. Now we define three colorings that extend ψ in the child node Xd. For a fixed color i∈[3], we are coloring every vertex in Xd other than w in the same way that it was colored in Xc under ψ, and we are coloring w with color i.
Let e,g,h∈V(T) such that e is a join node, and g and h are the children of e, and let λ:Xe→[3].
Based on the above data, answer the given subquestions.