SLIDE 1 Detecting a Machine Failure in a Network, a.k.a. Vertex Identifying Codes
Daniel W. Cranston
Virginia Commonwealth University dcranston@vcu.edu Joint with Gexin Yu Applications of Graph Theory Joint Math Meetings, San Francisco 13 January 2010
SLIDE 2
Definitions and Motivation
=
SLIDE 3
Definitions and Motivation
=
Goal: put sensors in the network to detect which machine failed
SLIDE 4
Definitions and Motivation
= =
+
Goal: put sensors in the network to detect which machine failed
SLIDE 5
Definitions and Motivation
= =
+
Goal: put sensors in the network to detect which machine failed
SLIDE 6
Definitions and Motivation
= =
+
Bad Solution: too much $$$ and bandwidth Goal: put sensors in the network to detect which machine failed
SLIDE 7
Definitions and Motivation
= =
+
Bad Solution: too much $$$ and bandwidth Goal: put sensors in the network to detect which machine failed Assumptions: - machines fail one at a time
SLIDE 8 Definitions and Motivation
= =
+
Bad Solution: too much $$$ and bandwidth Goal: put sensors in the network to detect which machine failed Assumptions: - machines fail one at a time
- each sensor only sends one bit
SLIDE 9 Definitions and Motivation
= =
+
Bad Solution: too much $$$ and bandwidth Goal: put sensors in the network to detect which machine failed Assumptions: - machines fail one at a time
- each sensor only sends one bit
- a sensor at v can see v and its neighbors
SLIDE 10 Definitions and Motivation
= =
+
Bad Solution: too much $$$ and bandwidth Goal: put sensors in the network to detect which machine failed Assumptions: - machines fail one at a time
- each sensor only sends one bit
- a sensor at v can see v and its neighbors
Find a subset C ⊂ V (G) s.t. for all v ∈ V (G) N[v] ∩ C = ∅ and ∀u, v ∈ V (G) if u = v then N[u] ∩ C = N[v] ∩ C.
SLIDE 11 Definitions and Motivation
= =
+
Bad Solution: too much $$$ and bandwidth Goal: put sensors in the network to detect which machine failed Assumptions: - machines fail one at a time
- each sensor only sends one bit
- a sensor at v can see v and its neighbors
Find a subset C ⊂ V (G) s.t. for all v ∈ V (G) N[v] ∩ C = ∅ and ∀u, v ∈ V (G) if u = v then N[u] ∩ C = N[v] ∩ C. Definition: We call such a set C a (vertex identifying) code.
SLIDE 12
Codes: Examples and Non-examples
SLIDE 13
Codes: Examples and Non-examples
SLIDE 14
Codes: Examples and Non-examples
SLIDE 15
Codes: Examples and Non-examples
SLIDE 16
Codes: Examples and Non-examples
SLIDE 17
Codes: Examples and Non-examples
SLIDE 18
Codes: Examples and Non-examples
SLIDE 19 Codes: Examples and Non-examples
2 3 4
SLIDE 20 Codes: Examples and Non-examples
2 3 4 1 : {2}
SLIDE 21 Codes: Examples and Non-examples
2 3 4 1 : {2} 2 : {2, 3}
SLIDE 22 Codes: Examples and Non-examples
2 3 4 1 : {2} 2 : {2, 3} 3 : {2, 3, 4}
SLIDE 23 Codes: Examples and Non-examples
2 3 4 1 : {2} 2 : {2, 3} 3 : {2, 3, 4} 4 : {3, 4}
SLIDE 24 Codes: Examples and Non-examples
2 3 4 1 : {2} 2 : {2, 3} 3 : {2, 3, 4} 4 : {3, 4}
SLIDE 25 Codes: Examples and Non-examples
2 3 4 1 : {2} 2 : {2, 3} 3 : {2, 3, 4} 4 : {3, 4}
SLIDE 26 Codes: Examples and Non-examples
2 3 4 1 : {2} 2 : {2, 3} 3 : {2, 3, 4} 4 : {3, 4}
SLIDE 27 Codes: Examples and Non-examples
2 3 4 1 : {2} 2 : {2, 3} 3 : {2, 3, 4} 4 : {3, 4}
SLIDE 28 Codes: Examples and Non-examples
2 3 4 1 : {2} 2 : {2, 3} 3 : {2, 3, 4} 4 : {3, 4} Observation: Every path has a code.
SLIDE 29
Finding the Right Problem
SLIDE 30
Finding the Right Problem
SLIDE 31
Finding the Right Problem
G ′ G ′
SLIDE 32
Finding the Right Problem
G ′ G ′ Difficulty:
SLIDE 33
Finding the Right Problem
u v u v G ′ u v G ′ Difficulty: N[u] = N[v], so for any C we get N[u] ∩ C = N[v] ∩ C.
SLIDE 34
Finding the Right Problem
u v u v G ′ u v G ′ Difficulty: N[u] = N[v], so for any C we get N[u] ∩ C = N[v] ∩ C. Observation: G has a code iff for all u = v we have N[u] = N[v].
SLIDE 35
Finding the Right Problem
u v u v G ′ u v G ′ Difficulty: N[u] = N[v], so for any C we get N[u] ∩ C = N[v] ∩ C. Observation: G has a code iff for all u = v we have N[u] = N[v]. Definition: We call such a graph twin-free.
SLIDE 36
Finding the Right Problem
u v u v G ′ u v G ′ Difficulty: N[u] = N[v], so for any C we get N[u] ∩ C = N[v] ∩ C. Observation: G has a code iff for all u = v we have N[u] = N[v]. Definition: We call such a graph twin-free. New problem: If G is twin-free, find a smallest code.
SLIDE 37
Finding the Right Problem
u v u v G ′ u v G ′ Difficulty: N[u] = N[v], so for any C we get N[u] ∩ C = N[v] ∩ C. Observation: G has a code iff for all u = v we have N[u] = N[v]. Definition: We call such a graph twin-free. New problem: If G is twin-free, find a smallest code.
SLIDE 38 Finding the Right Problem
u v u v G ′ u v G ′ Difficulty: N[u] = N[v], so for any C we get N[u] ∩ C = N[v] ∩ C. Observation: G has a code iff for all u = v we have N[u] = N[v]. Definition: We call such a graph twin-free. New problem: If G is twin-free, find a smallest code.
- Exer. Show that min size of code for path on k nodes is
k+1
2
SLIDE 39
Infinite Graphs
SLIDE 40
Infinite Graphs
We need the following properties:
SLIDE 41 Infinite Graphs
We need the following properties:
◮ twin-free
SLIDE 42 Infinite Graphs
We need the following properties:
◮ twin-free ◮ locally finite (every vertex has finite degree)
SLIDE 43 Infinite Graphs
We need the following properties:
◮ twin-free ◮ locally finite (every vertex has finite degree) ◮ vertex transitive (graph looks the same from every vertex)
SLIDE 44 Infinite Graphs
We need the following properties:
◮ twin-free ◮ locally finite (every vertex has finite degree) ◮ vertex transitive (graph looks the same from every vertex)
Ex. V (GZ) = Z and u ↔ v if |u − v| = 1
SLIDE 45 Infinite Graphs
We need the following properties:
◮ twin-free ◮ locally finite (every vertex has finite degree) ◮ vertex transitive (graph looks the same from every vertex)
Ex. V (GZ) = Z and u ↔ v if |u − v| = 1 (infinite path)
SLIDE 46 Infinite Graphs
We need the following properties:
◮ twin-free ◮ locally finite (every vertex has finite degree) ◮ vertex transitive (graph looks the same from every vertex)
Ex. V (GZ) = Z and u ↔ v if |u − v| = 1 (infinite path)
SLIDE 47 Infinite Graphs
We need the following properties:
◮ twin-free ◮ locally finite (every vertex has finite degree) ◮ vertex transitive (graph looks the same from every vertex)
Ex. V (GZ) = Z and u ↔ v if |u − v| = 1 (infinite path)
SLIDE 48 Infinite Graphs
We need the following properties:
◮ twin-free ◮ locally finite (every vertex has finite degree) ◮ vertex transitive (graph looks the same from every vertex)
Ex. V (GZ) = Z and u ↔ v if |u − v| = 1 (infinite path)
SLIDE 49 Infinite Graphs
We need the following properties:
◮ twin-free ◮ locally finite (every vertex has finite degree) ◮ vertex transitive (graph looks the same from every vertex)
Ex. V (GZ) = Z and u ↔ v if |u − v| = 1 (infinite path) Definition: Rather than the smallest size code, we want the lowest density (fraction) code.
SLIDE 50 Infinite Graphs
We need the following properties:
◮ twin-free ◮ locally finite (every vertex has finite degree) ◮ vertex transitive (graph looks the same from every vertex)
Ex. V (GZ) = Z and u ↔ v if |u − v| = 1 (infinite path) Definition: Rather than the smallest size code, we want the lowest density (fraction) code. We call this the density of G, τ(G).
SLIDE 51 Infinite Graphs
We need the following properties:
◮ twin-free ◮ locally finite (every vertex has finite degree) ◮ vertex transitive (graph looks the same from every vertex)
Ex. V (GZ) = Z and u ↔ v if |u − v| = 1 (infinite path) Definition: Rather than the smallest size code, we want the lowest density (fraction) code. We call this the density of G, τ(G). Question: What is τ(GZ)?
SLIDE 52
Proving a Lower Bound (sketch)
SLIDE 53
Proving a Lower Bound (sketch)
Forget infinite for now.
SLIDE 54
Proving a Lower Bound (sketch)
Forget infinite for now. Suppose C is a code for G.
SLIDE 55
Proving a Lower Bound (sketch)
Forget infinite for now. Suppose C is a code for G. Put a cake at each v ∈ C and redistribute so each u ∈ V (G) gets at least k cake. (0 < k < 1)
SLIDE 56
Proving a Lower Bound (sketch)
Forget infinite for now. Suppose C is a code for G. Put a cake at each v ∈ C and redistribute so each u ∈ V (G) gets at least k cake. (0 < k < 1) Thus k|V (G)| ≤ |C|.
SLIDE 57 Proving a Lower Bound (sketch)
Forget infinite for now. Suppose C is a code for G. Put a cake at each v ∈ C and redistribute so each u ∈ V (G) gets at least k cake. (0 < k < 1) Thus k|V (G)| ≤ |C|. Hence, k ≤
|C| |V (G)| = τ(G).
SLIDE 58 Proving a Lower Bound (sketch)
Forget infinite for now. Suppose C is a code for G. Put a cake at each v ∈ C and redistribute so each u ∈ V (G) gets at least k cake. (0 < k < 1) Thus k|V (G)| ≤ |C|. Hence, k ≤
|C| |V (G)| = τ(G).
1 1 1
SLIDE 59 Proving a Lower Bound (sketch)
Forget infinite for now. Suppose C is a code for G. Put a cake at each v ∈ C and redistribute so each u ∈ V (G) gets at least k cake. (0 < k < 1) Thus k|V (G)| ≤ |C|. Hence, k ≤
|C| |V (G)| = τ(G).
1 1 1 → ← → ←
SLIDE 60 Proving a Lower Bound (sketch)
Forget infinite for now. Suppose C is a code for G. Put a cake at each v ∈ C and redistribute so each u ∈ V (G) gets at least k cake. (0 < k < 1) Thus k|V (G)| ≤ |C|. Hence, k ≤
|C| |V (G)| = τ(G).
1 1 1 → ← → ← 3/4 1/2 1/2 1/2 3/4
SLIDE 61 Proving a Lower Bound (sketch)
Forget infinite for now. Suppose C is a code for G. Put a cake at each v ∈ C and redistribute so each u ∈ V (G) gets at least k cake. (0 < k < 1) Thus k|V (G)| ≤ |C|. Hence, k ≤
|C| |V (G)| = τ(G).
1 1 1 → ← → ← 3/4 1/2 1/2 1/2 3/4
1 2 ≤ τ(P5) = 3 5
SLIDE 62 Proving a Lower Bound (sketch)
Forget infinite for now. Suppose C is a code for G. Put a cake at each v ∈ C and redistribute so each u ∈ V (G) gets at least k cake. (0 < k < 1) Thus k|V (G)| ≤ |C|. Hence, k ≤
|C| |V (G)| = τ(G).
1 1 1 → ← → ← 3/4 1/2 1/2 1/2 3/4
1 2 ≤ τ(P5) = 3 5
Observation: The same idea works for infinite graphs.
SLIDE 63 Proving a Lower Bound (sketch)
Forget infinite for now. Suppose C is a code for G. Put a cake at each v ∈ C and redistribute so each u ∈ V (G) gets at least k cake. (0 < k < 1) Thus k|V (G)| ≤ |C|. Hence, k ≤
|C| |V (G)| = τ(G).
1 1 1 → ← → ← 3/4 1/2 1/2 1/2 3/4
1 2 ≤ τ(P5) = 3 5
Observation: The same idea works for infinite graphs. Question: How should we share the cake?
SLIDE 64 Proving a Lower Bound (sketch)
Forget infinite for now. Suppose C is a code for G. Put a cake at each v ∈ C and redistribute so each u ∈ V (G) gets at least k cake. (0 < k < 1) Thus k|V (G)| ≤ |C|. Hence, k ≤
|C| |V (G)| = τ(G).
1 1 1 → ← → ← 3/4 1/2 1/2 1/2 3/4
1 2 ≤ τ(P5) = 3 5
Observation: The same idea works for infinite graphs. Question: How should we share the cake? Question: How much cake can each vertex have?
SLIDE 65
Proving a Lower Bound (real proof)
SLIDE 66 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C.
SLIDE 67 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
SLIDE 68 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
SLIDE 69 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C:
SLIDE 70 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5
SLIDE 71 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster:
SLIDE 72 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5.
SLIDE 73 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5. ◮ v in a 3+-cluster:
SLIDE 74 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5. ◮ v in a 3+-cluster:
◮ v has 3 neighbors in cluster:
SLIDE 75 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5. ◮ v in a 3+-cluster:
◮ v has 3 neighbors in cluster: 1 − 0 = 1
SLIDE 76 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5. ◮ v in a 3+-cluster:
◮ v has 3 neighbors in cluster: 1 − 0 = 1 ◮ v has 2 neighbors in cluster:
SLIDE 77 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5. ◮ v in a 3+-cluster:
◮ v has 3 neighbors in cluster: 1 − 0 = 1 ◮ v has 2 neighbors in cluster: 1 − 1( 2
5) = 3 5
SLIDE 78 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5. ◮ v in a 3+-cluster:
◮ v has 3 neighbors in cluster: 1 − 0 = 1 ◮ v has 2 neighbors in cluster: 1 − 1( 2
5) = 3 5
◮ v has 1 neighbor in cluster:
SLIDE 79 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5. ◮ v in a 3+-cluster:
◮ v has 3 neighbors in cluster: 1 − 0 = 1 ◮ v has 2 neighbors in cluster: 1 − 1( 2
5) = 3 5
◮ v has 1 neighbor in cluster: 1 − 2( 2
5) = 1 5
SLIDE 80 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5. ◮ v in a 3+-cluster:
◮ v has 3 neighbors in cluster: 1 − 0 = 1 ◮ v has 2 neighbors in cluster: 1 − 1( 2
5) = 3 5
◮ v has 1 neighbor in cluster: 1 − 2( 2
5) = 1 5
1 − 2
5 − 1 5 = 2 5
SLIDE 81 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5. ◮ v in a 3+-cluster:
◮ v has 3 neighbors in cluster: 1 − 0 = 1 ◮ v has 2 neighbors in cluster: 1 − 1( 2
5) = 3 5
◮ v has 1 neighbor in cluster: 1 − 2( 2
5) = 1 5
1 − 2
5 − 1 5 = 2 5
Question: Can we do better?
SLIDE 82 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5. ◮ v in a 3+-cluster:
◮ v has 3 neighbors in cluster: 1 − 0 = 1 ◮ v has 2 neighbors in cluster: 1 − 1( 2
5) = 3 5
◮ v has 1 neighbor in cluster: 1 − 2( 2
5) = 1 5
1 − 2
5 − 1 5 = 2 5
Question: Can we do better? Theorem: For the hex grid, τ ≥ 12
29.
SLIDE 83 Proving a Lower Bound (real proof)
Theorem: For the hex grid, τ ≥ 2
5.
- Proof. Each vertex in C gives
2 5k cake to
each neighbor not in C that has k neighbors in C. We must show that each vertex v gets at least 2
5 of a cake.
We consider cases, based on what size cluster contains v.
◮ v /
∈ C: k( 2
5k ) = 2 5 ◮ v in a 1-cluster: 1 − 3( 2 5(2)) = 2 5. ◮ v in a 3+-cluster:
◮ v has 3 neighbors in cluster: 1 − 0 = 1 ◮ v has 2 neighbors in cluster: 1 − 1( 2
5) = 3 5
◮ v has 1 neighbor in cluster: 1 − 2( 2
5) = 1 5
1 − 2
5 − 1 5 = 2 5
Question: Can we do better? Theorem: For the hex grid, τ ≥ 12
5 = 12 30 and 3 7 = 12 28)
SLIDE 84
τ(G) for the Hex Grid
How to check if C is a code for the Hex Grid:
SLIDE 85
τ(G) for the Hex Grid
How to check if C is a code for the Hex Grid:
SLIDE 86 τ(G) for the Hex Grid
How to check if C is a code for the Hex Grid:
◮ For all v ∈ V (G), we need N[v] ∩ C = ∅.
SLIDE 87 τ(G) for the Hex Grid
How to check if C is a code for the Hex Grid:
◮ For all v ∈ V (G), we need N[v] ∩ C = ∅. ◮ For all v ∈ C, there is at most one u s.t. N[u] ∩ C = {v}.
SLIDE 88 τ(G) for the Hex Grid
How to check if C is a code for the Hex Grid:
◮ For all v ∈ V (G), we need N[v] ∩ C = ∅. ◮ For all v ∈ C, there is at most one u s.t. N[u] ∩ C = {v}. ◮ C has no 2-clusters.
SLIDE 89 τ(G) for the Hex Grid
How to check if C is a code for the Hex Grid:
◮ For all v ∈ V (G), we need N[v] ∩ C = ∅. ◮ For all v ∈ C, there is at most one u s.t. N[u] ∩ C = {v}. ◮ C has no 2-clusters.
SLIDE 90 τ(G) for the Hex Grid
How to check if C is a code for the Hex Grid:
◮ For all v ∈ V (G), we need N[v] ∩ C = ∅. ◮ For all v ∈ C, there is at most one u s.t. N[u] ∩ C = {v}. ◮ C has no 2-clusters.