Expected number of faces in a random embedding of any graph is at most linear

A random 2-cell embedding of a given graph $G$ is obtained by choosing a random local rotation around every vertex. We analyze the expected number of faces of such an embedding, which is equivalent to studying its average genus. In 1991, Stahl proved that the expected number of faces in a random embedding of an arbitrary graph of order $n$ is at most $n\log(n)$. While there are many families of graphs whose expected number of faces is $\Theta(n)$, none are known where the expected number would be super-linear. This lead to the conjecture that there is a linear upper bound. In this note we confirm the conjecture by proving that for any $n$-vertex multigraph, the expected number of faces in a random 2-cell embedding is at most $n(1+H_m)$, where $m$ is the maximum edge-multiplicity and $H_m$ denotes the $m$th harmonic number. This bound is best possible up to a constant factor.


Introduction
By an embedding of a graph G we mean a two-cell embedding of G in some orientable closed surface, and we consider two embeddings of G as being the same (or equivalent) if there is a homeomorphism between the corresponding surfaces that induces the identity isomorphism on G. Equivalent embeddings are considered the same, and when we speak about all embeddings of a graph, we mean all equivalence classes. It is well known that the equivalence classes of all embeddings are in bijective correspondence with rotation systems, which are defined as the collection of local rotations at the vertices of the graph, where by a local rotation at v we mean a cyclic ordering of the half-edges, (we call these darts), incident with v. We refer to [4] for more details.
It is a classical problem to study the minimum genus and maximum genus of a graph across all of its embeddings, see [2,4,8]. Considering the set of all two-cell embeddings of a graph is also a viable topic. An outline of various applications of graph embeddings can be found in [3]. In this work, we consider the problem of the average genus across all the different embeddings of a fixed graph. By Euler's formula, this is equivalent to studying the average number of faces across all embeddings of a graph. It will be more convenient to state our results in terms of the number of faces, as it better illustrates our bounds. Formally, we consider the uniform distribution across all embeddings of a fixed graph using rotation systems, and study E [F] where F is the random variable denoting the number of faces in a random embedding of the graph.
This field of study was termed random topological graph theory by White [9]. Stahl [5] gave an upper bound on E[F] by proving that E[F] ≤ n log n for any simple graph on n vertices. It was shown in [1] that there are many examples of graphs with E[F] = (n): suppose a graph has maximum vertex degree d and a set C of cycles, all of length at most . Then it is shown that .
In particular, if the graph has small vertex-degrees and a set of (n) short cycles, then we have at least linearly many expected faces. In fact, a more general conjecture from [1] allowing for multiple edges of arbitrarily large multiplicity μ will be treated.

Conjecture 2 ([1]
). For every n-vertex multigraph G with maximum edge-multiplicity μ ≥ 2, the expected number of faces when selecting an orientable embedding of G uniformly at random is O(n log (μ)).
We first give some examples which show that this more general conjectured bound is tight. We define a dipole as the graph with 2 vertices joined by μ edges. Stahl first showed [6] that for the dipole on μ edges, is the harmonic number. It was later shown [1] using Stanley's generating function [7] that where γ is the Euler-Mascheroni constant, this gives a tight example for n = 2. In fact Stanley's generating function may be used (see [1]) to show that for any graph with one central vertex incident to all of the μ edges, E[F] ≤ H μ + 3 μ . A tight example, up to a constant factor, where n and μ may both tend to infinity is obtained by attaching a series of dipoles via cut edges as shown in Figure 1. More precisely, consider n/2 dipoles, each with μ parallel edges, joined by cut edges. Each separate dipole contains an average of at least H μ faces, and joining these dipoles by cut-edges removes n/2 − 1 faces. Therefore E[F] ≥ 1 2 n(H μ − 1).
Our main result confirms Conjectures 1 and 2. In fact we prove a more general bound in Theorem 7, which allows for different edge multiplicities. The following result which implies both conjectures, is a simple corollary of it. Theorem 3. Let G be a graph on n vertices with maximum edge-multiplicity μ, and let F be the random variable for the number of faces in a random embedding of G. Then we have: In the case when G is a simple graph, we are able to show the better bound of π 2 6 n in Theorem 8. We are unaware of any examples of simple graphs which come close to the constant in this upper bound. A chain of triangles connected by cut edges gives an example of a graph for which E[F] = 1 3 n + 1. We conjecture that this is the optimal bound. Conjecture 4. For any simple graph G of order n, E[F] ≤ 1 3 n + 1.

