WorksMathematics
Tight Probabilistic Aspects of Friends-and-Strangers Graphs
Abstract
Friends-and-strangers graphs, introduced by Defant and Kravitz, model arrangements of people on positions. We consider two graphs and on vertices. The vertices of represent positions with edges denoting adjacencies while the vertices of represent people with edges denoting friendships. Their friends-and-strangers graph is denoted by . Its vertices are all one-to-one placements of people on positions, and two placements are adjacent if one can swap two friends on adjacent positions to get from one placement to the other. A fundamental question is whether or not a friends-and-strangers graph is connected. A natural probabilistic analog is ``If and are independently sampled Erdős–Rényi graphs with vertices and edge probability what is the threshold probability for to be connected with high probability?'' Alon, Defant, and Kravitz (2023) showed that is the threshold probability and conjectured that Milojević (2024) disproved this by showing is necessary for connectivity with high probability. In this work, we prove a matching upper bound, thus establishing that the threshold is
Introduction
Friends-and-strangers graphs were formalized by Defant and Kravitz [7].
Definition 1.1. Given two graphs and each on vertices, the friends-and-strangers graph is defined as follows. Its vertex set is the set of bijections , and and are adjacent if and only if for some with and . In this case, we say and differ by an -friendly swap.
Throughout this paper, we will adopt two conventions. First, we identify both vertex sets with , i.e., . Thus, the bijections will actually be permutations on . Second, when referring to vertices of we will add a prime, i.e., , and when referring to vertices of we will omit the prime, i.e., .
Remark 1.2. Friends-and-strangers graphs have a natural interpretation. Let the graph represent distinct positions, and let its edges denote adjacencies between positions. Similarly, let the graph represent people, and let edges denote friendships. Friendship is not transitive in our problem. A bijection from to is a placement of people on the positions. Two placements are an -friendly swap apart if two friends standing on adjacent positions can swap positions to get from one placement to the other. The graph thus has a vertex set consisting of the placements and the edges are all of the pairs of placements differing by an -friendly swap. We will use this interpretation throughout this paper.
Example 1.3. Let be the path graph on 3 vertices. Then is the graph shown in Figure 1. This example was also mentioned in Defant and Kravitz [7, Example 1.1].
Figure 1. The graph . The labels on the vertices mark the bijection from the positions to the people the vertex corresponds to, e.g., 312 represents person 3 is at position 1, person 1 is at position 2, and person 2 is at position 3.
In their initial paper, Defant and Kravitz [7] studied the basic properties of and characterized the connected components of and using acyclic and toric acyclic orientations. Bangachev [4] investigated extremal minimum-degree conditions guaranteeing connectivity, while Zhao, You, Lin, and Zhang [14] subsequently established sufficient conditions for higher connectivity in terms of the maximum degree of and the vertex connectivity of . Krishnan and Li [9] studied the vertex connectivity of friends-and-strangers graphs, obtaining tight bounds for certain classes of friends-and-strangers graphs as well as sufficient extremal and probabilistic conditions. Regarding diameter, Jeong [8] constructed friends-and-strangers graphs with connected components of exponentially large diameter, while Akella and Li [1] established polynomial diameter bounds under suitable minimum-degree assumptions. More recently, Mawhinney [10] resolved a conjecture of Bangachev, proving that is connected whenever are connected and
and obtained asymptotically sharp diameter bounds under the same assumptions. Finally, Yang and Zhang [13] showed that deciding whether two configurations belong to the same connected component of is PSPACE-complete.
Previous Probabilistic Results
Most relevant to our paper are previous probabilistic results on friends-and-strangers graphs. Let be a random subgraph of constructed by including each edge independently with probability . We write . The original probabilistic question is the following.
Question 1.4 (Canonical Question). Let be independently sampled from where . What is the threshold probability for to be connected?
In 2021, Alon, Defant, and Kravitz [2] proved the following.
Theorem 1.5 ([2 Theorem 1.1]). Fix some small . Let and be independently-chosen random graphs in , where depends on . If
then is disconnected with high probability. If
then is connected with high probability.
Notice that this implies the threshold probability is . Alon, Defant, and Kravitz conjectured that the true threshold was but this was disproved in 2023 by Milojević [11].
Theorem 1.6 ([11 Theorem 1.2]). There exists a constant with the following property. For a large positive integer and
if we choose random graphs and in independently, has an isolated vertex with high probability.
Milojević further conjectured that was the correct probability threshold [11 Conjecture 6.1].
An important variation of the canonical question is the asymmetric version, sampling and independently. In 2022, Wang and Chen considered this asymmetric version.
Theorem 1.7 ([12 Theorem 1.3]). Fix some small , and let and be independently chosen random graphs in and , respectively, where and depend on . Let . If either
or
then is disconnected with high probability. If
where , then is connected with high probability.
Heuristic Argument
A heuristic argument shows why is a reasonable threshold. We compare with a random graph having the same numbers of vertices and edges. has vertices and exactly
edges. Indeed, to obtain an edge, we choose a position edge , a friendship , and a placement of the remaining people on the remaining positions. The two ways of placing on give the endpoints of one friendly swap edge, and every edge arises uniquely in this way.
Thus, for independent and , the expected average degree of is . A uniformly random graph on vertices becomes connected around average degree [5]. Equating with gives precisely .
Main Result
In this paper, we fully resolve the asymmetric upper bound.
Theorem 1.8. There exists a constant such that the following holds. Let and be independently sampled Erdős–Rényi random graphs. If
then is connected with high probability.
This is tight because is disconnected if it has an isolated vertex which occurs if there is a graph packing of and into such that neither share an edge [2]. The following mainly follows from Bollobás, Janson, and Scott [6] who determine the probability of such a packing existing when and are bounded away from 1 (leaving the remaining case where one of or is close to 1).
Proposition 1.9 ([3 Corollary 1.3]). There exists a constant such that the following holds. Let and be independently sampled Erdős–Rényi random graphs. If
then is disconnected with high probability.
Remark 1.10. Recently, Baldissera, Dias do Couto, Griffiths, and Moreira [3] concurrently established the same connectivity threshold . Their proof extends the embedding-based approach of Alon, Defant, and Kravitz through a technically involved analysis of expansion in induced subgraphs of friendship neighborhoods, which is then used to embed auxiliary graphs.
By contrast, our proof is considerably more elementary than both their argument and the original approach of Alon, Defant, and Kravitz. We introduce a technique called movability, which reduces connectivity to the ability to move individual people between adjacent positions. This allows us to replace the elaborate embedding constructions of [2, 3] with two simple arms joined by a friendship edge. In particular, our argument avoids Janson’s inequality and relies only on standard concentration bounds, elementary random graph properties, and union bounds.
In terms of similarities, both proofs use a partition to obtain independence when testing friendship neighborhoods. They use expansion in these neighborhoods to embed auxiliary graphs. With our movability reduction we construct our auxiliary graphs directly using vertex connectivity.
Preliminaries
All graphs are finite and simple. We use the following standard graph-theoretic notation:
For a graph and , let denote the set of neighbors of , denote the degree of , and denote the minimum degree of .
For , let denote the subgraph of induced by .
A graph is -vertex-connected if and deleting any set of fewer than vertices leaves a connected graph. Its vertex connectivity is the largest for which is -vertex-connected.
An event holds with high probability if its probability tends to 1 as .
All constants in this paper are independent of ; a sufficiently large constant may be increased to satisfy finitely many requirements.
In the remainder of this section, we provide some probabilistic lemmas that will be used in later proofs. All of these statements are standard, and variations of these proofs may be found in [5]; we include the quantitative versions needed below.
The main concentration inequality we use is the Chernoff bound.
Lemma 2.1 (Chernoff bounds). Let be a binomial or hypergeometric random variable with mean . For every ,
The following lemmas give conditions for the following properties to hold:
Lemma 2.2: -vertex-connectivity,
Lemma 2.3: every pair of vertices having at least common neighbors,
Lemma 2.4: every pair of large disjoint sets of vertices connected by an edge,
Lemma 2.5: every pair of vertices connected by a short path of even length.
Lemma 2.2. For every fixed , there exists a constant with the following property. Let , and let where . Then is -vertex-connected with probability at least .
Proof. For sufficiently large , Chernoff and a union bound give as . Suppose but deleting a set , , disconnects . A smallest remaining component, with vertex set , satisfies that each vertex of has degree at least in . Since is a smallest remaining component, . For fixed , the probability no edge joins to is at most for large since for large . There are at most choices of of these sizes. Consequently, the failure probability is at most
Taking sufficiently large makes this at most .
Lemma 2.3. There exists a constant with the following property. Let , and let where
Then every two distinct vertices of have at least common neighbors with high probability.
Proof. For fixed distinct vertices , the number of their common neighbors has distribution , with mean . For sufficiently large and , we have and . By Chernoff,
A union bound over all pairs of vertices completes the proof.
Lemma 2.4. Let be an integer, and let where . Then, with probability at least , every two disjoint sets of vertices have an edge between them.
Proof. For fixed disjoint sets, the probability of no edge between them is . A union bound gives failure at most . ■
Lemma 2.5. There exists a constant with the following property. Let where . Then, with high probability, every two distinct vertices of are joined by a simple path of even length at most
Proof. Set . Let V(G)=A\mathbin{\mathaccent\cdot\cup}B\mathbin{\mathaccent\cdot\cup}J be an ordered balanced partition, i.e. with part sizes differing by at most one. Let such a partition be good if
and there is a triangle with , , and .
For a good partition, every and are joined by a simple even-length path of length at most . Indeed, take shortest paths from to in and from to in . Joining these paths through or through gives two simple – paths of opposite parity, each of length at most . Thus, it suffices to show every pair of vertices and satisfies and for some good partition A\mathbin{\mathaccent\cdot\cup}B\mathbin{\mathaccent\cdot\cup}J.
Because , for a fixed balanced partition, the diameter bound [5 Theorem 10.18] gives with high probability. Although Theorem 10.18 is stated for the fixed-edge model (i.e., their graph is randomly chosen from graphs with exactly edges), we can use a Chernoff bound to condition on having at least edges in induced subgraphs of .
A standard second-moment calculation gives the required triangle with high probability, since . Thus each fixed partition is good with probability , uniformly over balanced partitions. By linearity of expectation, the expected fraction of partitions that fail to be good is . Markov’s inequality then shows that this fraction is less than with high probability.
Fix a where the fraction of bad balanced partitions is at most . For any distinct vertices , a fraction of the ordered balanced partitions have and . Since this exceeds for sufficiently large , at least one of those partitions is good. ■
Movability
A critical idea in friends-and-strangers graphs is exchangeability which was first defined by Alon, Defant, and Kravitz [2]. Let and be two graphs on vertices and fix a bijection . Vertices with are -exchangeable from if there is a sequence of -friendly swaps transforming into $(u\ v)\circ\sigma.
Lemma 3.1 ([2 Lemma 2.9]). Let and be two graphs on vertices where is connected. Assume that for all vertices , and all permutations, , where , we have that and are -exchangeable from . Then is connected.
This notion is powerful because it reduces the global problem of connectivity into a more localized problem of swapping just two people on adjacent positions in a placement. Movability is an even more local condition building on exchangeability.
Definition 3.2. Let and be two graphs on vertices. Fix a bijection . Let be distinct vertices, write and , and suppose . Then, we write is -movable from if for every set of size at most there exists a series of friendly swaps moving from to which never swaps with any person in . We will refer to as the people we protect.
In what follows will be relatively small, in particular, . Thus, for sufficiently well connected graphs, movability is a substantially weaker requirement than exchangeability as we do not have to maintain the positions of the other people. Under restrictions (which are light from a probabilistic standpoint), we can show that movability implies exchangeability and thus, applying Lemma 3.1, movability implies is connected.
The idea behind the following lemmas is to first have a particular pair and with of friends-and-strangers graphs and a bijection , so that and are connected in . The idea then is to use movability to get into a situation where we can embed and into and respectively, swap and , and then reverse the movability steps to just get the original bijection with and swapped, implying exchangeability.
Lemma 3.3. Let , and let and be graphs on vertices where is a cycle and has two vertices and whose neighborhoods are both the other vertices. Let be a bijection where and are adjacent. Then, there exist friendly swaps in turning into .
Proof. Let have vertices appearing consecutively in the cycle. Let have vertices such that for every . Relabeling the remaining vertices according to , we may assume , , and for every . See Figure 2.

