Subdivided graphs as isometric subgraphs of Hamming
graphs
Laurent Beaudou, Sylvain Gravier, Kahina Meslem
To cite this version:
Laurent Beaudou, Sylvain Gravier, Kahina Meslem. Subdivided graphs as isometric subgraphs
of Hamming graphs. European Journal of Combinatorics, Elsevier, 2009, 30, pp.1062–1070.
10.1016/j.ejc.2008.09.011. hal-00192300
HAL Id: hal-00192300
https://hal.archives-ouvertes.fr/hal-00192300
Submitted on 27 Nov 2007
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d’enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.
Institut Fourier
Institut Fourier
Unité Mixte de Recherche 5582
CNRS – Université Joseph Fourier
Subdivided graphs
as isometric subgraphs of Hamming graphs
Laurent Beaudou, Sylvain Gravier
and Kahina Meslem
10 October 2007
Subdivided graphs
as isometric subgraphs of Hamming graphs
Laurent Beaudou, Sylvain Gravier
and Kahina Meslem
Institut Fourier
UMR 5582
CNRS – Université Joseph Fourier
Institut Fourier
100, rue des Maths
38402 St-Martin d’Hères – FRANCE
[email protected]
[email protected]
kahina
[email protected]
Abstract/Résumé
It is proven that given G a subdivision of a clique Kn (n ≥ 1), G is isometrically
embeddable in a Hamming graph if and only if G is a partial cube or G = Kn .
The characterization for subdivided wheels is also obtained.
Keywords: isometric embeddings, subdivided graph, partial cube, Hamming
graph.
Dans ce rapport, on prouve qu’étant donné G une clique Kn (n ≥ 1) subdivisée,
G est le sous-graphe isométrique d’un graphe de Hamming si et seulement si G
est un cube partiel ou G = Kn . La caractérisation est aussi obtenue pour les
roues subdivisées.
Mots-clés : plongement isométrique, graphe subdivisé, cube partiel, graphe
de Hamming.
Introduction
Isometric subgraphs of Hamming graphs (resp. hypercubes) are called partial
Hamming graphs (resp. partial cubes). Partial cubes have first been investigated
by Graham and Pollak [11], and Djokovic̀ [9]. Later, several algorithmic characterizations were shown using a relation defined on the set of edges (the Θ relation
introduced by Djoković [9] and Winkler [18]), or constructive operations.
This relation easily led to a recognition algorithm for partial cubes running
in O(mn) (m is the number of edges and n the number of vertices). This
complexity was then improved for specific classes of graphs by Brešar et al. [3].
And recently, the general complexity was pulled down to O(n2 ) by Eppstein
[10]. Partial cubes have found different applications, for instance, in [6, 8, 13],
interesting applications in chemical graph theory were established.
The search for structural characterizations was first motivated by a conjecture of Chepoi and Tardif in the 1994 Bielefeld conference on “Discrete Metric
Spaces”. They asked if bipartite graphs with convex intervals were partial cubes.
The negative answer was brought by Brešar and Klavžar in [4], using subdivided
wheels. From this point structural characterizations for partial cubes that were
subdivisions of wheels and cliques were obtained (see [1, 2, 12]). A natural
extension of this work was to study partial Hamming graphs.
One point of interest about partial Hamming graphs, is that they can be
labelled in such a way that, given a target vertex, only local information is
needed to know which way is a shortest path. Reader can see [13, 14, 15, 17, 18]
for further information about partial Hamming graphs.
Moreover, studying subdivided graphs and their isometric embeddings in
Hamming graphs, allows us to study partly the λ-scale embeddings in Hamming
graphs. For example, if the subdivision of a graph G is isometrically embeddable
in a hypercube, then G is 2-scale embeddable in a hypercube (see [7, 16] for more
details).
In this paper, we show that, the only subdivision of a clique isometrically
embeddable in a Hamming graph which is not a partial cube ; is actually the
clique itself. Then, we study the subdivisions of wheels that are isometrically
embeddable in Hamming graphs and obtain a structural characterization of
them.
1
Preliminary definitions and basic properties
By replacing edges of a graph G by paths, we obtain a subdivided graph of G.
Given G a graph, S(G) is obtained by subdividing each edge of G exactly once.
We call principal vertex, a vertex of a subdivided graph of G that was not
added during the subdivision (it was already in G). We call universal vertex,
a vertex of a subdivided graph of G such that each edge incident to it, is not
subdivided.
The Cartesian product G¤H of graphs G and H is the graph with vertex set
V (G) × V (H) in which the vertex (a, x) is adjacent to the vertex (b, y) whenever
ab ∈ E(G) and x = y, or a = b and xy ∈ E(H). A Hamming graph is a cartesian
product of cliques.
For a graph G, the distance dG (u, v) between vertices u and v is defined
as the number of edges on a shortest uv-path. A subgraph H of G is called
3
isometric if and only if dG (u, v) = dH (u, v) for all u, v ∈ V (H).
For k ≥ 3, the k-fan Fk is the graph obtained as the join of a vertex u and
a path on k vertices w1 , . . . , wk (see Fig. 1(a)).
For k ≥ 3, the k-wheel Wk is the graph obtained as the join of a vertex u
and a cycle on k vertices w1 , . . . , wk (see Fig. 1(b)).
w3
u
u
w4
w5
w2
w4
w1
w2
w1
(a) Subdivision of W5
w3
(b) Fan F4
Figure 1:
We also remind some former results about partial cubes.
Lemma 1. [12] Let G be a graph and K an isometric subgraph of G which is
isomorphic to a subdivision of Fk (k ≥ 3) such that at least one of the edges
uw2 , . . . , uwk−1 is subdivided. Then G is not a partial cube.
Theorem 2. [12] A subdivided wheel (with more than 4 rays) is a partial cube
if and only if all its rays are not subdivided and the other edges are oddly subdivided.
Theorem 3. [2] Let G be a subdivided graph of a complete graph Kn (n ≥ 4).
G is a partial cube if and only if, G is isomorphic to S(Kn ) or G contains a
universal vertex u and the number of added vertices to each edge not incident
to u in Kn is odd.
Given G a partial Hamming graph and an isometric embedding φ of G into
a Hamming graph H, φ induces a natural edge labelling ℓ of G : given e an edge
of G linking two vertices u and v, as they are adjacent in G and φ is isometric,
we get that dH (φ(u), φ(v)) is 1 and thus φ(u) and φ(v) differ in exactly one
coordinate i. We define ℓ(e) = i. xi will denote the i-th coordinate of the
vertex x embedded in a Hamming graph.
Lemma 4. Given G a partial Hamming graph and a natural labelling of its
edges ℓ. If two edges of G, e and f are part of a geodesic path in G, then
ℓ(e) 6= ℓ(f ).
Proof. A shortest path in a Hamming graph cannot use twice the same coordinate, or it would be shorter using it once or not using it at all.
Lemma 5. Given G a partial Hamming graph and a natural labelling of its
edges ℓ. Given C an elementary cycle of G, each label appearing in C, appears
at least twice. Moreover, if C is isometric and differs from K3 , then these labels
appear exactly twice.
4
Proof. For a contradiction let us suppose there is a cycle (x0 , x1 , . . . , xk , x0 ) such
that ℓ(x0 x1 ) = i and no other edge of the cycle has label i. Then xi0 6= xi1 (since
ℓ(x0 x1 ) = i). For all other edges, xil = xil+1 (1 ≤ l ≤ k − 1) which implies that
xik = xi1 . The last edge (xk x0 ) leads to a contradiction since xi0 6= xi1 .
Remark 6. It is straightforward from this Lemma that an isometric cycle in a
partial Hamming graph is either even or K3 .
x
z
t
y
Figure 2: K4 − e
Proposition 7. K4 −e (Fig. 2) cannot be isometrically embedded in a Hamming
graph.
Proof. x and y differ on exactly one coordinate i, we can assume that xi = 0
and yi = 1. Consequently, all the vertices that are at distance 1 from x and y,
differ also on the same coordinate i. Therefore, they are at distance 1 from each
other. Thus, t and z should be linked, which is not the case.
2
Structural characterization for cliques
We shall prove the following theorem.
Theorem 8. Given G a subdivided clique Kn for some n, G is a partial Hamming graph if and only if G is a partial cube or G = Kn
2.1
First case : G is bipartite
Let us show that only two values are used for each coordinate.
For a contradiction, suppose that there exists a coordinate i and three vertices x, y, z such that xi = 0, y i = 1 and z i = 2. Consider shortest paths between
these three vertices. Thanks to Lemma 4, a shortest path between x and y is a
sequence of vertices uj with uij = 0 followed by a sequence of vertices vj with
vji = 1. Same holds for both other shortest paths. The subgraph induced by
these shortest paths is represented in Fig. 3.
Therefore, there exists an elementary cycle using exactly three different values for the coordinate i. We can consider the smallest one. Clearly, three of its
edges have label i. By Lemma 5, it is either K3 (impossible since G is bipartite),
5
yi = 1
y1i = 1
i
xi1 = 0
i
i
z1i = 2
xi = 0
zi = 2
Figure 3: Shortest paths
or it is not isometric. There exists a chord which shorten the cycle, one of the
two resulting cycle uses exactly three different values for the coordinate i and
is shorter. This is a contradiction.
As a conclusion, every coordinate is used for only two values. This implies
that the graph is isometrically embeddable in a hypercube. Therefore, G is a
partial cube and the Theorem holds.
Remark 9. This part of the proof holds for any graph. A bipartite graph that
is isometrically embeddable in a Hamming graph, is a partial cube. This result
has already been proven in [17].
2.2
Second case : G is not bipartite
We have to prove that G is then isomorphic to Kn . As G is not bipartite, it
contains an odd cycle. Therefore we can consider C a smallest odd cycle of
G. C is isometric since if it was not, there would be a chordal chain inducing
a strictly smaller odd cycle in G. By Lemma 5 either C = K3 or each label
appears exactly twice, but this would give an even cycle. Therefore we can
assume that C is K3 .
We now consider a maximal clique in G (with respect to inclusion) containing
C, namely K. All its edges have the same label, namely i. If K = Kn , then
G = Kn and Theorem holds. Let us suppose that K 6= Kn . We consider u a
principal vertex of G that is nearest to K. Let x be a principal vertex of K
nearest to u.
If there exists a vertex y of K distinct from x such that P (u, y) is plain.
Then P (u, x) is also plain and hu, x, yi is a K3 . Therefore the three edges have
the same label which is i. Thus, u is at distance 1 from all the vertices of K
which contradicts the maximality of K.
We can thus assume, for every vertex y of K distinct from x, that P (u, y) is
subdivided at least once.
6
Claim 10. For every vertex y of K distinct from x, hu, x, yi is an isometric
cycle.
Proof. For a contradiction, if hu, x, yi is not isometric, there must be a strictly
shorter path from u to y. Let us denote by l the distance between u and x and
consider a shortest path from u to y
• Case 1 : it goes through principal vertex w 6∈ K (see Fig. 4(a)). Thus
the path from w to y has at least length l and the path from u to w has at
least length 1. As it must be strictly less than l + 1, this is a contradiction.
• Case 2 : it goes through a principal vertex w ∈ K (see Fig. 4(b)). Thus
the path from u to w has at least length l so that the path from u to y
going through w has at least length l + 1 which is also a contradiction.
Therefore, hu, x, yi is isometric.
K
x
K
l
1
y
u
w
≥1
1
w
y
≥l
x l
u
≥l
(a) Path outside K
(b) Path in K
Figure 4:
Now consider two vertices of K distinct from x, namely y and w (|K| ≥
3). As P (y, u) and P (w, u) are subdivided, we have hu, x, yi and hu, x, wi two
isometric cycle which are not isomorphic to K3 and thus are even cycle where
labels appear exactly twice (by Lemma 5). We then study the subdivision of
K4 hu, x, y, wi (see Fig. 5). It is clearly isometric. By considering the outer
cycle hu, x, y, wi and using Lemma 5, there must be at least one edge labelled
with i on the path going from w to y through u. Let us assume that it is on
the path P (u, y). Then there cannot be any edge labelled with i on the path
P (u, x) since hu, x, yi is isometric (or label i would appear three times). We can
thus assume that there is no edge labelled with i on the path P (u, x).
Therefore, there must be an edge ab in P (u, w) and an edge de in P (u, y)
labelled with i. Moreover, if we consider the label of the first edge of the path
P (x, u), namely j 6= i, then the following edges bc and ef must be labelled with
j (since cycles are even, same labels face each other). To conclude, we just have
to consider a shortest path from b to e and observe that it has to go through
two edges labelled the same way (either i or j). By use of Lemma 4, this is
impossible. We obtain a contradiction.
As a conclusion, K = Kn and Theorem 8 is proven.
By using the characterization of subdivided cliques that are partial cubes
obtained in Theorem 3, we get the following characterization.
7
u
a
d
i
e
f
i
j
b
x
j
i
j
c
i
i
y
w
Figure 5: hx, y, u, wi
Corollary 11. Given G a subdivided Kn (n ≥ 4), G is isometrically embeddable
in a Hamming graph, if and only if it is either Kn , or S(Kn ), or it has a
universal vertex and all other edges are oddly subdivided.
3
Structural characterization for wheels
The wheel W3 is isomorphic to K4 studied above, so that we will only study
wheels Wk with k ≥ 4. We state the following theorem.
Theorem 12. Given W a subdivided wheel, W is isometrically embeddable in
a Hamming graph if and only if :
(i) All its rays are non-subdivided
(ii) Other edges are either non-subdivided or oddly subdivided
(iii) These last non-subdivided edges are not incident
(iv) For W4 it does not contain the forbidden pattern (see Fig 6(a))
3.1
Necessary condition
Let us consider W a subdivided wheel with at least four rays which is isometrically embeddable in a Hamming graph. If W is bipartite, it is a partial cube
by Remark 9. By Theorem 2, the rays are not subdivided, the other edges are
all oddly-subdivided and as there is no triangle (since it is bipartite), the four
conditions are verified.
Thus, we can assume that W is not bipartite. It contains an odd cycle.
Therefore we can consider C a smallest odd cycle of W . C is isometric since
if it was not, there would be a chordal chain inducing a strictly smaller odd
8
x3 x4
x2
x1
u
x6 x5
(b) Non-bipartite wheel
(a) Forbidden pattern
Figure 6:
cycle in W . By Lemma 5 either C = K3 or each label appears exactly twice,
but this would give an even cycle. Therefore we can assume that C is K3 and
C must have u as one of its vertices. Let us denote x1 , x2 , . . . , x2k−1 , x2k the
vertices around the wheel which are part of a triangle (see Fig. 6(b)) ; thus we
have hu, x1 , x2 i, . . . , hu, x2k−1 , x2k i triangles. We can assume that all the xi are
different since if x2i = x2i+1 , it would induce an isometric subgraph isomorphic
to K4 − e forbidden by Proposition 7.
For all 1 ≤ l ≤ k − 1 the fan induced by u and the path from x2l to x2l+1 is
isometric in W . The same stands for the fan induced by u and the path from
x2k to x1 . Thus, these fans are isometrically embeddable in a Hamming graph.
Moreover, as they do not contain any induced K3 , they are bipartite and thus
are partial cubes (by Remark 9). We use the Lemma 1 to conclude that every
ray of the wheel W is non-subdivided. (i) and (ii) are then proven. Obviously,
two triangles cannot have a common edge (or it would be isomorphic to K4 − e)
then two incident edges around the wheel cannot be both plain. This proves
(iii).
To prove (iv), for a contradiction, let us consider a subdivided W4 with the
forbidden pattern. Each triangle is included in a factor of the Hamming graph,
their edges will be respectively labelled with i and j. Both cycles going through
u and dashed paths are isometric and distinct from K3 . By Lemma 5, they have
even length. Thus each middle vertex (x and y) of subdivided edges is between
an edge labelled with i and an edge labelled with j (see Fig. 7). Any shortest
path from x to y has to go through two edges labelled the same way. Lemma 4
allows us to conclude it is a contradiction. (iv) is proven.
3.2
Sufficient condition
Let us consider W a subdivision of a wheel (with at least four rays) that fits
the conditions from (i) to (iv). We show that it can be isometrically embedded
in a power of K3 , which is a Hamming graph.
We first embed all the triangles and single rays such that each is in one
different dimension of the product of K3 , which is called the dimension of the
ray or triangle. The center vertex u is at the origin.
Then we embed each subdivided edge consecutively with respect to the following induction property : after each step, the result embedding is isometric
and given any ray or triangle, the only vertices with a non-zero coordinate in
its dimension are part of the halves of the subdivided edges incident to it.
9
x
i
j
i
j
j
i
i
j
j
i
y
Figure 7: Forbidden pattern
The property is clearly true at the beginning. Let us now add a subdivided
edge, ie a path of length 2k between two vertices of the wheel, namely a and
b in G the current embedded graph. We can suppose that the two involved
dimensions correspond to the first two coordinates so that a = (1, 0, 0 . . . 0) and
b = (0, 1, 0 . . . 0). Then we add k − 1 dimensions. All the precedent vertices
have null components in these dimensions. To add the 2k − 1 new vertices and
obtain the new graph G∗ we do as follows :
i times
z }| {
1≤i≤k−1
xi = (1, 0, 0 . . . 0| 1, . . . , 1, 0, . . . , 0)
xi = (1, 1, 0 . . . 0|1, 1, . . . , 1, 1)
i=k
xi = (0, 1, 0 . . . 0| 0, . . . , 0 , 1, . . . , 1) k + 1 ≤ i ≤ 2k − 1
| {z }
i−k−1 times
Clearly, the only vertices with a non-zero coordinate in the dimensions of a
and b are contained in the halves of the subdivided edges incident to it. Let us
now prove that this embedding is still isometric.
Let x, y be to vertices of G∗ , we have to prove that dG∗ (x, y) = dH (x, y).
x and y are vertices of G : This means that dG∗ (x, y) = dG (x, y) and
as we have only added 0’s in the new embedding, the Hamming distance is still
the same.
x and y are both part of the new path : It is straightforward that the
new vertices are isometrically embedded as the even cycle hb, u, a, x1 . . . x2k−1 i
is isometric.
x is in the path and y is a vertex of G : Then there exists i such that
x = xi and we have to distinguish two possibilities :
• i 6= k : Then we can suppose that x is nearer from a so that
x = (1, 0 . . . 0|1 . . . 1, 0 . . . 0). Thus dH (x, y) = dH (a, y) + i = dG (a, y) + i.
There is a shortest path from x to y going through a so that dG∗ (x, y) =
dG∗ (x, a) + dG∗ (a, y) = i + dG (a, y).
• i = k : x = (1, 1, 0 . . . 0|1 . . . 1) and y = (y|0 . . . 0) so that dH (x, y) =
k − 1 + dH ((1, 1, 0 . . . 0), y). If there is a shortest path from y to x going
through u, then y must have its first two coordinates equal to 0 otherwise
there would be a shortpath to a or b and it would not be isometric. Thus
10
dG∗ (x, y) = k + 1 + d(u, y) = k + 1 + dH ((1, 1, 0 . . . 0), y) − 2. The result
is proven. From now on, we suppose that none of the shortest paths
goes through u. We consider a shortest path from y to x. It has to go
through a or b. We can assume it goes through a. This implies that the
first coordinate of y is not 0 else there would be a shorter or equal path
going through u (thanks to the induction property). Then dG∗ (x, y) =
dG∗ (a, y) + k = dG (a, y) + k = dH ((1, 0 . . . 0), y) + k. Therefore we have
to prove that dH ((1, 1, 0 . . . 0), y) − 1 = dH ((1, 0 . . . 0), y). If the second
coordinate of y is 0, it is clearly true. Else, we would have the first two
coordinates of y non-equal to 0. Thanks to the induction property, the
only possible configuration in which it could happen is a subdivision of
W4 containing the forbidden pattern. In other words this is impossible
and the result is proven.
This concludes the proof of the Theorem 12
Conlusion
Figure 8: Obstruction
From these results, it appears that partial Hamming graphs are not so far
from partial cubes. The main point is that the only non trivially subdivided
cliques that are partial Hamming graphs are partial cubes. We remind now a
Proposition obtained in [2].
Proposition 13. [2] Let G be a subdivision of a graph of order n such that each
edge contains odd added vertices. K is a graph obtained from G by joining a
vertex u adjacent to each principal vertex of G. Then, K is a partial cube.
This forbids any “minor-free” characterization. Forbidden isometric subgraphs seem to be naturally more appropriate. This gives rise to two new
conjectures.
Conjecture 14. Given G a graph, G is a partial cube if an only if it is bipartite
and does not contain any subdivision of K4 − e as an isometric subgraph.
Conjecture 15. Given G a graph, G is a partial Hamming graph if and only if
it fits some parity conditions and does not contain any subdivision of the graph
H (see Fig. 8) as an isometric subgraph.
11
References
[1] M. Aı̈der and S. Gravier and K. Meslem, Isometric embeddings of subdivided connected graphs in the hypercube, Electron. Notes Discrete Math.
24(2006), 145–151, doi:10.1016/j.endm.2006.06.045
[2] L. Beaudou and S. Gravier and K. Meslem, Isometric embeddings of subdivided complete graphs in the hypercube, Submitted (2007).
[3] B. Brešar and W. Imrich and S. Klavžar, Fast recognition algorithms
for classes of partial cubes, Discrete Appl. Math. 131(2003), 51–61,
doi:10.1016/S0166-218X(02)00416-X
[4] B. Brešar and S. Klavžar and A. Lipovec, On partial cubes and graphs with
convex intervals, Comment. Math. Univ. Carolin. 43(2002), 537–545.
[5] V. Chepoi, Isometric subgraphs of Hamming graphs and d-convexity, Cybernet. Systems Anal. 1(1988), 6–11, doi:10.1007/BF01069520
[6] V. Chepoi, On distances in benzenoid graphs, J. Chem. Inform. Comput.
Sci. 36(1996), 1169–1172.
[7] V. Chepoi and M. Deza and V. Grishukhin, Clin d’oeil on L1 -embeddable
planar graphs, Discrete Appl. Math. 80(1997), 3–19, doi:10.1016/S0166218X(97)00066-8
[8] V. Chepoi and S. Klavžar, The Wiener index and the Szeged index of
benzenoid systems in linear time, J. Chem. Inform. Comput. Sci. 37(1997),
752–755.
[9] D. Djokovic̀, Distance preserving subgraphs of the hypercubes, J. Combin.
Theory Ser. B 41(1973), 263–267, doi:10.1016/0095-8956(73)90010-5
[10] D.
Eppstein,
Recognizing
partial
cubes
in
quadratic
time,
arXiv:cs.DS/0705.1025v1
[11] R.L. Graham and H. Pollack, On the addressing problem for loop switching,
Bell System Tech. J. 50(1971), 2495–2519.
[12] S. Gravier and S. Klavžar and M. Mollard, Isometric embeddings of
subdivided wheels in hypercubes, Discrete Math. 269(2003), 287–293,
doi:10.1016/S0012-365X(03)00057-8
[13] W. Imrich and S. Klavžar, Product Graphs : Structure And Recognition,
Wiley, New-York, 2000.
[14] S. Klavžar, On the canonical metric representation, average distance,
and partial Hamming graphs, European J. Combin., 27(2006), 168–173,
doi:10.1016/j.ejc.2004.07.008
[15] S. Klavžar and I. Peterin, Characterizing subgraphs of Hamming graphs,
J. Graph Theory, 49(2005), 302–312, doi:10.1002/jgt.20084
[16] S.V. Shpectorov, On scale embeddings of graphs into hypercubes, European
J. Combin., 14(1993), 117–130, doi:10.1006/eujc.1993.1016
12
[17] E. Wilkeit, Isometric embeddings in Hamming graphs, J. Combin. Theory
Ser. B, 50(1990), 179–197, doi:10.1016/0095-8956(90)90073-9
[18] P. M. Winkler, Isometric embeddings in products of complete graphs, Discrete Appl. Math., 7(1984), 221–225, doi:10.1016/0166-218X(84)90069-6
13