---
title: Friends-and-Strangers Graphs
url: https://www.emergentmind.com/topics/friends-and-strangers-graphs
type: topic
---

# Friends-and-Strangers Graphs

Friends-and-strangers graphs are a family of highly structured combinatorial objects that encode configuration spaces in terms of allowed transpositions governed by two base graphs: a "position" or "movement" graph $X$ and a "friendship" graph $Y$. The vertices of $\mathsf{FS}(X, Y)$ are all bijections (permutations) between the vertex sets of $X$ and $Y$ (typically both $[n]$), and two configurations are adjacent if they differ by swapping the images of two adjacent positions (connected in $X$) provided that the corresponding "agents" (images in $Y$) are adjacent (i.e., friends) in $Y$. This construction generalizes classical puzzles (such as the 15-puzzle), token-swapping models, Cayley graph constructions on symmetric groups, and arises naturally across combinatorics, graph theory, probabilistic, and algebraic applications. Recent research has addressed structural properties including connectivity, $k$-connectivity, extremal and random thresholds, and diameter.

## 1. Formal Definition and Structural Foundations

Let $X$ and $Y$ be undirected graphs of order $n$ with $V(X) = V(Y) = [n]$. The friends-and-strangers graph $\mathsf{FS}(X, Y)$ is defined as follows:

- **Vertex set:** all bijections $\sigma : V(X) \to V(Y)$, i.e., the elements of the symmetric group $S_n$.
- **Edge set:** two bijections $\sigma, \sigma'$ are adjacent iff there exists $(a,b) \in E(X)$ such that $(i)$ $\{\sigma(a), \sigma(b)\} \in E(Y)$, $(ii)$ $\sigma'$ is obtained from $\sigma$ by swapping the images of $a$ and $b$, and $\sigma'(c) = \sigma(c)$ for all $c \ne a,b$.

This move is termed an “‘$(X,Y)$-friendly swap.’” The model is symmetric in $X$ and $Y$ (via inverse permutation), and generalizes the Cayley graph of $S_n$ generated by transpositions (when $Y$ is complete), token swapping (when $X$ encodes positions and $Y$ encodes agents), and classical reconfiguration puzzles.

## 2. Connectivity and $k$-Connectivity: Thresholds, Extremal, and Random Models

### 2.1 Deterministic Sufficient Conditions

The central extremal result for $k$-connectivity can be phrased in terms of maximum degree and vertex connectivity. For $s$-connectivity,

\[
\Delta(X) + \kappa(Y) \geq n + s - 1 \implies \mathsf{FS}(X, Y) \text{ is } s\text{-connected}
\]

provided at least one of $X$ or $Y$ is non-bipartite and $Y$ avoids a short list of exceptional graphs (e.g., $C_n$, certain $\theta$-graphs) [2504.00373]. That is, the presence of sufficiently "flexible" positions in $X$ (high degree) and robust global friendship connectivity in $Y$ together guarantee both classical and higher parameters of connectivity.

When both $X$ and $Y$ are bipartite, there is an unavoidable parity obstruction: $\mathsf{FS}(X, Y)$ splits into two components, but the same $(\Delta(X), \kappa(Y))$ bound is sufficient to ensure each component is $s$-connected.

### 2.2 Minimum Degree Thresholds

A complementary and more refined extremal criterion is the minimum degree bound for classical ($1$-)connectivity. It is shown that

\[
d_n = (3n)/5 + O(1)
\]

is both necessary and sufficient: if both $\delta(X), \delta(Y) \geq d_n$ then $\mathsf{FS}(X, Y)$ is connected [2107.06789]. For bipartite graphs, analogous sharp thresholds are known; e.g., for $X, Y$ edge-subgraphs of $K_{r,r}$, connectivity up to parity occurs if $\delta(X) + \delta(Y) \geq \lfloor 3r/2 \rfloor + 1$ [2309.03848].

### 2.3 Probabilistic and Random Graph Regimes

If $X \sim \mathcal G(n, p_1)$, $Y \sim \mathcal G(n, p_2)$, then the sharp threshold for whp ($k$-)connectivity is governed by

\[
p_1 p_2 \geq p_0^2 = n^{-1 + o(1)} \quad \text{where} \;\; p_0 = n^{-1/2 + o(1)}
\]

i.e., as soon as $p_1$ and $p_2$ are sufficiently large to ensure $p_1 p_2 \gtrsim n^{-1+o(1)}$, $\mathsf{FS}(X,Y)$ becomes $k$-connected with high probability [2410.21334, 2208.00801]. Below this regime, disconnectedness with isolated vertices is typical. These results are asymptotically tight: for all $p_1p_2 < n^{-1+o(1)}$, $\mathsf{FS}(X,Y)$ fails to be connected, and for $p_1p_2 \gtrsim n^{-1+o(1)}$, connectivity (and even $k$-connectivity) emerges.

## 3. Diameter Bounds and Algorithmic Results

Early work provided polynomial diameter bounds in special cases [2201.00665]. If $X$ is a path, every component of $\mathsf{FS}(X,Y)$ has $O(n^2)$ diameter; for cycles, the bound is $O(n^4)$ (improvable to $O(n^3)$ if $\mathsf{FS}$ is connected).

