I. The "Node Labeling Problem"
Let G = (V, E) be an undirected graph. For every node v ∈ V and every non-negative integer h ≥ 0, let N(v, h) ⊆ V be the set of nodes in G that are at most h hops away from v (including v itself). That is, if we use d(u, v) to denote the minimum distance from u to v (measured by the number of edges in the shortest path between them), then
N(v, h) ≜ {u ∈ V | d(u, v) ≤ h}.
Let K = {0, 1, …, k - 1} be a set of k integers, where k ≤ |V|. For each node v ∈ V, we will assign an integer c(v) ∈ K to v, and call c(v) the "label of v". (Different nodes may get the same label.) The set of distinct labels within h hops from v is denoted by C(v, h), namely,
C(v, h) ≜ {c(u) | u ∈ N(v, h)}.
Note that since different nodes may be assigned the same label, in general we have |C(v, h)| ≤ |N(v, h)|.
A labelling of the nodes (namely, the assignment of one label to each node) is called "valid" if every label in K is assigned to at least one node in G. For every node v ∈ V, let r(v) be the smallest integer such that |C(v, r(v))| = k, namely,
r(v) ≜ min{h | |C(v, h)| = k}.
In other words, r(v) is the smallest integer such that the node v can find all the k distinct labels within its neighborhood of radius r(v). Similarly, let m(v) be the smallest integer such that |N(v, m(v))| ≥ k, namely,
m(v) ≜ min{h | |N(v, h)| ≥ k}.
In other words, m(v) is the smallest integer such that the node v has at least k nodes in its neighborhood of radius m(v) (including v itself). Since every node has exactly one label, we have
r(v) ≥ m(v).
Let us first define a ‐Node-Labelling Decision Problem":
Node-Labelling Decision Problem
Input: We have the following inputs:
1) An undirected graph G = (V, E).
2) A set of k labels K = {0, 1, …, k - 1}, where k ≤ |V|.
3) A non-negative integer R.
Question: does there exist a labeling that assigns a label c(v) ∈ K to every node v ∈ V, such that for every node v ∈ V we have |C(v, R)| = k (namely, every node can find all the k distinct labels within a neighborhood of radius R)?
Two examples of the Node-Labelling Decision Problem are shown in Fig. 1.
Let us now consider the node labeling problem as an optimization problem. We would like to assign labels to nodes such that for every node v ∈ V, r(v) is as small as possible. Since m(v) is a lower bound of r(v), we would like the ratio r(v)/m(v) to be as small as possible. So we define a "Node-Labelling Optimization Problem" as follows.
Node-Labelling Optimization Problem
Input: We have the following inputs:
1) An undirected graph G = (V, E).
2) A set of k labels K = {0, 1, …, k - 1}, where k ≤ |V|.
Output: A valid labelling that assigns a label c(v) ∈ K to every node v ∈ V, such that the maximum ratio
max_{v∈V} (r(v)/m(v))
is minimized.
Given a deterministic algorithm for the "Node-Labelling Optimization Problem", if the algorithm has
max_{v∈V} (r(v)/m(v)) ≤ ρ
for all possible instances, we call the algorithm a "ρ-proximity algorithm", and call ρ the "proximity ratio" of the algorithm. (Here "proximity ratio" is similar to the concept of "approximation ratio" that we have learned in class.)
In this project, we will need to:
1) Prove that the "Node-Labelling Decision Problem" is NP-complete.
2) Design a polynomial-time algorithm for a special case of the "Node-Labelling Optimization Problem" – where the graph G = (V, E) is a tree – with a "proximity ratio" that is as small as possible.
II. What to Submit
In this project, you need to submit three items: (1) a report for NP-completeness proof and algorithm design, (2) a program that implements your algorithm, (3) output of your program on test instances.