Figure 2. The graphs and in the statement of Lemma 3.3.
For each , perform the following swaps:
Initially, the first sequence moves backwards along the cycle, changing the occupants in the displayed position order from
After each step, every advances one position clockwise, and the consecutive pair advances one position clockwise with its order reversed. Initially, this pair occupies in the order . After steps, it again occupies , now in the order , since is odd. Meanwhile, each has made one complete circuit and returned to . Thus the final placement sends to , to , and every to , as required. ■
Lemma 3.4. Let , and let and be graphs on vertices. Suppose that
is -vertex-connected;
every edge of lies on an odd cycle of length at most ;
every two distinct vertices of have at least common neighbors.
Suppose further that, for every placement and every ordered pair with , , and , the movement is -movable from . Then is connected.
Proof. Since is connected, Lemma 3.1 reduces the claim to exchanging the occupants of any adjacent positions from any placement . Choose an odd cycle through with cyclic vertex order , for $1 \le s \le r$ and choose distinct common friends of $u, v.
We will now show how to move each onto for each . We will consider stages . At stage , protect the people
There are protected people. Their positions can be deleted while leaving connected, by -vertex-connectivity. Let be the current bijection from to . We can thus choose a path
avoiding the positions .
Initialize so that . By -movability, there is a sequence of friendly swaps moving from to without swapping any person in . Denote the resulting placement by . We can repeat for , and at the end, occupies , and every person in remains fixed.
After completing the above process for every stage, let be the resulting placement. Note that , , and for . Its cycle occupants are
Lemma 3.3 supplies friendly swaps on this cycle transforming into and restoring every to .
We now reverse the entire sequence used to place the common friends. No swap in that sequence involved or , so every reverse swap is still friendly after their exchange. More explicitly, let be the permutation of people produced by the placement sequence, so . Since fixes , it commutes with , and the final placement is
Thus and exchange positions and every other person returns to their original position. As this holds for every placement and position edge, is connected. See Figure 3 for an illustration of these steps when .

