Generalized Eulerian Numbers and Directed Friends-and-seats Graphs
Abstract
Let denote the Eulerian numbers, which count the number of permutations on with exactly descents, or, due to the Foata transform, the number of permutations on with exactly excedances. Friends-and-seats graphs, also known as friends-and-strangers graphs, are a seemingly unrelated recent construction in graph theory. In this paper, we introduce directed friends-and-seats graphs and establish a connection between these graphs and a generalization of the Eulerian numbers. We use this connection to reprove and extend a Worpitzky-like identity on generalized Eulerian numbers.
1 Introduction
The Eulerian numbers are equal to the number of permutations of the numbers from to with exactly descents. It is well-known that is also equal to the number of permutations of the numbers from to with exactly ascents, through a Foata transform [10].
Eulerian numbers are found in many different contexts. For instance, they and their generalizations come up in number theory, various combinatorial constructions, and simplicial complexes [8]. The Eulerian polynomials , which have the Eulerian numbers as coefficients, also are involved in many identities. One of the most famous of these is Worpitzky’s identity, which relates Eulerian polynomials to the sum of powers [7]:
which has multiple interesting combinatorial interpretations [9].
Many different generalizations of Eulerian numbers and their properties have also been studied [5, 2]. One particular generalization considers a graph with vertices labeled with the integers from to [6]. Then, -descents in a permutation are defined to be descents such that the two consecutive terms of the descent are also neighbors in the graph. If is a chordal graph, then a Worpitzky-like identity exists for the generalized Eulerian polynomial created by .
We now move our attention to the friends-and-seats graph, also known as friends-and-strangers graphs in past papers [3]. The name has been changed in this paper to be more fitting of their definition. These graphs are generated from any two graphs and that both have vertices. We may treat each of the vertices of as a person, such that two vertices in are adjacent if and only if the corresponding two people are friends. Similarly, we can treat each of the vertices of as a seat, with two seats next to each other if and only if the corresponding vertices are adjacent.
The friends-and-seats graph resulting from these two graphs, denoted , is a graph with vertices, where each vertex is labeled with a different bijection from the vertices of to the vertices of . Each vertex of a friends-and-seats graph can be thought of as an arrangement of friends sitting on seats. Say that two people are only allowed to swap seats if they are friends and the seats that they are next to each other. For every valid swap** of two friends, an edge is drawn between the vertices in the friends-and-seats graph corresponding to the arrangements of the friends and seats, before and after swap**.
The following is an example friends graph, labeled , and seats graph, labeled .
![Refer to caption](x1.png)
![Refer to caption](x2.png)
Friends-and-seats graphs are relevant in many different contexts. As just one example, the friends-and-seats graph resulting from two complete graphs is isomorphic to the Cayley graph of the symmetric group generated by every transposition [3]. They also connect with concepts from game theory. Each position of the famous 15-puzzle can be represented as a vertex of the friends-and-seats graph resulting from a by grid graph and a star graph. The fact that the resulting friends-and-seats graph is not connected proves that the 15-puzzle is not always solvable [3]. As such, one well-studied property of friends-and-seats graphs is whether or not they are connected [4].
Our paper is structured as follows. In Section 2, we generalize friends-and-seats graphs into their directed version, and define the outdegree polynomial, and motivate such a graph polynomial on directed friends-and-seats graphs. In Section 3, we prove general properties related to directed friends-and-seats graphs, and continue proving general properties related to the outdegree polynomial of these paths in 4. Finally, in Section 5, we relate directed friends-and-seats graphs to Eulerian numbers, using them to prove a past theorem on generalized Eulerian numbers, and further extend them to prove a similar theorem on cyclic Eulerian numbers.
2 Preliminaries
In this section, we will introduce generalized Eulerian numbers and directed friends-and-seats graphs, and give motivation for defining the outdegree polynomial that connects the two. Then, we will list some general conventions and definitions that are relevant to our work, especially with regards to directed friends-and-seats graphs.
2.1 Eulerian Numbers
Let be the set of all bijections from to . For any bijection , define a descent of to be any integer satisfying . Furthermore, define an excedance to be any integer satisfying .
Formally define the Eulerian numbers to be the number of bijections in with exactly descents. The corresponding Eulerian polynomials are defined to be
We now formally define a generalization of the Eulerian numbers that was mentioned in the introduction [6]. Consider any graph with vertices. For any bijection sending to , define the number of -descents of , denoted , to be the number of positive integers that satisfy the following conditions:
-
•
The permutation satisfies that .
-
•
The vertices with labels and are neighbors in .
Recall that is the set of all bijections from to . The generalized Eulerian polynomial satisfies
Notably, if is a complete graph on vertices, would be equal to the Eulerian polynomial . Define a graph to be chordal if every induced cycle has exactly three vertices. If is a chordal graph, then
where is the chromatic polynomial of , evaluated at . Notably, if is a complete graph, this statement is equivalent to Worpitzky’s identity.
2.2 Directed Friends-and-seats Graphs
Recall the definition given for friends-and-seats graphs given in the introduction. To formalize this definition, we consider two graphs and both with vertices. The friends-and-seats graph has vertices, labeled with bijections from the vertices of to the vertices of . For any two bijections and , the vertices with labels and in are connected by an edge if and only if there exist two vertices in that satisfy all of the following conditions:
-
•
There is an edge between the vertices and in the graph .
-
•
There is an edge between the vertices and in the graph .
-
•
The permutations satisfy that and .
-
•
For all vertices in not equal to or , we have .
The directed friends-and-seats graph directs every edge of a friends-and-seats graph. Let and be arbitrary directed graphs with vertices. The graph also has vertices, each labeled with a different bijection between the vertices of and the vertices of . There is a directed edge between two vertices labeled with bijections and in if and only if there exist vertices and in that satisfy all of the following conditions:
-
•
There is an edge directed from the vertex to the vertex in the graph .
-
•
There is an edge directed from the vertex to the vertex in the graph .
-
•
The permutations satisfy that and .
-
•
For all vertices in not equal to or , we have .
Below is an example of a possible directed friends-and-seats graph resulting from given directed graphs and both with three vertices.
![Refer to caption](x3.png)
![Refer to caption](x4.png)
Now, we will motivate directed friends-and-seats graphs by considering a particular example relating them to Eulerian numbers.
Let be a transitive tournament graph with vertices labeled with the integers between and , where edges are directed from vertices with greater labels to vertices with lower labels. We denote this graph as , which has edge set . Let the vertices of the graph also be labeled with the integers from to , with the edge set . is also known as a directed path graph, denoted . Since and have vertices labeled with positive integers from to , the graph will have vertices labeled with permutations of the integers between and .
Consider an arbitrary vertex , labeled with the permutation . By the definition of a friends-and-seats graph, the labels of the only possible vertices that could neighbor are of the form for . For each value of , we know that is directed towards the vertex with label if and only if in the graph , the vertex with label is directed towards the vertex with label in . However, since is a transitive tournament graph, this is the case if and only if .
This implies that the outdegree of the vertex in the graph is equal to the number of descents of the vertex label ! Thus, we have found a relation between the outdegree of vertices in directed friends-and-seats graphs and the descents of a permutation.
This inspires us to define the outdegree polynomial, denoted for any arbitrary graphs and both with vertices and calculated with the formula
where denotes the outdegree of the vertex in , and is the vertex set of the graph . Since the outdegree of the vertex in the graph is equal to the number of descents of the vertex label , we may say that
where is the th Eulerian polynomial.
2.3 General Definitions and Conventions
First, for any graph , let denote its vertex set and its edge set.
We usually assume that the graphs and in are regular directed graphs. However, all theorems and proofs in the following sections hold if any given graph is a directed multigraph. Directed multigraphs allow multiple edges between any two vertices and , including the possibility that both edges and are present. If it is important for a theorem that a given graph is a multigraph, we explicitly mention so.
Define a directed graph to be acyclic if it has no cycle of directed edges. Furthermore, define a vertex to be a sink of a directed graph if it has outdegree , and define a vertex to be a source of a directed graph if it has indegree .
We commonly refer to a graph with vertices as being labeled with the positive integers between and , which can be written with shorthand as . A labeled acyclic graph to be a graph with vertices labeled with , satisfying that for all edges point from a vertex with a larger label to a vertex with a smaller label. Note that any acyclic directed graph can be made into a labeled acyclic graph by assigning each vertex with the integers from to . If there are multiple valid assignments, one is chosen arbitrarily.
Since we assume that most graphs are labeled on , we use some shorthand notation. Vertices in directed graphs with vertices will sometimes be referred to by numbers from to . For example, the path graph can be said to have edge set . Furthermore, for a graph labeled on and any set , the graph is defined to be the induced subgraph of that contains all vertices with labels not in the set . The resulting directed friends-and-seats graph would thus have vertices that are bijections sending to , or equivalently permutations of .
For a labeled acyclic graph, we define the complement of , denoted as , as the graph with vertex set and edge set . In other words, for every , if the vertex with label is not directed towards the vertex with label in , then is an edge in .
There are several graphs that we name. Two graphs have already been mentioned: the transitive tournament graph has vertex set and edge set , and the directed path graph has vertex set and edge set . Finally, the directed cycle graph has vertex set and edge set . Notably, the graph is a multigraph, having edge set .
3 General Properties
In this section, we prove various properties of these graphs that do not involve the outdegree polynomial. Some of these properties are similar to the ones seen in [3] on regular friends-and-seats graphs.
Theorem 1.
For any two directed graphs on vertices and , the graph is automorphic to the graph .
Proof.
Take any vertex in with label . The automorphism is the bijection that sends the vertex with label to its inverse, . We will show that every edge in has a corresponding edge in . Consider any edge in , where and are the labels of and respectively. Define and to be the vertices in with labels and respectively. We will show that is an edge in .
By definition, must be of the form , where is an edge in and is an edge in . Note . We have already noted that is an edge in and is an edge in , so is an edge in , as desired.
By reversing and ,we can see that if is an edge in , then is an edge in , which establishes our bijection. ∎
Corollary 2.
For any two directed graphs on vertices and , the polynomial is equal to the polynomial .
Theorem 3.
Let and be directed graphs on vertices. If is a subgraph of and is a subgraph of , then is a subgraph of .
Proof.
Consider any edge between vertices . Say that and have labels‘ and respectively. By definition, there must exist some vertices satisfying , such that is an edge in and is an edge in . However, must be an edge in and must also be an edge in , which implies is an edge in as well. ∎
Corollary 4.
For any two labeled acyclic graphs and both on vertices, is a subgraph of .
Theorem 5.
If and are directed acyclic graphs with vertices, then is also acyclic.
Proof.
Say that and are labeled acyclic graphs on . Note that and must both be subgraphs of the transitive tournament graph , so by Theorem 3 we can finish by showing that is acyclic. Now, for every permutation , we define
We claim that if any two permutations satisfy that , then , which suffices. Consider any two permutations on with being an edge in . By definition, can be expressed as for some vertices with and . Since and are labeled acyclic graphs on , we must have and . However,
as desired. ∎
Theorem 5 is not generally true for graphs that are not acyclic. For instance, for graphs labeled on with edge sets and , then contains the cycle
![Refer to caption](x5.png)
4 Outdegree Polynomial
Recall that in Section 2 we defined the outdegree polynomial on the two graphs and to be
In this section, we examine various ways to determine the value of this polynomial for graphs and , mostly through the lens of adding and removing edges.
For any vertices , define to be the sum of for all vertices with labels such that is an edge in . Notably, if , then .
Furthermore, define to be the sum of all vertices with labels satisfying . Finally, for any graph labeled on and arbitrary edge , define to be the multigraph labeled on such that any edge of the form or in has been replaced with and respectively in .
Theorem 6.
Consider any two directed graphs with . For an arbitrary edge , define to be the graph with vertex set and edge set . We have:
Proof.
Consider a vertex with corresponding permutation . If is not an edge in , then is the same in both and . Otherwise, the outdegree of decreases by one when going from to . Thus, we have
as expected. ∎
Unfortunately, calculating is often very difficult. The next couple of theorems prove that it is doable under certain graphs and certain properties of and . We define a subset of the vertex labels of is said to be self-equivalent if for any fixed element either every edge in is directed towards , is directed towards every edge in , or there is no edge between any element of and .
Theorem 7.
Let be a self-equivalent set of vertex labels in a directed graph labeled on , where . Then,
Proof.
Let be the set of all permutations on satisfying that . Similarly, let be the set of all permutations on satisfying that . Note that for any , there exists a corresponding permutation .
Consider any permutation and the corresponding vertex with label . Define and let be the vertex in with label . We prove that , which finishes by summing over all . Say that is an edge in , for some vertices .
-
•
If , it is clear that is also an edge in .
-
•
If exactly one of is or , we can note by the definition of self-equivalent that must also be edge in .
-
•
Note that when and , there is an edge from as .
Thus, all outward edges correspond except for , implying that always has one higher outdegree than . ∎
We define two relaxed conditions related to self-equivalency. Consider a graph labeled on . A subset is sink-equivalent if for all , either all are directed towards or no are directed towards in the graph . Similarly, a subset is source-equivalent if for every , either is directed towards all or is directed towards no in the graph . Notably, a set is self-equivalent if and only if it is both sink-equivalent and source-equivalent.
Theorem 8.
Consider two directed graphs (possibly multigraphs) labeled on , and a sink-equivalent set of such that . Let be the induced subgraph of with vertex set . We have:
Proof.
For every edge , we will define to be the sum of for every vertex with label satisfying and . Summing over every edge in , we have:
Thus, it suffices to prove that
To do this, we create a bijection between vertices with labels satisfying the restrictions on the left-hand side and vertices with labels satisfying the restriction on the right-hand side. In particular, we must have that the outdegree of in is one more than the outdegree of in . To do this, consider any valid permutation on satisfying that and , and let for all . Note that is a bijection from to , as expected.
We claim that there is a bijection from edges going out of to edges going out of , with one exception. This would show that has one higher outdegree than , finishing. Consider any integers such that there is an edge going from to the vertex with label .
-
•
If are both not , then there exists a corresponding edge with vertex labels .
-
•
If (and ), then we may replace with to get a corresponding edge with vertex labels , because and are sink-equivalent and every edge from has been replaced with one from in .
-
•
Similarly, if and , then we again may replace with .
-
•
Finally, there is an edge that does not correspond with one in .
∎
5 Generalized Eulerian Numbers
In this section, we use results from previous sections to prove statements about generalized Eulerian numbers. First, we define the notion of a perfect elimination ordering. We will then use this definition to reprove a theorem relating generalized Eulerian numbers to the chromatic number of graphs. We will then further generalize this theorem.
5.1 Perfect Elimination Ordering
Perfect elimination orderings and directed chordal graphs are defined as the following:
Definition 1.
Let be a labeled acyclic graph. Then, the labeling of the vertices of the graph is a perfect elimination ordering of if for any , if is directed to , then there is a clique containing all vertices between and inclusive, i.e., for any , is directed towards . A labeled acyclic graph is a directed chordal graph if there exists a labeling of its vertices that is a perfect elimination ordering.
For instance, a transitive tournament graph is a directed chordal graph. We can construct the complement of all directed chordal graphs by removing sink-equivalent edges:
Theorem 9.
Let be a labeled acyclic graph on such that its complement, denoted , is a directed chordal graph with edges. Then, there exists a sequence of graphs
such that for all there exists a sink-equivalent set such that , and is a directed chordal graph.
Proof.
It suffices to show that a graph exists where is chordal and for some sink-equivalent set . If this is possible, then we may repeat this process with until we reach .
We pick to be the edge in such that is the smallest vertex with positive indegree, and is the largest label of a vertex that has a directed edge to . Again, let have the same vertex set as with . We need to prove that is a directed chordal graph and that is a sink-equivalent set.
We first prove that is a directed chordal graph. Without loss of generality, assume that is a perfect elimination ordering of the labels of the vertices of . Assume for the sake of contradiction that is not also a perfect elimination ordering of the labels of the vertices of . Then, there must exist some vertices with labels and such that is directed towards , and vertices with labels and with such that is not directed towards .
Since is a perfect elimination ordering of the labels of the vertices , it must be the case that and , as this was the only removed edge. Thus, and . However, note is the smallest vertex with positive outdegree, so it must be the case that . Furthermore, is the largest label of a vertex that has a directed edge to , so it must be the case that , contradiction.
We now prove that is a sink-equivalent set of . Assume for the sake of contradiction that there exists a vertex such that one of the elements of is directed to , but not the other. Since is a perfect elimination ordering of the labels of the vertices , if neither nor can be directed to the vertex with label in the graph . As such, .
However, if is not directed to the vertex with label in , then is directed to the vertex with label in , implying that is not the smallest vertex with positive outdegree in , contradiction. The exact same argument can be made with , showing that both and are directed toward the vertex with label , contradiction.
∎
5.2 Path Graph
Recall that a path graph has vertices and edge set . Furthermore, recall the generalization of the Eulerian numbers mentioned in Section 2 [6]. The following theorem was mentioned:
Theorem.
Let be the chromatic polynomial of the undirected graph , and let be the generalized Eulerian polynomial on , as described in Section 1. We have:
where is the conjugate of the graph .
This theorem can be restated as one involving directed friends-and-seats graphs, as shown below. We will prove this theorem with the help of Theorems 8 and 9.
Theorem 10.
Let be a directed acyclic graph with vertex set and edge set such that is a perfect elimination ordering of . Then,
where is the chromatic polynomial of the graph , ignoring the direction of each edge.
Proof.
We first show that for a sink-equivalent set we have that . By Theorem 8, we have
First, note that for to be true, it must be the case that . Thus, has edge set
which, after relabeling edges by subtracting one from the vertices with labels , is exactly the edge set of . We may therefore say that
Now, we write:
as desired.
We now induct on , the number of vertices of . The base case, when , is trivial. Assume that our theorem is true for all . Then, by Theorem 9 pick a sequence of graphs such that for all the for some sink-equivalent set . For all , we note that
by Theorem 6. We now induct on . The base case is equivalent to
Note that is the Eulerian polynomial , and so this statement becomes a well-known statement on Eulerian polynomials [7]. Now, for all , we use both of our inductive hypotheses:
However, note that for any positive integer , the value is exactly the number of ways to color the graph with colors such that and share the same color but no two other neighboring vertices share the same color. This is also . Thus:
which proves our inductive step. ∎
5.3 Cycle Graph
Cyclic Eulerian numbers are count the number of permutations on with descents, where a descent is also counted if . Just like their Eulerian counterparts, their properties have been extensively studied [1]. We may generalize these numbers using -cyclic-descents for any graph , which are very similar to their -descent counterparts. We study this generalization under the formulation of directed friends-and-seats graphs.
Recall that a directed cycle graph has vertices labeled on and edge set . Our first theorem considers the equivalent statement of Worpitzky’s identity for cyclic Eulerian numbers, using directed friends-and-seats graphs:
Theorem 11.
For all positive integers , we have that
where, by convention, .
Proof.
We may manually verify that results in , which is true. For , we will use that
which, as previously mentioned, is a well-known statement on Eulerian polynomials [7]. As such, for all , the theorem statement is equivalent to
Now, for every , we prove that
We construct a bijection between permutations of satisfying with outdegree , and permutations of satisfying with outdegree . Let be the rotation of , where
for every , where indices are taken and . Then, any outward edge from to has a corresponding edge from to (where again indices are taken and .) Therefore,
We now construct a bijection between permutations on satisfying with outdegree in , and permutations on with outdegree , which would show that
and prove the theorem. To do this, take for . Consider any edge . If , then must be , and there is exactly one edge; clearly cannot be . Otherwise, there is a corresponding directed edge from to , and has one less outdegree than . ∎
Now, we may prove the cyclic equivalent of Theorem 10.
Theorem 12.
Let be a directed acyclic graph with vertex set and edge set such that is a perfect elimination ordering of . Then,
By symmetry, the chromatic polynomial is always divisible by . Thus, when , the value of is defined as the value of the polynomial evaluated at .
Proof.
This proof follows a very similar path to the one seen in Theorem 10. We show that for a sink-equivalent set and an integer we have
By Theorem 8, we have
First, note that for to be true, it must be the case that , or and . In the case where , then has edge set
If we relabel edges by subtracting one from the labels , this is exactly the edge set of . If and , then has edge set
which also is the edge set of after relabeling edges by subtracting one from the labels of all vertices. We may therefore say that
for , and
when . We may relabel the vertices of a cycle by adding or subtracting any arbitrary integer from the label of each vertex, (where the vertex with label is relabeled to have label ). As such, we may say that
for all . Now, we may simplify to find that
as desired.
Our inductive step is also very similar to the inductive step found in the proof of Theorem 10. We induct on , the number of vertices of . is trivial. Assume that our theorem is true for all . Then, by Theorem 9 pick a sequence of graphs such that for all the for some sink-equivalent set . For all , we note that
by Theorem 6. We now induct on . The base case is equivalent to
which is the statement of theorem 11. Now, for all , we use both of our inductive hypotheses:
However, note that for any positive integer , the value is exactly the number of ways to color the graph with colors such that and share the same color but no two other neighboring vertices share the same color. This is also exactly . Thus:
which proves our inductive step. ∎
We may reformulate Theorem 12 without mentioning directed friends-and-seats graphs in a similar way to our reformulation of Theorem 10. For any permutation of , define the number of -cyclic-descents of , denoted to be the number of positive integers that satisfy the following conditions:
-
•
The permutation satisfies that , indices taken modulo with .
-
•
The vertices with labels and are neighbors in .
The generalized cyclic Eulerian polynomial satisfies
Now, using Theorem 12 we may write:
Corollary 13.
Let be the chromatic polynomial of the undirected graph . We have:
6 Acknowledgments
I am grateful to Tanya Khovanova, who introduced me to Eulerian numbers and mentored me throughout this project. Thanks also to Ira Gessel for consulting on this project. I am also indebted to the MIT PRIMES-USA program for creating such a rare and amazing math research opportunity.
References
- [1] Paola Cellini “Cyclic Eulerian Elements” In European Journal of Combinatorics 19.5, 1998, pp. 545–552 DOI: https://doi.org/10.1006/eujc.1998.0218
- [2] Mark A. Conger “A Refinement of the Eulerian Numbers, and the Joint Distribution of and Des() in ” In Ars Combinatoria 95, 2010 URL: http://combinatorialmath.com/index.php/ArsCombinatoria/article/view/1580
- [3] Colin Defant and Noah Kravitz “Friends and strangers walking on graphs” In Combinatorial Theory, 2020 DOI: https://doi.org/10.5070/C61055363
- [4] Colin Defant, David Dong, Alan Lee and Michelle Wei “Connectedness and cycle spaces of friends-and-strangers graphs” In Discussiones Mathematicae Graph Theory, 2022 DOI: https://doi.org/10.7151/dmgt.2492
- [5] David Dong “Generalized Eulerian Numbers”, 2023 arXiv:2306.11836 [math.CO]
- [6] Ira M. Gessel “Barred Permutations and Chromatic Polynomials of Chordal Graphs” Unpublished Manuscript, 2023
- [7] Ronald L. Graham, Donald E. Knuth and Oren Patashnik “Concrete mathematics” Addison-Wesley, 1994
- [8] T.K. Petersen “Eulerian Numbers”, Birkhäuser Advanced Texts Basler Lehrbücher Springer New York, 2015
- [9] Michael Z. Spivey “A Combinatorial View of Sums of Powers” In Mathematics Magazine 94.2 Taylor & Francis, 2021, pp. 125–131 DOI: 10.1080/0025570X.2021.1869481
- [10] Richard P. Stanley “Enumerative Combinatorics” Cambridge University Press, 1999