Random embeddings
. Let E i be the set of darts incident with vertex i, let N(i) be the set of vertices adjacent to i, and let d i = |E i | be the degree of the vertex. We start by outlining the random process leading to a random embedding of G that we will use to prove the main result of this paper.

Random Process A.
(1) Start with the vertices 1, 2, . . . , n, with d i unlabelled darts coming out of vertex i for each i and fix a cyclic order of the darts around each vertex. Over the course of the random process we will pair darts to form the edges of G, decreasing the number of unlabelled darts at each vertex. When we pair a dart at vertex i and a dart at vertex j, thus forming the edge ij, we label the two darts and say that we have processed the edge ij. We write D i for the number of unlabelled darts coming out of vertex i at some step in the process, and write μ ij for the number of unprocessed edges between i and j at some step. (2) Repeat the following process: Pick one of Option A or Option B to use at this step. Option A: Pick an edge between i and j which hasn't yet been chosen to process. At vertices i and j choose one of the D i and one of the D j unlabelled darts (respectively) uniformly at random and then join them together to make an edge.Option B: Pick a dart at some vertex i. Choose one of the unprocessed edges ij incident with i uniformly at random. At vertex j, choose one of the D j unlabelled darts uniformly at random and join it with the chosen dart at i to make an edge. In either option, we decrease each of D i , D j , μ ij by one. Note that in the case of a loop (i = j), D i is decreased by 2. (3) After all edges have been processed, the initial cyclic orders of darts around each vertex define a rotation system and hence an embedding of G.
By choosing the darts at step (2) of Random Process A in all possible ways, each embedding of G is obtained the same number of times, and each outcome has the same probability. This shows that the process always gives an embedding of G that is selected uniformly at random from the set of all embeddings. Let us also mention that the order in which the edges are processed, and whether we choose Option A or B, is not important. These can be chosen deterministically or randomly at each step.

Observation 5. No matter whether we choose Option A or Option B at any step, and no matter which edge we choose when we use Option A or which dart we choose when we use Option B, at the end of the Random Process A, each embedding of G is obtained with the same probability.
At each step during Process A, we have a partial rotation for which we can define (partial) faces. The partial facial walk around a partial face starts with an unlabelled dart, then it follows the already processed edges (maybe none) using the local rotation at vertices until we come to another unlabelled dart that is the end of this partial facial walk. See Figure 2, where the partial facial walks starting at c and a (respectively) are outlined with thick lines. Each dart is the beginning dart . Partial rotation after processing five edges. Unlabelled darts are shown as short halfedges, whose local rotation is as given at the beginning, but it is not yet decided which of these will correspond to particular edges of G. Two of the partial facial walks are shown by a thick tracing line. If we are processing the edge ij and choose darts a and b to be paired, a partial face will be closed. If we choose c and b instead, the two partial faces will be merged into a larger partial face, which will not be closed.
of a partial facial walk and is also the ending dart of some partial facial walk. We call a partial walk which starts and ends on opposite sides of the same unlabelled dart a bad partial facial walk, and the corresponding face a bad partial face. This special type of partial face will be of special significance. In addition to the partial facial walks, we have facial walks that use only already processed edges. These will be unchanged for the rest of the process and will be facial walks of the final embedding of G. We say that such a completed facial walk is closed and is no longer considered to be a partial facial walk. Each closed facial walk became closed when we processed the last of its edges during the process. When we process the edge ij, there could be several pairs of a dart at i and a dart at j whose pairing will close a face. If there are k such pairs, we say that k faces can be closed while processing that edge.
We now discuss a special order in which we will process the edges while generating random embeddings. A particular processing of edges in Process A will be termed as the greedy process. This process is as follows: 1. If the partial rotation has some bad partial faces, then pick a dart in some bad partial face to process and carry out Option B. We prioritise picking a dart in a bad partial face which was also in a bad partial face at the previous step of Random Process A. 2. If the partial rotation has no bad partial faces, then take Option A and choose the next edge ij so that the number of faces that can be closed by processing this edge divided by μ ij is minimum possible.
An important property that we have when using the greedy process is that whenever an edge ij is processed, there is a bound on the number of faces that can be closed by processing it.