The most recent expansion [2509.23511] proves that when $X$ is a star, the diameter of each component is $O(n^4)$, and that for sufficiently high minimum degree in both $X$ and $Y$, the diameter is polynomially bounded. Explicit efficient algorithms are provided for transforming any configuration to any other within the same connected component.

For $X, Y$ drawn independently from $\mathcal G(n, p)$, if $pq \ge c \log n / n$ for some constant $c > 0$, then with high probability all connected components of $\mathsf{FS}(X,Y)$ have diameter at most $O(n^6)$, thus confirming that in the high-density random regime, polynomial-length reconfiguration sequences suffice with overwhelming probability. Whether the true bound is lower (e.g., $O(n^2)$ or $O(n^4)$) is the subject of ongoing research.

## 4. Structural and Extremal Characterizations

Special families of base graphs yield precise characterizations for connectivity:

- **Lollipop and dandelion graphs**: For $X$ a lollipop or dandelion graph, $\mathsf{FS}(X, Y)$ is connected if and only if $Y$ is $(n-k+1)$-connected, where $k$ is the size of the complete part [2211.07458, 2504.00373].
- **Complete bipartite/multipartite cases**: For $X$ a complete bipartite, $K_{k,n-k}$, and $Y$ meeting certain connectivity and non-bipartiteness criteria, $\mathsf{FS}(X,Y)$ is connected [2302.00900, 2307.08121].
- **Stars and cycles**: Wilson’s criterion connects the classical unsolvability of certain puzzles (the 15-puzzle) to disconnectedness in $\mathsf{FS}(X,Y)$ when $X$ is a star [2009.05040].

These results not only generalize known theorems in permutation and puzzle theory but also provide a precise bridge between combinatorial graph parameters and the global reconfiguration structure.

## 5. Interplay with Random Structures, Cycle Spaces, and Open Problems

The structure of $\mathsf{FS}(X, Y)$ interacts with deep combinatorial and algebraic invariants:

- The cycle space for $\mathsf{FS}$ graphs associated to paths and cycles is spanned by small cycles (4-cycles, 6-cycles) provided sufficient domination or triangle-freeness in $Y$ [2209.01704].
- Mixing times for random walks on $\mathsf{FS}(X, Y)$ components inherit the diameter bounds; thus, in regimes where diameter is polynomially bounded, mixing times for local random walks are also polynomial.
- Open questions include tightening the diameter exponent in random models, closing remaining gaps in minimum degree and $k$-connectivity thresholds, exploring expanders and cutwidth for $\mathsf{FS}(X, Y)$ under various $X$, $Y$, and extending to multiplicity and directed variants [2210.03864, 2403.00966].

## 6. Broader Context and Applications

The study of friends-and-strangers graphs unifies problems in group theory (Cayley graphs), combinatorial reconfiguration, Markov chain mixing, and even design theory (e.g., regular friendship digraphs correspond to SBIBDs) [2305.04058]. Applied directions include:

- **Sliding puzzles and token swapping**: Rigorous polynomial solvability bounds for sliding puzzles with arbitrary underlying movement and friendship graphs.
- **Network design and coding theory**: Connectivity and expansion in $\mathsf{FS}(X,Y)$ reflect robust resource allocation and communication in network models.
- **Random graph theory and phase transitions**: The abrupt emergence of $k$-connectivity at explicit probabilistic thresholds is an analogue of classical results for random graphs, but in the much richer configuration space.

## 7. Summary Table: Connectivity and Diameter Results

| Property                | Deterministic Bound            | Random Regime                          | Source                |
|-------------------------|-------------------------------|----------------------------------------|-----------------------|
| Connectivity threshold  | $\delta(X), \delta(Y) \ge d_n$ with $d_n \sim 3n/5$ | $p_1p_2 \gtrsim n^{-1+o(1)}$           | [2107.06789][2009.07840]
| $k$-connectivity        | $\Delta(X) + \kappa(Y) \ge n + k - 1$               | $p_1p_2 \gtrsim n^{-1+o(1)}$           | [2504.00373][2410.21334]|
| Diameter                | $O(n^4)$ for star, $O(n^2)$ for path                | $O(n^6)$ with $pq \gtrsim \log n / n$  | [2509.23511][2201.00665]|


## References

- [2009.05040], [2009.07840], [2107.06789], [2201.00665], [2203.10337], [2208.00801], [2209.01704], [2210.03864], [2210.04768], [2211.07458], [2302.00900], [2305.04058], [2307.08121], [2309.03848], [2403.00966], [2410.21334], [2504.00373], [2509.23511].

---

In conclusion, the theory of friends-and-strangers graphs integrates extremal combinatorics, random graph theory, permutation group actions, and algorithmic reconfiguration, with ongoing advances in higher connectivity, diameter bounds, probabilistic phase transitions, and connections to classic problems such as the 15-puzzle and Cayley graph mixing. Recent advances place tight bounds on thresholds for connectivity and provide explicit polynomial algorithms in both deterministic and high-density random regimes, with open problems remaining for tightening diameter bounds and understanding finer-grained properties of their configuration spaces.

Source: https://www.emergentmind.com/topics/friends-and-strangers-graphs