June 11, 2026
Cospectral graphs (graphs that share the same eigenvalues) expose the limitations of using the graph spectrum to uniquely identify graphs, and they also help to understand what structural properties a graph spectrum cannot capture. Switching methods,
which are standard tools for constructing cospectral graphs, require specific structural and algebraic conditions to hold for the operation to preserve the graph’s spectrum. However, there is no guarantee that the obtained cospectral switched graph is
non-isomorphic. In this paper we study this isomorphism problem for a recent and prolific switching method to produce cospectral graphs with respect to the adjacency spectra: Wang-Qiu-Hu (WQH) switching. We do so by using common-neighbour multisets
associated with a WQH partition, which allows us to derive an external common-neighbour criterion for certifying non-isomorphism after WQH-switching. Then, we apply the new criterion to clique extensions and to weak tensor products, with coclique
extensions as a special case. As an application we obtain infinite families of cospectral non-isomorphic graphs, including some known constructions. Finally we extend the conditions of WQH-switching to generalized adjacency matrices and, under an
additional degree condition, to Laplacian and signless Laplacian matrices.
Keywords: Wang-Qiu-Hu switching; Spectral characterization; Cospectral graphs; Graph isomorphism; Graph products
Spectral graph theory studies the extent to which structural properties of a graph are encoded in the spectra of associated matrices. Cospectral non-isomorphic graphs mark the limitations of such spectral characterizations. Switching methods, including Godsil–McKay switching [1], Wang–Qiu–Hu switching [2], [3], and Abiad–Haemers switching [4] (see also [5], [6]), are standard tools for constructing cospectral graphs. A switching method requires a prescribed switching set or switching partition. The existence of such a partition guarantees cospectrality after the prescribed edge changes, but it does not by itself guarantee a new graph: the switched graph may still be isomorphic to the original one. A central challenge is therefore to give verifiable conditions under which switching yields a non-isomorphic cospectral mate. For Godsil–McKay switching, this question was investigated in [7].
WQH-switching has been used to show that certain graph classes are not determined by their spectrum [8]–[11], to construct strongly regular graphs [12]–[15], and more recently in the construction of Neumaier graphs [16]. In all of these applications, proving non-isomorphism after switching is often the most challenging part of the proof argument.
This paper develops non-isomorphism criteria for WQH-switching. We introduce common-neighbour multisets associated with a WQH partition and prove an external common-neighbour test: a change in this external data certifies that the switched graph is non-isomorphic to the original one. We apply this test to two graph operations. First, we prove that, under explicit hypotheses on the base WQH partition, every \(t\)-clique extension with \(t\ge2\) admits a WQH-switching that produces a cospectral non-isomorphic graph; see Theorem 3. Second, we prove an analogous result for WQH-switching on one fibre of a weak tensor product \(\mathcal{H}\times G\), with coclique extensions included as a special case; see Theorem 8. These results are then specialized in Section 6 to weak tensor products, to \(t\)-coclique extensions, and to clique-extension constructions whose twists are realized by WQH-switchings. We also record extensions to generalized adjacency matrices and, under an additional degree condition, to Laplacian and signless Laplacian matrices.
The paper is organized as follows. Section 2 recalls WQH-switching, introduces the common-neighbour notation, and proves the external common-neighbour test used throughout the paper. Section 3 covers clique extensions, while Section 4 investigates weak tensor products. Section 5 extends the WQH-switching argument to generalized adjacency matrices and, under an additional degree condition, to Laplacian and signless Laplacian matrices. Finally, Section 6 presents applications of the new isomorphism criteria to weak tensor products, coclique extensions, and clique-extension constructions.
Let \([t]:=\{1,2,\ldots,t\}\). All graphs are finite. Unless explicitly stated otherwise, graphs are simple. The symbol \(\sqcup\) denotes disjoint union, and \(\otimes\) denotes the Kronecker product of matrices.
For a graph \(X\) and a vertex \(x\in V(X)\), let \(N_X(x)\) denote the neighbourhood of \(x\). If \(U\subseteq V(X)\), put \[d_U(x):=|N_X(x)\cap U|.\] In particular, \(d_X(x):=d_{V(X)}(x)\). For vertices \(u,v\in V(X)\), write \[\lambda_X(u,v):=|N_X(u)\cap N_X(v)|.\] Thus, for simple graphs, \(\lambda_X(u,u)=d_X(u)\). All multisets of the form \(\{\lambda_X(u,v):u\in U,\;v\in W\}\) are counted over ordered pairs \((u,v)\in U\times W\). For \(U,W\subseteq V(X)\) and an integer \(r\), define \[\Lambda_X(U,W):=\{\lambda_X(u,v):u\in U,\;v\in W\},\] \[\Lambda_{r,X}(U,W):= \{\lambda_X(u,v):u\in U,\;d_X(u)=r,\;v\in W\}.\] We also use \[\overline{\Lambda}_X(U):=\Lambda_X(U,V(X)\setminus U).\]
Definition 1. Let \(G\) be a graph. The \(t\)-clique extension of \(G\) is the graph with vertex set \(V(G)\times[t]\), where \((u,i)\) and \((v,j)\) are adjacent if and only if either \(u=v\) and \(i\ne j\), or \(uv\in E(G)\).
In 2019, Wang, Qiu, and Hu [2] introduced a new switching, which generalizes the well-known GM-switching proposed by Godsil and McKay [1].
Definition 2. Let \(G\) be a graph with vertex set \[V(G)=C_1\sqcup C_2\sqcup D_1\sqcup D_2\sqcup D_3.\] We say that \(G\) is of WQH-type with respect to this partition if the following conditions hold:
\(|C_1|=|C_2|\);
\(d_{C_1}(u)-d_{C_2}(u)=d_{C_2}(v)-d_{C_1}(v)\) for every \(u\in C_1\) and \(v\in C_2\);
for every \(x\in C_1\), \(N_G(x)\cap(D_1\cup D_2)=D_1\);
for every \(y\in C_2\), \(N_G(y)\cap(D_1\cup D_2)=D_2\);
for every \(w\in D_3\), one has \(d_{C_1}(w)=d_{C_2}(w)\).
The WQH-switched graph \(G'\) with respect to \((G,C_1,C_2)\) is obtained from \(G\) by replacing (P3) and (P4) by \[N_{G'}(x)\cap(D_1\cup D_2)=D_2\qquad (x\in C_1),\] \[N_{G'}(y)\cap(D_1\cup D_2)=D_1\qquad (y\in C_2),\] and leaving all other adjacencies unchanged.
Let \(q:=|C_1|=|C_2|\). When \(q\in\{1,2\}\), WQH-switching is equivalent to GM-switching, see [17]. For some graph products, Abiad, Brouwer, and Haemers [7] provided sufficient conditions for being non-isomorphic after GM-switching. So, in our work, we only focus on \(|C_1|=|C_2|\geq 3\). For arbitrary \(q\), the corresponding WQH-switching matrix with respect to the partition \((C_1,C_2,D_1\cup D_2\cup D_3)\) is \[\label{eq:wqh-matrix} Q= \begin{bmatrix} I_q-\frac{1}{q}J_q & \frac{1}{q}J_q & 0\\ \frac{1}{q}J_q & I_q-\frac{1}{q}J_q & 0\\ 0&0&I \end{bmatrix},\tag{1}\] where \(I_q\) is the \(q\times q\) identity matrix and \(J_q\) is the \(q\times q\) all-one matrix. Then \(Q^\top=Q\) and \(Q^2=I\). If \(A\) is the adjacency matrix of \(G\), then the adjacency matrix of \(G'\) is \(A':=QAQ.\)
Theorem 1 (WQH-switching, [2]). Let \(G\) be a WQH-type graph with WQH-switched graph \(G'\). Then \(G\) and \(G'\) are cospectral.
A more general version of WQH-switching was introduced in [15]. Recently, several alternative switching methods to construct cospectral graphs have been proposed in the literature, see e.g. [5], [6].
The next lemma records some common-neighbour conditions that must hold if a WQH-type graph is isomorphic to its switched graph. We state these conditions in a form that will be used in Section 3 and 4 to detect non-isomorphism.
Lemma 2. Let \(G\) be a WQH-type graph with vertex partition \(C_1\sqcup C_2\sqcup D_1\sqcup D_2\sqcup D_3\). Put \(S:=C_1\cup C_2\) and \(Y:=V(G)\setminus S.\) Let \(G'\) be the WQH-switched graph with respect to \((G,C_1,C_2)\). Assume that \(|D_1|=|D_2|\). Then the following statements hold.
For every integer \(r\), \(\Lambda_{r,G}(S,S)=\Lambda_{r,G'}(S,S)\) and \(\Lambda_{r,G}(Y,Y)=\Lambda_{r,G'}(Y,Y).\)
If there exists an integer \(r\) such that \[\Lambda_{r,G}(S,Y)\sqcup\Lambda_{r,G}(Y,S) \ne \Lambda_{r,G'}(S,Y)\sqcup\Lambda_{r,G'}(Y,S),\] then \(G\) and \(G'\) are non-isomorphic.
If \(\overline{\Lambda}_G(S)\ne\overline{\Lambda}_{G'}(S)\), then \(G\) and \(G'\) are non-isomorphic.
Proof. Since \(|D_1|=|D_2|\), WQH-switching preserves the degree of every vertex in \(S\). It also preserves the degree of every vertex in \(Y\), because vertices in \(D_1\) and \(D_2\) interchange the equally large sets \(C_1\) and \(C_2\), while vertices in \(D_3\) are not switched.
We next compare common-neighbour numbers inside \(S\) and inside \(Y\). For \(x,y\in S\), the contribution from \(S\cup D_3\) is unchanged. The contribution from \(D_1\cup D_2\) is \(|D_1|\) for two vertices in \(C_1\), \(|D_2|\) for two vertices in \(C_2\), and \(0\) for one vertex in each of \(C_1\) and \(C_2\); after switching these first two values are interchanged. Since \(|D_1|=|D_2|\), we have \[\lambda_G(x,y)=\lambda_{G'}(x,y)\qquad (x,y\in S).\] For \(x,y\in Y\), the contribution from \(Y\) is unchanged. The contribution from \(S\) is also unchanged: for one vertex in \(D_1\) and one in \(D_2\) it is \(0\) before and after switching; for two vertices in \(D_1\) it changes from \(|C_1|\) to \(|C_2|\), and the case of two vertices in \(D_2\) is symmetric; if one vertex lies in \(D_3\), equality follows from \(d_{C_1}(z)=d_{C_2}(z)\) for \(z\in D_3\); and if both vertices lie in \(D_3\), the \(S\)-neighbourhoods are unchanged. Hence \[\lambda_G(x,y)=\lambda_{G'}(x,y)\qquad (x,y\in Y).\] Together with preservation of degrees, this proves (a).
For (b), consider the graph invariant \[\Lambda_{r,X}:=\{\lambda_X(u,v):u,v\in V(X),\;d_X(u)=r\}.\] It decomposes as the disjoint union of the four ordered parts \(\Lambda_{r,X}(S,S)\), \(\Lambda_{r,X}(S,Y)\), \(\Lambda_{r,X}(Y,S)\), and \(\Lambda_{r,X}(Y,Y)\). By (a), the two internal parts are unchanged under switching. Therefore a change in the two external parts forces \(\Lambda_{r,G}\ne\Lambda_{r,G'}\), and hence \(G\not\cong G'\).
For (c), use the invariant \(\Lambda_X:=\{\lambda_X(u,v):u,v\in V(X)\}\). The internal parts on \(S\times S\) and \(Y\times Y\) are unchanged by the preceding argument. Since \(\lambda_X(u,v)=\lambda_X(v,u)\), a change in \(\overline{\Lambda}_X(S)=\Lambda_X(S,Y)\) forces a change in the full ordered multiset \(\Lambda_X\). Hence \(G\) and \(G'\) are non-isomorphic. ◻
Remark 1. The equalities forced by Lemma 2 are necessary conditions for an isomorphism \(G\cong G'\), but they should not be expected to be sufficient. They only record common-neighbour data relative to the prescribed switching set \(S=C_1\cup C_2\), and such data is generally too coarse to force an isomorphism. Moreover, even when \(G\) and \(G'\) are isomorphic, an isomorphism need not preserve \(S\) setwise. Indeed, Abiad, Van de Berg and Simoens constructed examples in which WQH-switching produces an isomorphic graph but no isomorphism fixes the switching set setwise; see [18]. Thus, in what follows, we use Lemma 2 only in the direction of detecting changes in these invariants, which certifies non-isomorphism.
Note also that the conditions from the previous lemma also hold in the more general framework of design switching introduced in [19]. In particular, one can state a general invariant-based condition, however this is a broad sufficient condition rather than a sharp design-switching-specific theorem.
Remark 2. The same philosophy applies to any switching obtained by conjugating the adjacency matrix with a regular orthogonal matrix supported on a switching set. Let \(X\) be a graph with vertex set \(C\sqcup Y\), and let \(X'\) be obtained from \(X\) by such a switching on \(C\). If, for some integer \(r\), the internal degree-refined common-neighbour multisets on \(C\times C\) and \(Y\times Y\) are unchanged, but the external part changes, that is, \[\Lambda_{r,X}(C,C)=\Lambda_{r,X'}(C,C),\qquad \Lambda_{r,X}(Y,Y)=\Lambda_{r,X'}(Y,Y),\] while \[\Lambda_{r,X}(C,Y)\sqcup\Lambda_{r,X}(Y,C) \ne \Lambda_{r,X'}(C,Y)\sqcup\Lambda_{r,X'}(Y,C),\] then \(X\) and \(X'\) are non-isomorphic. Indeed, the full multiset \[\{\lambda_X(u,v):u,v\in V(X),\;d_X(u)=r\}\] is an isomorphism invariant. Lemma 2 is the WQH specialization of this obstruction, where the required internal equalities follow from \(|D_1|=|D_2|\) and the WQH balance conditions.
Throughout this section, let \(G\) be a WQH-type graph with vertex partition \(C_1\sqcup C_2\sqcup D_1\sqcup D_2\sqcup D_3\). Put \(S:=C_1\cup C_2.\) For \(x\in V(G)\) and \(a\in[t]\), write \(x^{(a)}:=(x,a)\). For \(x\in S\), define its \(D_3\)-type by \[\tau(x):=N_G(x)\cap D_3.\] For \(i\in\{1,2\}\), an integer \(m\), and \(A\subseteq D_3\), define \[f_{i,m}(A):=\#\{x\in C_i: d_G(x)=m,\;\tau(x)=A\}.\]
Theorem 3. Let \(G\) be a WQH-type graph whose vertex set is partitioned as \(C_1\sqcup C_2\sqcup D_1\sqcup D_2\sqcup D_3\). Let \(t\ge 2\), and let \(H\) be the \(t\)-clique extension of \(G\). Put \[C_1^H:=C_1\times\{1\},\qquad C_2^H:=C_2\times\{1\},\] \[D_1^H:=D_1\times[t],\qquad D_2^H:=D_2\times[t],\] \[D_3^H:=\bigl(S\times\{2,\ldots,t\}\bigr)\sqcup(D_3\times[t]).\] Assume that:
\(|D_1|=|D_2|>0\), \(|C_1|=|C_2|\ge 3\), and \(S=C_1\cup C_2\) is a clique;
there exists an integer \(s\) such that \(\bigl(f_{1,s}(A)\bigr)_{A\subseteq D_3} \ne \bigl(f_{2,s}(A)\bigr)_{A\subseteq D_3};\)
no vertex of \(D_3\) is adjacent to every vertex of \(S\).
Then \(H\) is of WQH-type with respect to the partition \(C_1^H\sqcup C_2^H\sqcup D_1^H\sqcup D_2^H\sqcup D_3^H.\) Let \(H'\) be the WQH-switched graph of \(H\). Then \(H\) and \(H'\) are non-isomorphic. In particular, they are cospectral non-isomorphic graphs.
Throughout the following lemmas, we work under the hypotheses of Theorem 3, and \(H'\) denotes the graph obtained from \(H\) by interchanging the adjacencies between \(C_1^H,C_2^H\) and \(D_1^H,D_2^H\) according to the displayed partition.
Let \(\ell\) be an integer and set \[r:=t\ell+(t-1), \qquad M:=r-1=t\ell+t-2.\] If \(d_G(x)=\ell\), then \[d_H(x^{(a)})=d_{H'}(x^{(a)})=r \qquad (a\in[t]).\]
Lemma 4. Let \(x\in C_i\), where \(i\in\{1,2\}\), and let \(y\in D_1\cup D_2\cup D_3\). If \(d_G(x)=\ell\), then, for \(X\in\{H,H'\}\) and all \(a,b\in[t]\), \(\lambda_X(x^{(a)},y^{(b)})<M.\)
Proof. It suffices to treat \(x\in C_1\); the other case is symmetric. We have \(d_X(x^{(a)})=M+1\).
First let \(y\in D_1\cup D_2\). In both \(H\) and \(H'\), the vertex \(y^{(b)}\) is adjacent to exactly \(t|C_1|\) vertices of \(S\times[t]\). Since \(x^{(a)}\) is adjacent to all vertices of \(S\times[t]\) except itself, at least \(t|C_1|-1\) neighbours of \(x^{(a)}\) are not adjacent to \(y^{(b)}\). Therefore \[\lambda_X(x^{(a)},y^{(b)}) \le M+1-(t|C_1|-1)<M,\] because \(t\ge 2\) and \(|C_1|\ge 3\) imply \(t|C_1|-1>1\).
Now let \(y\in D_3\). By assumption (C3), \(y\) is not adjacent to every vertex of \(S\). Since \(d_{C_1}(y)=d_{C_2}(y)\) and \(|C_1|=|C_2|\), there exists \(z\in S\setminus\{x\}\) such that \(zy\notin E(G)\). As \(S\) is a clique, all vertices \(z^{(1)},\ldots,z^{(t)}\) are neighbours of \(x^{(a)}\), while none of these vertices is adjacent to \(y^{(b)}\). Hence \[\lambda_X(x^{(a)},y^{(b)})\le M+1-t<M,\] because \(t\ge2\). ◻
Lemma 5. Let \(x\in C_i\), where \(i\in\{1,2\}\), and suppose that \(d_G(x)=\ell\). For \(y\in V(G)\) and \(a,b\in[t]\) with \(x^{(a)}\ne y^{(b)}\), one has \(\lambda_H(x^{(a)},y^{(b)})=M\) if and only if \(y\in C_i\) and \(\tau(x)\subseteq\tau(y).\)
Proof. Assume \(x\in C_1\); the case \(x\in C_2\) is symmetric. By Lemma 4, the equality cannot hold when \(y\in D_1\cup D_2\cup D_3\).
If \(y\in C_2\), then every vertex of \(D_1\times[t]\) is adjacent to \(x^{(a)}\) and not adjacent to \(y^{(b)}\). Since \(D_1\ne\varnothing\) and \(t\ge 2\), \[\lambda_H(x^{(a)},y^{(b)})\le M+1-t<M.\] Thus equality can hold only when \(y\in C_1\).
Let \(y\in C_1\). If \(y=x\), then \(a\ne b\), and a direct count gives \[\lambda_H(x^{(a)},x^{(b)})=t\,d_G(x)+(t-2)=M.\] Now suppose that \(y\ne x\). Since \(S\) is a clique, \(x\) and \(y\) are adjacent in \(G\), and \[\lambda_H(x^{(a)},y^{(b)})=t\lambda_G(x,y)+2(t-1).\] As \(d_G(x)=\ell\), this is equal to \(M\) if and only if \(\lambda_G(x,y)=\ell-1\). Since \(xy\in E(G)\), the latter equality is equivalent to \(N_G(x)\setminus\{y\}\subseteq N_G(y).\) For vertices \(x,y\in C_1\), the neighbourhoods in \(S\) and in \(D_1\) already have this containment property, and the remaining condition is precisely \(\tau(x)\subseteq\tau(y)\). ◻
Lemma 6. Let \(x\in C_i\), where \(i\in\{1,2\}\), and suppose that \(d_G(x)=\ell\). Let \(y\in S\) and let \(a,b\in[t]\) be such that exactly one of \(a,b\) is equal to \(1\). Then \(\lambda_{H'}(x^{(a)},y^{(b)})=M\) if and only if \(y\in C_{3-i}\) and \(\tau(x)\subseteq\tau(y).\)
Proof. Assume \(x\in C_1\); the case \(x\in C_2\) is symmetric. If \(y\in C_1\), then the following obstruction occurs. When \(a=1\), all vertices of \(D_2\times[t]\) are neighbours of \(x^{(a)}\) and non-neighbours of \(y^{(b)}\); when \(b=1\), all vertices of \(D_1\times[t]\) are neighbours of \(x^{(a)}\) and non-neighbours of \(y^{(b)}\). In either case, \[\lambda_{H'}(x^{(a)},y^{(b)})\le M+1-t<M,\] because \(t\ge2\). Thus equality can hold only when \(y\in C_2\).
Let \(y\in C_2\). The vertices \(x^{(a)}\) and \(y^{(b)}\) are adjacent, and \(d_{H'}(x^{(a)})=M+1\). Hence \(\lambda_{H'}(x^{(a)},y^{(b)})=M\) if and only if every neighbour of \(x^{(a)}\) except \(y^{(b)}\) is also a neighbour of \(y^{(b)}\). If \(a=1\), both vertices are adjacent to all of \(D_2\times[t]\); if \(b=1\), both vertices are adjacent to all of \(D_1\times[t]\). In both cases their adjacencies to \(S\times[t]\), except for the two vertices themselves, are forced by the clique \(S\), and their adjacencies to \(D_3\times[t]\) are governed by \(\tau(x)\) and \(\tau(y)\). Therefore the above containment is equivalent to \(\tau(x)\subseteq\tau(y)\). ◻
Lemma 7. Fix \(z\in D_1\cup D_2\cup D_3\) and \(b\in[t]\). Let \(B\subseteq D_3\). For \(a\in\{1,2\}\), the value \(\lambda_H(z^{(b)},y^{(1)})\) is independent of the choice of \(y\in C_a\) with \(\tau(y)=B\); denote this value, when such a vertex exists, by \(\alpha_a(B)\). Moreover, for every \(y\in C_a\) with \(\tau(y)=B\), \(\lambda_{H'}(z^{(b)},y^{(1)})=\alpha_{3-a}(B).\)
Proof. For a vertex \(y\in S\) with \(\tau(y)=B\), the first-layer neighbourhood is \[N_H(y^{(1)})= \begin{cases} (S\times[t]\setminus\{y^{(1)}\})\cup(D_1\times[t])\cup(B\times[t]), & y\in C_1,\\[1mm] (S\times[t]\setminus\{y^{(1)}\})\cup(D_2\times[t])\cup(B\times[t]), & y\in C_2, \end{cases}\] and \[N_{H'}(y^{(1)})= \begin{cases} (S\times[t]\setminus\{y^{(1)}\})\cup(D_2\times[t])\cup(B\times[t]), & y\in C_1,\\[1mm] (S\times[t]\setminus\{y^{(1)}\})\cup(D_1\times[t])\cup(B\times[t]), & y\in C_2. \end{cases}\] These descriptions show first that \(\lambda_H(z^{(b)},y^{(1)})\) depends only on the side of \(y\) and on the set \(B\). Indeed, if \(z\in D_1\cup D_2\), then the adjacency of \(z\) to \(S\) depends only on whether \(y\in C_1\) or \(y\in C_2\); if \(z\in D_3\), then whether \(z\) is adjacent to \(y\) is determined by the condition \(z\in B\).
The same displayed neighbourhoods also give the exchange relation after switching. For \(z\in D_1\) or \(z\in D_2\), the switch interchanges the first-layer sets \(C_1\times\{1\}\) and \(C_2\times\{1\}\) in the neighbourhood of \(z^{(b)}\) and interchanges \(D_1\times[t]\) and \(D_2\times[t]\) in the neighbourhood of \(y^{(1)}\). This is exactly the effect of replacing the side \(C_a\) by \(C_{3-a}\) in the unswitched graph. If \(z\in D_3\), the neighbourhood of \(z^{(b)}\) is unchanged, and the only side-dependent part of \(N_{H'}(y^{(1)})\) is again obtained by interchanging \(D_1\times[t]\) and \(D_2\times[t]\). The possible exclusion of \(y^{(1)}\) from \(S\times[t]\) contributes in the same way because \(z\in\tau(y)\) is determined by \(B\). Hence \(\lambda_{H'}(z^{(b)},y^{(1)})=\alpha_{3-a}(B)\). ◻
Proof of Theorem 3. We first verify that \(H\) is WQH-type with respect to the displayed partition. Under assumption (C1), the partition displayed in Theorem 3 is a WQH-type partition of \(H\): conditions (P1), (P3), and (P4) are immediate; (P2) follows from the fact that \(S\) is a clique and \(|C_1|=|C_2|\); and (P5) follows from the original WQH condition on \(D_3\), while vertices in \(S\times\{2,\ldots,t\}\) see \(|C_1|\) vertices in \(C_1^H\) and \(|C_2|\) vertices in \(C_2^H\). Hence \(H\) is WQH-type with respect to the displayed partition, and \(H'\) is its WQH-switched graph. By Theorem 1, \(H\) and \(H'\) are cospectral. It remains to prove that they are non-isomorphic.
By assumption (C2), let \(\ell\) be the largest integer such that \[\bigl(f_{1,\ell}(A)\bigr)_{A\subseteq D_3} \ne \bigl(f_{2,\ell}(A)\bigr)_{A\subseteq D_3}.\] Set \[r:=t\ell+(t-1), \qquad M:=r-1=t\ell+t-2,\] and write \[S_1:=S\times\{1\}, \qquad D_H:=V(H)\setminus S_1.\]
By Lemma 2 (b), applied to the WQH partition of \(H\), it is enough to show that \[\Lambda_{r,H}(S_1,D_H)\sqcup\Lambda_{r,H}(D_H,S_1) \ne \Lambda_{r,H'}(S_1,D_H)\sqcup\Lambda_{r,H'}(D_H,S_1).\] We prove that the value \(M\) occurs with larger multiplicity on the left-hand side than on the right-hand side.
Let \[\kappa:=|S|-1+|D_1|=|S|-1+|D_2|.\] Since \(S\) is a clique, for every \(u\in S\) we have \[\label{eq:degree-type} d_G(u)=\kappa+|\tau(u)|.\tag{2}\] For \(A\subseteq D_3\), define \[F_i(A):=\#\{z\in C_i:A\subseteq\tau(z)\}\qquad (i=1,2).\] We claim that, whenever \(f_{1,\ell}(A)+f_{2,\ell}(A)>0\), \[\label{eq:F-difference} F_1(A)-F_2(A)=f_{1,\ell}(A)-f_{2,\ell}(A).\tag{3}\] Indeed, then every degree-\(\ell\) vertex of type \(A\) satisfies \(|A|=\ell-\kappa\) by 2 . If \(B\supsetneq A\), then \(|B|>\ell-\kappa\), so every vertex of type \(B\) has degree larger than \(\ell\). By the maximality of \(\ell\), the numbers of vertices of type \(B\) in \(C_1\) and in \(C_2\) are equal. Hence all proper-superset contributions cancel in \(F_1(A)-F_2(A)\), leaving only the degree-\(\ell\) contribution of type \(A\). This proves 3 .
Let \(m_X\) be the multiplicity of \(M\) in \(\Lambda_{r,X}(S_1,D_H)\), where \(X\in\{H,H'\}\). By Lemmas 4 and 5, if \(x\in C_i\), \(d_G(x)=\ell\), and \(\tau(x)=A\), then for each \(j\in\{2,\ldots,t\}\) the number of vertices \(y^{(j)}\) with \(\lambda_H(x^{(1)},y^{(j)})=M\) is \(F_i(A)\). Therefore \[\label{eq:mH} m_H=(t-1)\sum_{A\subseteq D_3} \bigl(f_{1,\ell}(A)F_1(A)+f_{2,\ell}(A)F_2(A)\bigr).\tag{4}\] Similarly, by Lemmas 4 and 6, \[\label{eq:mHprime} m_{H'}=(t-1)\sum_{A\subseteq D_3} \bigl(f_{1,\ell}(A)F_2(A)+f_{2,\ell}(A)F_1(A)\bigr).\tag{5}\] Subtracting 5 from 4 gives \[m_H-m_{H'} =(t-1)\sum_{A\subseteq D_3} \bigl(f_{1,\ell}(A)-f_{2,\ell}(A)\bigr) \bigl(F_1(A)-F_2(A)\bigr).\] For those \(A\) with \(f_{1,\ell}(A)=f_{2,\ell}(A)=0\), the summand is zero. For the remaining \(A\), use 3 . Thus \[\label{eq:m-positive} m_H-m_{H'} =(t-1)\sum_{A\subseteq D_3} \bigl(f_{1,\ell}(A)-f_{2,\ell}(A)\bigr)^2>0.\tag{6}\] Here the strict positivity uses \(t\ge2\) and the choice of \(\ell\).
It remains to count the reverse ordered pairs. Let \(\mu_X\) be the multiplicity of \(M\) in \(\Lambda_{r,X}(D_H,S_1)\), where \(X\in\{H,H'\}\). Split the degree-\(r\) vertices in \(D_H\) into \[U_C:=\{x^{(j)}:x\in S,\;d_G(x)=\ell,\;j\in\{2,\ldots,t\}\},\] \[U_D:=\{z^{(j)}:z\in D_1\cup D_2\cup D_3,\;d_G(z)=\ell,\;j\in[t]\}.\] Write \[\mu_X=\nu_X^C+\nu_X^D,\] where \(\nu_X^C\) and \(\nu_X^D\) denote the contributions from \(U_C\) and \(U_D\), respectively.
For \(U_C\), the same argument as above, now using ordered pairs \((x^{(j)},y^{(1)})\) with \(j\ge2\), gives \[\label{eq:nuC-positive} \nu_H^C-\nu_{H'}^C =(t-1)\sum_{A\subseteq D_3} \bigl(f_{1,\ell}(A)-f_{2,\ell}(A)\bigr)^2.\tag{7}\]
We now show that \[\label{eq:nuD-equal} \nu_H^D=\nu_{H'}^D.\tag{8}\] Fix \(u=z^{(j)}\in U_D\). If \(y\in S\) and \(d_G(y)<\ell\), then \[d_H(y^{(1)})=d_{H'}(y^{(1)})=td_G(y)+(t-1)<M,\] so neither \(\lambda_H(u,y^{(1)})\) nor \(\lambda_{H'}(u,y^{(1)})\) can be equal to \(M\). If \(d_G(y)=\ell\), then Lemma 4, applied with the roles of the two vertices interchanged, again gives \[\lambda_H(u,y^{(1)})<M, \qquad \lambda_{H'}(u,y^{(1)})<M.\]
It remains to consider vertices \(y\in S\) with \(d_G(y)>\ell\). Let \(B:=\tau(y)\). By 2 , such a type \(B\) satisfies \(|B|>\ell-\kappa\). Hence, by the maximality of \(\ell\), the number of vertices of type \(B\) in \(C_1\) equals the number of vertices of type \(B\) in \(C_2\). By Lemma 7, for this fixed \(u\) the switch interchanges the common-neighbour values attached to the two sides for each fixed type \(B\). Since the two sides contain equally many vertices of type \(B\), the total number of occurrences of the value \(M\) contributed by degree larger than \(\ell\) is the same in \(H\) and \(H'\). This proves 8 .
Combining 7 and 8 , we obtain \[\mu_H-\mu_{H'} =(t-1)\sum_{A\subseteq D_3} \bigl(f_{1,\ell}(A)-f_{2,\ell}(A)\bigr)^2>0.\] Together with 6 , this shows that the multiplicity of \(M\) in \[\Lambda_{r,H}(S_1,D_H)\sqcup\Lambda_{r,H}(D_H,S_1)\] is strictly larger than its multiplicity in \[\Lambda_{r,H'}(S_1,D_H)\sqcup\Lambda_{r,H'}(D_H,S_1).\] By Lemma 2 (b), \(H\) and \(H'\) are non-isomorphic. ◻
Let \(G\) be a finite simple graph with adjacency matrix \(A\). Let \({\mathcal{H}}\) be a finite graph, possibly with loops but without multiple edges, with adjacency matrix \(A_{{\mathcal{H}}}\). The weak tensor product \({\mathcal{H}}\times G\) is the graph on \(V({\mathcal{H}})\times V(G)\) with adjacency matrix \[A_{{\mathcal{H}}}\otimes A.\] Equivalently, \((u,x)\) and \((v,y)\) are adjacent if and only if \((A_{{\mathcal{H}}})_{uv}=1\) and \(xy\in E(G)\). Since \(A\) has zero diagonal, \({\mathcal{H}}\times G\) is simple even when \({\mathcal{H}}\) has loops. In particular, if \(\mathcal{K}_t^\circ\) is the complete graph on \(t\) vertices with a loop at every vertex, then \(A_{\mathcal{K}_t^\circ}=J_t\), and hence \(A_{\mathcal{K}_t^\circ\times G}=J_t\otimes A\). After the natural identification of \(V(\mathcal{K}_t^\circ)\times V(G)\) with \(V(G)\times[t]\), this is precisely the \(t\)-coclique extension of \(G\).
For \(u,v\in V({\mathcal{H}})\), define \[\lambda_{{\mathcal{H}}}^+(u,v):=(A_{{\mathcal{H}}}^2)_{uv}.\] If \({\mathcal{H}}\) is simple, then this is the usual common-neighbour number in \({\mathcal{H}}\); in general it counts length-two walks from \(u\) to \(v\).
In this section, let \(G\) be WQH-type with vertex partition \(C_1\sqcup C_2\sqcup D_1\sqcup D_2\sqcup D_3\). Put \(S:=C_1\cup C_2\) and \(Y:=V(G)\setminus S\). Let \(G'\) be the WQH-switched graph with respect to \((G,C_1,C_2)\), and let \(Q\) be the WQH-switching matrix. Then the adjacency matrix of \(G'\) is \(A':=QAQ.\) Set \[A^{\mathrm r}:=QA.\] For \(i\in V({\mathcal{H}})\), let \(E_{ii}\) be the diagonal matrix unit corresponding to \(i\), and define \[\label{eq:Qhat} \widehat Q_i:=I\otimes I+E_{ii}\otimes(Q-I).\tag{9}\] Thus \(\widehat Q_i\) acts as \(Q\) on the fibre \(\{i\}\times V(G)\) and as the identity on all other fibres. We define \(({\mathcal{H}}\times G)'_i\) to be the graph, if it exists, with adjacency matrix \[\widehat Q_i(A_{{\mathcal{H}}}\otimes A)\widehat Q_i.\] The theorem below proves that this matrix is indeed an adjacency matrix under the stated assumptions.
Theorem 8. Let \(G\) be a WQH-type graph with vertex partition \(C_1\sqcup C_2\sqcup D_1\sqcup D_2\sqcup D_3\), and keep the notation above. Assume that:
for every \(u\in S\), \(d_{C_1}(u)=d_{C_2}(u)\);
\(\overline{\Lambda}_G(S)=\overline{\Lambda}_{G'}(S)\);
there exists \(x_0\in S\) such that \(d_G(x_0)>\max_{x,y\in S}(A^{\mathrm r} A)_{xy}\).
Let \({\mathcal{H}}\) be a finite graph, possibly with loops but without multiple edges. For \(i\in V({\mathcal{H}})\), set \(X_i:=\{i\}\times S.\) If there exists \(j\in V({\mathcal{H}})\) such that \(j\ne i\) and \(\lambda_{{\mathcal{H}}}^+(i,j)>0\), then the following statements hold:
The matrix defining \(({\mathcal{H}}\times G)'_i\) is the adjacency matrix of the graph obtained from \({\mathcal{H}}\times G\) by WQH-switching on the pair \((\{i\}\times C_1,\{i\}\times C_2)\).
The graphs \({\mathcal{H}}\times G\) and \(({\mathcal{H}}\times G)'_i\) are cospectral.
The external multiset changes: \(\overline{\Lambda}_{{\mathcal{H}}\times G}(X_i) \ne \overline{\Lambda}_{({\mathcal{H}}\times G)'_i}(X_i).\) Moreover, if \(|D_1|=|D_2|\), then \({\mathcal{H}}\times G\) and \(({\mathcal{H}}\times G)'_i\) are non-isomorphic.
Proof. Let \(B:=A_{{\mathcal{H}}}\otimes A\) and \(B_i':=\widehat Q_iB\widehat Q_i.\) We first prove (a) and (b).
Let \[N_{{\mathcal{H}}}(i):=\{h\in V({\mathcal{H}}):(A_{{\mathcal{H}}})_{ih}=1\},\] where \(i\in N_{{\mathcal{H}}}(i)\) is allowed when \(i\) has a loop. Consider the following partition of \(V({\mathcal{H}}\times G)\): \[C_1':=\{i\}\times C_1, \qquad C_2':=\{i\}\times C_2,\] \[D_1':=N_{{\mathcal{H}}}(i)\times D_1, \qquad D_2':=N_{{\mathcal{H}}}(i)\times D_2,\] \[D_3':=V({\mathcal{H}}\times G)\setminus(C_1'\sqcup C_2'\sqcup D_1'\sqcup D_2').\] This is a WQH-type partition. Conditions (P1), (P3), and (P4) follow directly from the definition of the weak tensor product and from the WQH partition of \(G\). Condition (P2) follows from (W1), since the only possible adjacencies inside \(C_1'\cup C_2'\) come from a loop at \(i\). For (P5), let \((h,z)\in D_3'\). If \(h\notin N_{{\mathcal{H}}}(i)\), then \((h,z)\) has no neighbours in either \(C_1'\) or \(C_2'\). If \(h\in N_{{\mathcal{H}}}(i)\) and \(z\in D_3\), then equality of the two numbers of neighbours follows from the WQH condition \(d_{C_1}(z)=d_{C_2}(z)\). If \(h\in N_{{\mathcal{H}}}(i)\) and \(z\in S\), then it follows from (W1).
By (W1) and the explicit formula for \(Q\), the row-switched matrix \(A^{\mathrm r}=QA\) is a \(0\)-\(1\) matrix: on the rows indexed by \(C_1\cup C_2\), it swaps the incidences with \(D_1\) and \(D_2\) and leaves all other entries unchanged; outside \(C_1\cup C_2\) it is equal to \(A\). Since \(Q\) is symmetric, \(AQ=(A^{\mathrm r})^\top\) is also a \(0\)-\(1\) matrix. The block form of \(B_i'\), with blocks indexed by \(V({\mathcal{H}})\), is \[\label{eq:Bi-prime} (B_i')_{uv}= \begin{cases} (A_{{\mathcal{H}}})_{ii}A', & u=v=i,\\[1mm] (A_{{\mathcal{H}}})_{iv}A^{\mathrm r}, & u=i,\;v\ne i,\\[1mm] (A_{{\mathcal{H}}})_{ui}(A^{\mathrm r})^\top, & u\ne i,\;v=i,\\[1mm] (A_{{\mathcal{H}}})_{uv}A, & u\ne i,\;v\ne i. \end{cases}\tag{10}\] Hence \(B_i'\) is a symmetric \(0\)-\(1\) matrix. Its diagonal is zero because \(A\) and \(A'\) have zero diagonal. Thus \(B_i'\) is the adjacency matrix of a simple graph. From the WQH partition above and the same block description, this graph is exactly the graph obtained from \({\mathcal{H}}\times G\) by WQH-switching on \((C_1',C_2')=(\{i\}\times C_1,\{i\}\times C_2)\). This proves (a).
Since \(\widehat Q_i^\top=\widehat Q_i\) and \(\widehat Q_i^2=I\), the matrices \(B\) and \(B_i'\) are similar. Hence \({\mathcal{H}}\times G\) and \(({\mathcal{H}}\times G)'_i\) are cospectral. This proves (b).
It remains to prove (c). Decompose \[\overline{\Lambda}_{{\mathcal{H}}\times G}(X_i)=\mathcal{M}_1\sqcup\mathcal{M}_2\sqcup\mathcal{M}_3,\] where \[\mathcal{M}_1:=\{\lambda_{{\mathcal{H}}\times G}((i,x),(i,y)):x\in S,\;y\in Y\},\] \[\mathcal{M}_2:=\{\lambda_{{\mathcal{H}}\times G}((i,x),(h,y)):x\in S,\;h\ne i,\;y\in Y\},\] \[\mathcal{M}_3:=\{\lambda_{{\mathcal{H}}\times G}((i,x),(h,y)):x\in S,\;h\ne i,\;y\in S\}.\] Define \(\mathcal{M}_1',\mathcal{M}_2',\mathcal{M}_3'\) analogously for \(({\mathcal{H}}\times G)'_i\).
Since \[B^2=(A_{{\mathcal{H}}}^2)\otimes A^2, \qquad (B_i')^2=\widehat Q_i\bigl((A_{{\mathcal{H}}}^2)\otimes A^2\bigr)\widehat Q_i,\] we can compare the three parts explicitly.
First, for \(x\in S\) and \(y\in Y\), \[\lambda_{{\mathcal{H}}\times G}((i,x),(i,y)) =\lambda_{{\mathcal{H}}}^+(i,i)\lambda_G(x,y),\] whereas, by 10 , \[\lambda_{({\mathcal{H}}\times G)'_i}((i,x),(i,y)) =\lambda_{{\mathcal{H}}}^+(i,i)\lambda_{G'}(x,y).\] By (W2), it follows that \(\mathcal{M}_1=\mathcal{M}_1'\).
Second, fix \(h\ne i\). For \(x\in S\) and \(y\in Y\), \[\lambda_{{\mathcal{H}}\times G}((i,x),(h,y)) =\lambda_{{\mathcal{H}}}^+(i,h)\lambda_G(x,y).\] On the other hand, by 10 , \[\lambda_{({\mathcal{H}}\times G)'_i}((i,x),(h,y)) =\lambda_{{\mathcal{H}}}^+(i,h)(A^{\mathrm r} A)_{xy}.\] Since \(y\in Y\) and \(Qe_y=e_y\), we have \[(A^{\mathrm r} A)_{xy}=(QA^2)_{xy}=(QA^2Q)_{xy}=((A')^2)_{xy}=\lambda_{G'}(x,y).\] Using (W2) again, the multiset corresponding to this fixed \(h\) is unchanged. Taking the disjoint union over all \(h\ne i\) gives \(\mathcal{M}_2=\mathcal{M}_2'\).
It remains to compare \(\mathcal{M}_3\) and \(\mathcal{M}_3'\). Put \(k_0:=d_G(x_0).\) Choose \(\hat{h}\ne i\) such that \[\rho:=\lambda_{{\mathcal{H}}}^+(i,\hat{h})=\max_{h\ne i}\lambda_{{\mathcal{H}}}^+(i,h)>0.\] Before switching, \[\lambda_{{\mathcal{H}}\times G}((i,x_0),(\hat{h},x_0)) =\rho\lambda_G(x_0,x_0) =\rho k_0.\] Thus the value \(\rho k_0\) occurs in \(\mathcal{M}_3\).
After switching, for any \(x,y\in S\) and any \(h\ne i\), \[\lambda_{({\mathcal{H}}\times G)'_i}((i,x),(h,y)) =\lambda_{{\mathcal{H}}}^+(i,h)(A^{\mathrm r} A)_{xy}.\] By (W3), and since \((A^{\mathrm r} A)_{xy}\) is a nonnegative integer, we have \((A^{\mathrm r} A)_{xy}\le k_0-1\). Moreover, \(0\le\lambda_{{\mathcal{H}}}^+(i,h)\le\rho\). Hence \[\lambda_{({\mathcal{H}}\times G)'_i}((i,x),(h,y)) \le \rho(k_0-1) < \rho k_0.\] So the value \(\rho k_0\) does not occur in \(\mathcal{M}_3'\).
Since \(\mathcal{M}_1=\mathcal{M}_1'\) and \(\mathcal{M}_2=\mathcal{M}_2'\), while \(\rho k_0\) occurs in \(\mathcal{M}_3\) and not in \(\mathcal{M}_3'\), we obtain \[\overline{\Lambda}_{{\mathcal{H}}\times G}(X_i) \ne \overline{\Lambda}_{({\mathcal{H}}\times G)'_i}(X_i).\] This proves the asserted change of the external multiset.
Finally assume \(|D_1|=|D_2|\). Then, for the WQH partition of \({\mathcal{H}}\times G\) displayed above, \[|D_1'|=|N_{{\mathcal{H}}}(i)|\,|D_1|=|N_{{\mathcal{H}}}(i)|\,|D_2|=|D_2'|.\] By Lemma 2 (c), the change of the external multiset implies that \({\mathcal{H}}\times G\) and \(({\mathcal{H}}\times G)'_i\) are non-isomorphic. ◻
In this section we include some simple consequence of the matrix form of WQH-switching for several standard graph matrices. This is analogous to the corresponding discussion for GM-switching in [20].
Let \(G\) be a WQH-type graph with adjacency matrix \(A=A_G\), and let \(G'\) be its WQH-switched graph. Let \(Q\) be the WQH-switching matrix defined in 1 . Thus \[A_{G'}=QA_GQ, \qquad Q^\top=Q, \qquad Q^2=I.\] Moreover, since each row of \(Q\) has sum one, we have \(Q\mathbf{1}=\mathbf{1}.\) Consequently, \[QJQ=J, \qquad QIQ=I.\]
Let \(D_G\) denote the diagonal degree matrix of \(G\). For real numbers \(\alpha,\beta,\gamma,\delta\), define \[M_{\alpha,\beta,\gamma,\delta}(G) := \alpha A_G+\beta J+\gamma I+\delta D_G.\] When \(\delta=0\), this is a generalized adjacency matrix in the usual sense.
Proposition 9. Let \(G\) be a WQH-type graph, and let \(G'\) be its WQH-switched graph.
For all real numbers \(\alpha,\beta,\gamma\), \[M_{\alpha,\beta,\gamma,0}(G') = Q M_{\alpha,\beta,\gamma,0}(G) Q.\] In particular, \(G\) and \(G'\) are cospectral with respect to every generalized adjacency matrix.
Suppose, in addition, that \(D_{G'}=QD_GQ.\) Then, for all real numbers \(\alpha,\beta,\gamma,\delta\), \[M_{\alpha,\beta,\gamma,\delta}(G') = Q M_{\alpha,\beta,\gamma,\delta}(G) Q.\] In particular, \(G\) and \(G'\) are cospectral with respect to the Laplacian matrix \(L_G:=D_G-A_G\) and the signless Laplacian matrix \(L_G^+:=D_G+A_G.\)
The condition in (b) holds, for example, if all vertices in \(C_1\cup C_2\) have the same degree in \(G\).
Proof. For (a), using \(A_{G'}=QA_GQ\), \(QJQ=J\), and \(QIQ=I\), we obtain \[\begin{align} Q M_{\alpha,\beta,\gamma,0}(G)Q &= Q(\alpha A_G+\beta J+\gamma I)Q = \alpha A_{G'}+\beta J+\gamma I= M_{\alpha,\beta,\gamma,0}(G'). \end{align}\] Since \(Q\) is orthogonal, the two matrices are similar and hence cospectral.
For (b), the same computation gives \[\begin{align} Q M_{\alpha,\beta,\gamma,\delta}(G)Q = \alpha A_{G'}+\beta J+\gamma I+\delta D_{G'}= M_{\alpha,\beta,\gamma,\delta}(G'). \end{align}\] Taking \((\alpha,\beta,\gamma,\delta)=(-1,0,0,1)\) gives \(L_G=D_G-A_G\), while taking \((\alpha,\beta,\gamma,\delta)=(1,0,0,1)\) gives \(L_G^+=D_G+A_G\).
It remains to prove (c). Suppose that all vertices in \(C_1\cup C_2\) have the same degree in \(G\). Since \(Q\) acts nontrivially only on the coordinates indexed by \(C_1\cup C_2\), the degree matrix \(D_G\) commutes with \(Q\), and hence \(QD_GQ=D_G.\) Moreover, \[A_{G'}\mathbf{1} = QA_GQ\mathbf{1} = QA_G\mathbf{1} = QD_G\mathbf{1} = D_G\mathbf{1}.\] Thus \(G'\) has the same degree matrix as \(G\), namely \(D_{G'}=D_G=QD_GQ.\) This proves (c). ◻
We conclude with several consequences of the preceding non-isomorphism criteria from Theorem 3 and 8.
Let \(G\) be a WQH-type graph satisfying (W1)–(W3) of Theorem 8, and suppose that \(|D_1|=|D_2|\). If \(\mathcal{H}\) has two distinct vertices \(i,j\) with \(\lambda_{\mathcal{H}}^{+}(i,j)>0,\) then Theorem 8 gives a cospectral mate \((\mathcal{H}\times G)'_i\) of \(\mathcal{H}\times G\), and the two graphs are non-isomorphic. Hence this product graph is not determined by its adjacency spectrum. In particular, one may take \(\mathcal{H}=P_3\), with \(i,j\) the two end vertices, or \(\mathcal{H}=K_m\) with \(m\ge3\).
Theorem 8 also gives applications to coclique extensions. Let \(\mathcal{K}_t^\circ\) denote the complete graph on \(t\) vertices with a loop at every vertex. Then \(\mathcal{K}_t^\circ\times G\) has adjacency matrix \(J_t\otimes A_G\), and hence is naturally isomorphic to the \(t\)-coclique extension of \(G\). Since \[\lambda_{\mathcal{K}_t^\circ}^{+}(i,j)=t>0 \qquad (i\ne j),\] Theorem 8 shows that, for every \(t\ge2\), the \(t\)-coclique extension of such a graph \(G\) has a non-isomorphic cospectral mate.
Theorem 3 gives another family of examples. Since Theorem 3 holds for \(t\ge2\), it applies in particular to \(2\)-clique extensions. The clique-extension constructions in [21] fit into this setting: the untwisted graph is a \(2\)-clique extension of the corresponding base graph, and the elementary twists are realized by WQH-switchings. The resulting switched graphs are cospectral with the untwisted graph, while the non-isomorphism is detected by the common-neighbour data appearing in Theorem 3.
Finally, one known WQH-switching construction has a non-isomorphism proof of the same common-neighbour type. In [12], the generalized Johnson graph \(J_{\{2\}}(n,4)\) is edge-regular, whereas after WQH-switching one obtains an adjacent pair with more common neighbours than any adjacent pair in the original graph. Thus the non-isomorphism proof there is based on the same type of common-neighbour obstruction as Lemma 2, restricted to adjacent pairs.
Aida Abiad is supported by NWO (Dutch Research Council) through the grant VI.Vidi.213.085. Hong-Jun Ge is supported by the CSC Scholarship Program (No. 202506340038).