Figure 3. The exchangeability argument turning into . Unlabeled circles contain people whose identities are irrelevant to the argument.
This type of movement pattern with (where defined as in Lemma 3.3) appeared in Bangachev [4], e.g., see [4 Figures 10-12], but it was not formalized nor applied to the probabilistic setting where it drastically simplifies constructions.
We can now apply this to the canonical setting using standard random-graph estimates from § 2.
Corollary 3.5. Let and be independently sampled, where and . Let
Then, if with high probability, for every and every where , , and , we have is -movable from , then is connected with high probability.
Proof. We can just apply Lemma 3.4, noting that . Since , for sufficiently large , Lemma 2.2 gives that is -vertex-connected, Lemma 2.5 gives that every edge of is contained in an odd cycle of length at most , and Lemma 2.3 gives that every two distinct vertices of have at least common neighbors, all with high probability. ■
The rest of the paper will be devoted to showing is -movable from for every with high probability.
Construction
To show movability, we adopt the broad proof strategy of Alon, Defant, and Kravitz [2] which is to find auxiliary configurations in and which allow us to move . This is similar to the idea behind Lemma 3.4 where we embedded a construction in order to swap and .
Unlike Alon, Defant, and Kravitz, we will not need to give a specific graph and embed it into and . Our construction, because of movability, is much simpler, and thus can be found in and by specifying only its structural properties.
Fix a placement , distinct people , and their corresponding positions and , where . Also fix a set of people we are protecting.
For each , we have the following construction consisting of a simple cycle in , together with
a “port” position adjacent to ;
a “helper” person initially at ;
a “center” person initially at ;
and a path connecting to a vertex of other than such that all internal vertices of lie outside . The center is friends with every other person occupying a position in . We will call this construction an arm. To connect the two arms to and , we require
See Figure 4 for an illustration of this construction.
Figure 4. The arm construction used in Lemma 4.1.
If we can find two such arms which are vertex-disjoint and avoid , we can move just using friendly swaps within the arms, , and . Let be the subgraph of formed by the two arms, , and , and let be the subgraph of formed by the two arms, , and . Define .
Lemma 4.1. There are friendly swaps in turning into where .
Proof. For each , first move along onto . Every swap is friendly, and remains on . We then move around to as follows. If is not already at , choose the next position along the cycle towards . Move to along the arc of between and which does not contain the current position of . Finally, swap with . Repeat until occupies . All these swaps are friendly because is friends with every other person in arm .
Since the arms are disjoint and avoid , these procedures leave fixed and place at , respectively. Now perform the swaps
They are friendly by the three required friendships, and use the position edges , , and , respectively. The successive occupants of are therefore
Thus the resulting placement satisfies . ■
Endgame
In this section, let and be independently sampled, where and . Fix constants and , and choose sufficiently large afterwards. Throughout, let
Note and .
We will prove that every required movement is -movable by embedding the construction using Lemma 4.1, and then apply Corollary 3.5.
The main idea is to build one arm, using high vertex-connectivity and vertex degrees to construct the cycles and paths necessary. We then build two such arms in disjoint regions, varying the centers to obtain many possible helpers . Because of the many choices of arms, we can then choose arms with mutually friendly helpers and among the friends of and , respectively. This will then construct the two arms necessary.
For fixed , , , where , we call a position eligible if it does not belong to .
Finding one arm
We start by giving simple degree and vertex connectivity conditions for an arm to exist.
Lemma 5.1. Choose , and write . Let be any subset of .
Suppose that is 2-vertex-connected and that both and have at least two neighbors in . Then for every , there is an arm with , , and .
Proof. Choose different from . By 2-vertex-connectivity and Menger’s theorem, two internally vertex-disjoint paths between and form a simple cycle .
Choose different from . Since is connected, there is a path, possibly of length zero, from to avoiding . Stop at its first contact with and prepend the edge . This gives , with no internal vertex in .
Every other person used belongs to and is therefore friends with , as required. ■
Admissible partitions
We now determine the probabilities of the vertex connectivity and degree conditions of Lemma 5.1 occurring for a random .
Lemma 5.2. Fix of size , and independently include each position of with probability to obtain . With probability at least over , the graph is -vertex-connected and every position of has at least neighbors in .
Proof. Chernoff gives except with probability . Conditional on any such , the edges of remain independent, so
Since and , we have for sufficiently large . Thus and .
Lemma 2.2, with , bounds the failure of -vertex-connectivity by
for sufficiently large .
For each position , its degree into has distribution
and hence mean . Since , Chernoff and a union bound over all positions give the degree assertion with failure probability . Increasing makes the total failure probability at most . ■гылеит
Consider ordered balanced partitions
The sets consist of positions. For each , let be obtained by independently retaining each position of with probability .
We call the partition admissible for if
By Lemma 5.2 and Markov’s inequality, each fixed balanced partition fails to be admissible for with probability at most . Therefore, the expected fraction of inadmissible partitions is at most . Another application of Markov shows that, with probability at least , at least half of all balanced partitions are admissible for .
Uniformly finding arms
Lemma 5.3. All but fewer than eligible positions in can serve as in an arm with and all other positions in . For each fixed , this holds simultaneously for every admissible partition, all choices of as above, and both , with probability over .
Proof. Fix , an admissible partition, , and . Let be any set of eligible positions in . We show that some position in can serve as .
For each with , let
For the fixed placement, is obtained by independently retaining each position of with probability .
By admissibility, fails the connectivity or degree conclusion of Lemma 5.2 with probability at most . Moreover,
If neither event occurs, choose and let consist of the eligible positions in . Removing at most positions preserves 2-vertex-connectivity of and leaves both and with at least two neighbors in . Thus Lemma 5.1 gives the required arm.
Consequently, the probability that a fixed fails to produce an arm with endpoint in is at most
for sufficiently large .
These events are independent over the choices of , since each depends only on friendship edges between and people occupying , while the centers occupy the disjoint set . There are at least choices of . Hence the probability that every choice fails is at most
Taking a union bound over at most partitions, placements, choices of , choices each of , and two choices of , the total conditional failure probability is at most
Thus every set of eligible positions in contains a position supporting an arm, so fewer than eligible positions fail to support one.
Completing the proof
Theorem 5.4. With high probability, for every placement and every with , , and , the movement is -movable from .
Proof. With high probability, the following hold:
;
every two disjoint sets of people have a friendship between them;
at least half of the balanced partitions are admissible for ;
the conclusion of Lemma 5.3 holds.
Fix such , and fix with and .
Since , a uniformly random balanced partition satisfies
with probability , by the hypergeometric Chernoff bound. Since at least half of the partitions are admissible for , there exists an admissible partition satisfying both inequalities.
By Lemma 5.3, fewer than eligible positions in each fail to support an arm. Moreover, for sufficiently large ,
Therefore, after excluding the ineligible positions and those that fail to support arms, we can choose disjoint sets
of size , consisting entirely of people occupying eligible positions that support arms.
By the random-set-edges property, there exist and such that . Choose the corresponding arms. Since they lie in the disjoint regions and , they are disjoint and avoid the forbidden positions.
Together with
Lemma 4.1 gives the required movement.
Proof of Theorem 1.8. Inverting placements gives an isomorphism , so we may suppose . Theorem 5.4 and Corollary 3.5 now give connectivity with high probability.
Acknowledgements and AI Disclosure
The research was conducted with the support of MIT UROP+. The author would like to thank Elchanan Mossel and Rupert Li for helpful advice and discussions. The author would also like to thank Sidhart Krishnan for his support and advice.
The author’s contributions were movability, the arm construction, and general proof ideas. Chat-GPT Sol 6.1 was used to fill in the details. It also simplified Section 5 as originally the author used a Janson’s inequality based argument as in [2].
The author takes full responsibility for the mathematical content within this paper.
References
- [1]A. Akella and R. Li, Diameter bounds for friends-and-strangers graphs, 2026.arxiv.org/abs/2509.23511
- [2]N. Alon, C. Defant, and N. Kravitz, Typical and extremal aspects of friends-and-strangers graphs, J. Combin. Theory Ser. B 158 (2023), 3–42. MR4513816 doi:10.1016/j.jctb.2022.03.001DOI
- [3]B. Baldisserra, G. Dias do Couto, S. Griffiths, and L. Moreira, The connectivity threshold for friends and strangers graphs, 2025.
- [4]K. Bangachev, On the asymmetric generalizations of two extremal questions on friends-and-strangers graphs, European J. Combin. 104 (2022), Paper No. 103529, 26. MR4400016 doi:10.1016/j.ejc.2022.103529DOI
- [5]B. Bollobás, Random graphs, 2 ed., Cambridge Studies in Advanced Mathematics, vol. 73, Cambridge University Press, 2001. MR1864966 doi:10.1017/CBO9780511814068DOI
- [6]B. Bollobás, S. Janson, and A. Scott, Packing random graphs and hypergraphs, Random Structures Algorithms 51 (2017), no. 1, 3–13. MR3668844 doi:10.1002/rsa.20673DOI
- [7]C. Defant and N. Kravitz, Friends and strangers walking on graphs, Comb. Theory 1 (2021), Paper No. 6, 34. MR4396211 doi:10.5070/C61055363DOI
- [8]R. Jeong, On the diameters of friends-and-strangers graphs, Comb. Theory 4 (2024), no. 2, Paper No. 2. doi:10.5070/C64264229DOI
- [9]N. Krishnan and R. Li, Vertex connectivity of friends-and-strangers graphs, The Electronic Journal of Combinatorics 33 (2026), no. 3, P3.41. doi:10.37236/15082DOI
- [10]K. Mawhinney, Connectivity and diameter of friends and strangers graphs using minimum degree, 2026.arxiv.org/abs/2610.20648
- [11]A. Milojević, Connectivity of old and new models of friends-and-strangers graphs, Adv. in Appl. Math. 155 (2024), Paper No. 102668, 53. MR4689232 doi:10.1016/j.aam.2023.102668
- [12]L. Wang and Y. Chen, Connectivity of friends-and-strangers graphs on random pairs, Discrete Math. 346 (2023), no. 3, Paper No. 113266, 10. MR4513695 doi:10.1016/j.disc.2022.113266DOI
- [13]C. Yang and Z. Zhang, Friends-and-strangers is pspace-complete, Information Processing Letters 190 (2025), 106573. doi:10.1016/j.ipl.2025.106573DOI
- [14]X. Zhao, L. You, J. Lin, and X. Zhang, The connectedness of friends-and-strangers graphs about graph parameters and others, 2025.arxiv.org/abs/2504.00373