Lemma 6.
During Random Process A, if the partial rotation at the start of the step has no bad partial faces then there is always an unprocessed edge ij, for which there are 2μ ij faces that can be closed by processing this edge. Processing this edge either closes zero, one or two of the 2μ ij possible closeable faces.
Also, any partial rotation appearing at some step of the greedy version of Random Process A has at most 2 bad partial faces. Each bad partial face appears in at most two consecutive steps of the greedy process.
Proof. For the first claim, notice that the rotation system of the unlabelled darts and edges at each step is fixed. Each step of the process will join up two of the unlabelled darts into an edge. After |E| steps, we will end up with an embedding of G. Recall that we defined a partial face as a face which has not yet been completed (closed) during the previous steps of the process. The walk along a partial face starts with an unlabelled dart at some vertex. It will then alternate along edges and vertices until it eventually reaches an unlabelled dart (possibly the same one we started with), with which the partial walk ends.
At the start of the random process we have 2|E| partial faces, where each partial face consists of two darts that are consecutive around the vertex in the local rotation. At each step we join together Figure 3. The situation when we have chosen two darts, and are replacing them with an edge. The partial facial walks f 1 , f 4 will merge, and the partial facial walks f 2 , f 3 will merge. This may also add one or two closed faces. two darts to make an edge. We claim that this always reduces the number of partial faces by two, and possibly creates one or two closed faces. Indeed each of these darts we are joining to make an edge is the start and end of a partial face: write f 1 , f 2 for the partial faces starting and ending respectively at one of the darts, and f 3 , f 4 for the partial faces starting and ending respectively at the other dart as shown in Figure 3. Note that f 1 and f 3 start with different darts, so they cannot be equal. Similarly, we have f 2 = f 4 . There are a couple of cases: This covers all the cases. Notice that in all of the above cases we reduce the number of partial faces by two, proving the claim.
This means that after k edges have been processed, there are |E| − k remaining unprocessed edges and 2|E| − 2k partial faces. Each partial face starts with a dart at some vertex i, and ends with a dart at some vertex j, where we may have i = j. Each unprocessed edge is also associated to a pair of vertices ij, noting that μ ij = |E| − k. By the pigeonhole principle there is at least one pair i, j (where we could have i = j) with μ ij ≥ 1 unprocessed edges and at most 2μ ij partial faces associated to it. Hence we can always choose an edge such that processing it has at most 2μ ij different faces that could be closed by processing it.
For the second claim, we use induction. Initially we may assume G has no vertices of degree one, as these will not affect the final number of faces in an embedding of G, so we have no bad partial faces. Then, suppose that the partial rotation we have at the start of a step has at most two bad partial faces.
Case 1: It has no bad partial faces. Then since processing the edge affects at most two faces, we can add at most 2 bad partial faces.
Case 2: It has one or two bad partial faces. Then the greedy version of Random Process A will pair a dart in a bad partial face, removing it. At most one other partial face will be affected by adding this edge, so we can add at most one new bad partial face.
In either case, the number of bad partial faces in the new partial rotation is also at most two. Also, since there is at most one dart in a bad partial face which was not processed at this step, the greedy process must process this dart at the next step. Therefore this unlabelled dart appears in a bad partial face in at most two consecutive steps of the random process.
An analysis of the greedy version of Random Process A gives our main result. Recall that μ i was defined as the maximum multiplicity of edges incident with vertex i, counting loops twice.
Proof. At the start of each step in our random process, we have some partial rotation. The random process then fixes one edge into the embedding to obtain a new partial rotation. Since each step fixes one edge, there are |E| total steps. If the partial rotation R k appears at the start of step k for k = 1, . . . , |E|, then we say that the sequence (R 1 , R 2 , . . . , R |E| ) occurs at this run of Random Process A. Note that no edges have been fixed in R 1 , and all but one edge has been fixed in R |E| . However there will only be one place to put the final edge, so this determines a unique embedding. We denote by P[R 1 , R 2 , . . . , R |E| ] the probability that we obtain this sequence. Similarly let P[R k = R] denote the probability that we obtain R at the start of step k. Let X k denote the random variable for the number of faces closed at step k of the random process. Now suppose the partial rotation at the start of a step is R. The random process will then add an edge to this partial rotation, which will possibly close some faces. Let X(R) denote the random variable for the number of faces closed at this step of the random process. Recall that X(R) ∈ {0, 1, 2}, as shown in Lemma 6.
The total probability formula gives that: where the sum runs over all possible partial rotations. Using linearity of expectation yields: Switching the order of summation, and then taking the maximum element in the sum, gives the following: Therefore we may analyse each step of the random process separately, over any fixed possible sequence of partial rotations (R 1 , R 2 , . . . , R |E| ). Suppose that we are at the start of step k of the random process, and we have the partial rotation R k . Further suppose that R k has no bad partial faces, and that we have chosen an edge e = ij to process using Option A. Let us first suppose that i = j. Recall that D i and D j are the number of unlabelled darts at vertices i and j at this step, respectively. So, there are D i D j choices of places to place the edge across two darts at these vertices. However in the greedy version of Process A we choose an edge to process with only 2μ ij partial faces that could be closed. Each partial face is closed by only one choice out of the D i D j total placements of the edge, hence the probability that we close a face is 1 D i D j . By Lemma 6 at most two faces may be closed by the same choice of edge placement, but in any case we have for the values of D i , D j at this step. Then at the next step we have If R k has at least one bad partial face, then recall that the greedy version of Random Process A will take a dart in a bad partial face, incident with some vertex i. It will then pick an unprocessed edge ij incident with i uniformly at random, and a dart incident with j uniformly at random to pair the dart at i with. Observe that a face is closed at this step if and only if the dart we're pairing with is also in a bad partial face. Since there is at most one other bad partial face, there is at most one choice of dart to pair with which will close a face. Suppose that this dart in the other bad partial face is incident with vertex j , if such a dart exists. Therefore the probability we make this choice, and hence close one face, is At the next step we reduce D i and D j by one. Note we don't reduce D j by one, but at the next step if j = j, we will process the dart in a bad partial face incident with vertex j . Therefore at the following step we will reduce D j by one.
The case when we are processing a loop from vertex i to itself is similar. If the partial rotation has no bad partial faces, then there are D i 2 choices of placements for the edge, and there are at most 2μ ii partial faces which may be closed. Therefore by the same reasoning as in the previous A similar reasoning holds for the case when we process a dart incident with a bad partial face using Option B.
Fix some vertex i. Over the sequence of partial rotations (R 1 , R 2 , . . . , R |E| ), let R k 1 , . . . , R k c be the partial rotations for which an edge at vertex i is processed, where c is equal to the number of edges incident with vertex i, counting each loop only once. We have that D i (R k 1 ) = d i . If we are in option A of the random process, and the first edge processed at vertex i was not a loop, If we are in option B of the random process, then we could have Therefore the values of D i decrease at each of these steps until D i (R k c ) = 1 or 2, then these remaining darts are processing at this step.
Initially we have that D i = d i and D j = d j . For i = j, μ ij ≤ min(μ i , μ j ), and 2μ ii ≤ μ i . When we process a non-loop edge using Option A, E[X(R k )] is bounded by some 2μ ij D i D j , and D i , D j and μ ij all decrease by one. When we process a loop edge using Option A, E[X(R k )] is bounded by 4μ ii D i (D i −1) , D i decreases by two and μ ii decreases by one. When we process a dart using Option B, E[X(R k )] is bounded by μ ij D i D j for some j . For some j, D i , D j decrease by one and μ ij decreases by one. Also when i = j, μ ij is the number of unprocessed edges between vertices i and j, so by definition we have that μ ij ≤ min(D i , D j , μ i , μ j ). Similarly, we have that 2μ ii ≤ min(D i , μ i ).
If at step k we process an edge e = ij, then write D i (e) = D i (R k ), D j (e) = D j (R k ). For this sequence of partial rotations (R 1 , R 2 , . . . , R |E| ), write E A , E B for the set of edges processed under Options A and B respectively. Then we have: We first note that for any a, b > 0: Proof. From the proof of the general case, we have the following sum as an upper bound: where the pairs {a, b} of the summands exhaust the multiset = {1, 2, . . . , d 1 , 1, 2, . . . , d 2 , . . . , 1, 2, . . . , d n }.
Each term of 1/a 2 appears at most n times for each a ≥ 1, so we obtain the upper bound: n.