Homomorphisms into loop-threshold graphs

Many problems in extremal graph theory correspond to questions involving homomorphisms into a fixed image graph. Recently, there has been interest in maximizing the number of homomorphisms from graphs with a fixed number of vertices and edges into small image graphs. For the image graph $H_{\text{ind}}$, the graph on two adjacent vertices, one of which is looped, each homomorphism from $G$ to $H_{\text{ind}}$ corresponds to an independent set in $G$. It follows from the Kruskal-Katona theorem that the number of homomorphisms to $H_{\text{ind}}$ is maximized by the lex graph, whose edges form an initial segment of the lex order. A \emph{loop-threshold graph} is a graph built recursively from a single vertex, which may be looped or unlooped, by successively adding either a looped dominating vertex or an unlooped isolated vertex at each stage. Thus, the graph $H_{\text{ind}}$ is a loop-threshold graph. We survey known results for maximizing the number of homomorphisms into small loop-threshold image graphs. The only extremal homomorphism problem with a loop-threshold image graph on at most three vertices not yet solved is $H_{\text{ind}}\cup E_1$, where extremal graphs are the union of a lex graph and an empty graph. The only question that remains is the size of the lex component of the extremal graph. While we cannot give an exact answer for every number of vertices and edges, we establish the significance of and give a bound for $\ell(m)$, the number of vertices in the lex component of the extremal graph with $m$ edges and at least $m+1$ vertices.


Introduction
Many problems in classical extremal graph theory can be stated in terms of graph homomorphisms. A homomorphism from a graph G to a graph H is a function φ : V (G) → V (H) such that φ(x)φ(y) ∈ E(H) whenever xy ∈ E(G), i.e., φ is an edgepreserving map. We let Hom(G, H) be the set of homomorphisms from G to H and hom(G, H) = |Hom(G, H)|. If we take the image graph to be H ind , a path on two vertices with one vertex looped (see Figure 1), then elements of hom(G, H ind ) correspond to independent sets in G. This is because vertices mapped to the unlooped vertex of H ind form an independent set and there are no other restrictions on the map. Another natural example arises from taking the image graph to be K q , in which case elements of Hom(G, K q ) correspond to proper q-colorings of G.
An interesting class of problems arises by fixing an image graph H and a class of graphs G and trying to determine which graphs G ∈ G maximize hom(G, H). A lot of recent research has focused on this problem for the image graph H ind , which we saw above corresponds to independent sets, and so we let i(G) = hom(G, H ind ). Kahn [14] gave a bound for i(G) when G is an r-regular bipartite graph on n vertices and Zhao [19] extended this to general regular graphs.
Theorem 1 (Kahn, Zhao). If G is an r-regular graph on n vertices, then i(G) i(K r,r ) n/2r . Galvin and Tetali [12] extended the bipartite case of Theorem 1 to general homomorphisms to any image graph. Interestingly, the extension to nonbipartite graphs in the general case is not true. (See [11] for more details.) Also, the problem of maximizing the number of independent sets in graphs with given minimum degree has been well-studied (see, e.g., [1,2,7,8,9,10,13,20]).
In this paper, we will be interested in maximizing the number of homomorphisms over graphs of fixed order (number of vertices) and size (number of edges). We let G(n, m) be the set of loopless graphs with n vertices and m edges. The solution to the problem of maximizing the number of independent sets over G(n, m) follows from the Kruskal-Katona [16,15] theorem. This is because independent sets in a graph G correspond exactly to those sets that are not in the upper shadow of G, where G is thought of as a set system on the vertex set. Recall that the lexicographic order on subsets of [n] is defined by A < B if min(A B) ∈ A. Define the lex graph of order n and size m, denoted L(n, m), to be the graph with vertex set [n] = {1, 2, . . . , n} and edges consisting of the initial m elements of = {e ⊂ [n] : |e| = 2} according to the lexicographic order. We have the following, as was noted in [4].
with equality if and only if G ∼ = L(n, m).
Theorem 2 was also proved independently by Wood [18]. In fact, since the Kruskal-Katona theorem implies that the lex graph is extremal for independent sets of any fixed size and, as was noted in [5], we have the following, where i t (G) is the number of independent sets of size t in G.
with equality if and only if G ∼ = L(n, m). This paper will begin with a survey of results about maximizing hom(G, H) where G ∈ G(n, m) and H is a small fixed image graph. Throughout the paper, we assume G is a simple graph, but H may contain loops. In Section 2, we introduce threshold graphs which will turn out to be extremal graphs for a set of image graphs consisting of what we call loop-threshold graphs. In Section 3, we begin our investigation into the one remaining open extremal problem for loop-threshold image graphs on at most three vertices. Finally, in Section 4, we give bounds on a function related to this extremal problem.

Threshold and loop-threshold graphs
Threshold graphs play a key role in the investigation of extremal problems related to graph homomorphisms. There are many characterizations of threshold graphs (see, e.g., [17]), but the most useful one for our purposes is as follows.

Definition 4.
A graph G is a threshold graph if it can be constructed recursively from K 1 by successively adding either a dominating vertex or an isolated vertex.
With this recursive definition in hand, we can observe that threshold graphs on n vertices can by represented by binary sequences of length n − 1, which we call the code of the threshold graph. We write 1 for a dominating vertex and a 0 for an isolated vertex. As the first vertex is irrelevant in this construction, we omit it from the code. Following convention, we write the code from right to left. Note that for a given code, 1s are adjacent to all vertices to their right in the code and 1s to their left. 0s are adjacent only to 1s to their left. Note that threshold graphs have at most one nontrivial component.
We often use superscripts to denote a string of the same symbol in the code of a threshold graphs so, 0 p 1 q is the code with q 1s followed by p 0s (from right to left). We note that any lex graph is a threshold graph. In general, the code of a lex graph is of the form 1 p 0 q 1 a 0 r , where p, q, and r are all nonnegative integers and a may be either 0 or 1 (where we write x 0 for the empty string).
We say that a graph G is H-extremal for a graph H (which may have loops) if hom(G, H) = max {hom(G , H) : n(G ) = n(G) and e(G ) = e(G)} .
It turns out that for many image graphs H, one is able to prove that there is always an Hextremal graph that is threshold. One such class of image graphs are called loop-threshold graphs.
Definition 5. A graph with (perhaps) loops is loop-threshold if it can be obtained from K 1 , or K 1 with a loop, by successively adding an unlooped isolated vertex, or a looped dominating vertex.
Once again, loop-threshold graphs on n vertices can be associated with a binary code, except now the length of the code is n (rather than n − 1). This is due to the fact that the code of the first vertex is now relevant since it determines whether that vertex is looped or not. We note that H ind is a loop-threshold graph with code 10. The following was proved in [6].

Theorem 6.
If H is any loop-threshold graph and n and m are any non-negative integers with 0 m n 2 , then there is a threshold graph T ∈ G(n, m) such that T is H-extremal. The aim of the remainder of this section is to survey extremal results for hom(G, H) where H is a loop-threshold graph on at most three vertices. We begin by making a couple of trivial observations. The first involves the situation when the image graph is the empty graph.
Observation 7. If q 1 is an integer and H is the loop-threshold graph with code 0 q , i.e., H = E q , then hom(G, H) = 0 for any graph G with at least one edge.
Another simple result holds for any image loop-threshold graph which is complete with loops on all vertices. Observation 8. If p 1 is an integer and H is a loop-threshold graph with code 1 p and G is a graph with n vertices, then hom(G, H) = p n .
There is one more simple case, namely when H is a loop-threshold graph with code of the form 0 q 1 p . In this case, H is the disjoint union of a fully-looped K p and E q . Proposition 9. If p 1 and q 0 are integers and H is a loop-threshold graph with code 0 q 1 p and G is a graph on n vertices with c isolated vertices, then hom(G, H) = (p+q) c p n−c .
Proof. Any of the c isolates in G can be mapped to any vertex of H, while the other n − c non-isolates in G can only be mapped to any of the p non-isolates in H.
If H is a loop-threshold graph with code 0 q 1 p , then Proposition 9 implies hom(G, H) is a simple function of the number of isolates when G ∈ G(n, m). To maximize hom(G, H) a b Figure 2: A labeled H ind over G ∈ G(n, m), one simply has to maximize the number of isolates in G. This can be done by a variety of graphs, including the colex 1 graph C(n, m).
The final general case we would like to present in this section is that of image loopthreshold graphs with code 1 p 0 q . We note that if H is a loop-threshold graph with code 1 p 0 q and we consider a homomorphism φ ∈ Hom(G, H) for some graph G, then the vertices of G mapped to the vertices with code 0 in H form an independent set in G. Thus, as one might expect, we can deduce the extremal question for maximizing homomorphisms into H from earlier results about independent sets.
As one does often in statistical physics, we can weight homomorphisms to a graph H with respect to a weighting function β : V (H) → [0, ∞). Then, we "count" weighted homomorphisms from a graph G to H via the partition function: Note that this reduces to counting homomorphisms if β ≡ 1, that is, hom β (G, H) = hom(G, H). We are interested in the case of weighted independent sets and so, if we label the vertices of H ind as in Figure 2, we define the weight function β λ to be the weight function on H ind defined by We see that, with this weighting of H ind , an independent set I is assigned weight λ |I| . But then the weighted homomorphism model introduced above yields the independence polynomial of the graph, i.e., P G (λ) = hom β λ (G, H). Since P G (λ) depends only on the number of independent sets of various sizes and the lex graph maximizes the number of independent sets of all sizes simultaneously, by Theorem 3, we have the following.
Corollary 10. If G is a graph on n vertices and m edges and λ > 0, then Finally, we can return to our original question regarding image loop-threshold graphs with codes of the form 1 p 0 q . We let S • (p, q) be the clique-looped split graph K • p ∨ E q , in which each vertex of K p is looped. 2 In other words, S • (p, q) is a loop-threshold graph with code 1 p 0 q . We have the following. in the colexicographic order. 2 The join of graphs G and H, denoted Corollary 11. Let p, q 1 and G be a graph with n vertices and m edges. Then hom(G, S • (p, q)) hom(L(n, m), S • (p, q)).
Proof. Set λ = p/q. Then, we have hom(G, S • (p, q)) = q n P G (λ) and so the result follows from Corollary 10.
Armed with the above results, we present in Table 1 all loop-threshold graphs on three or fewer vertices. All cases except for the last two are covered by one of the preceding results in this section. The penultimate image graph F (with code 101) is known as "the fox" (or "the wrench" by Brightwell and Winkler [3]) and the extremal question for this graph was studied by Cutler and Radcliffe [6]. They were able to determine a class of five threshold graphs which formed a minimal class of F -extremal graphs.
The final image graph (with code 010), which we denote J, will be the main focus of this paper. While it is relatively easy to determine the form of all J-extremal graphs, we will determine the size of the non-trivial component asymptotically up to a constant factor.

The remaining case
As mentioned in the previous section, the only case remaining in finding a minimal set of H-extremal graphs, where H is a loop-threshold graph on at most three vertices, is that of H = J. (See Figure 3.) The code of J is 010. Given the fact that J = E 1 ∪ H ind , it is not surprising that the threshold J-extremal graphs are comprised of a lex component with some number of added isolated vertices. Note that, by Theorem 6, for any n and m, there is at least one threshold J-extremal graph. For a graph G, we let j(G) = hom(G, J).  where i(C) is the number of independent sets in C. As Theorem 2 establishes that i(C) i(L(q, m)), with equality if and only if C ∼ = L(q, m), we have that where equality holds in the second step if and only if T ∼ = E n−q ∪ L(q, m).
As this construction of lex graphs with added isolated vertices occurs so frequently it is natural to define it as a function of the total number of vertices, the number of vertices in the lex component, and the number of edges. The restriction q m + 1 assures that L(q, m) contained no isolated vertices. We also note that j (R(n, q; m)) = 3 n−q i (L(q, m)) . (1)

An extremal question
In light of Theorem 12, finding a J-extremal threshold graph on n vertices and m edges is thus reducible to finding q within the bounds of m q 2 and q m + 1 such that R(n, q; m) is J-extremal. That is to say that the question of determining J-extremality is solely a matter of finding an appropriate number of vertices on which to form a lex component while leaving the rest as isolated vertices. This is the problem with which the remainder of this paper will be concerned.
Ideally, one would be able to find the size of the lex component in the J-extremal graph for any n and m. In general however, this does not appear to be an amenable question. For example, if one fixes n and asks how the size of the lex component changes as m increases, one might hope that this change is at least monotonic even if not easy to precisely quantify. This, unfortunately, is not the case. Figure 4 illustrates this when n = 50 which appears to typify the behavior throughout all values of n based on computer testing.  Having established the significance of (m) in the construction of J-extremal graphs, we will concentrate on establishing an upper bound on (m). As the number of homomorphisms to J is so closely related to the number of independent sets in the lex component, the matter of bounding (m) from above can be approached only once reasonable bounds are found for i(L(n, m)). Before embarking on these calculations, we pause to investigate some of the properties of the lex graph. The lex graph L(n, m) is related to (and sometimes isomorphic to) the split graph. We define the split graph S(n, k) is the graph with n vertices defined as the join of K k and E n−k . Thus, the number of edges in S(n, k) is e(S(n, k)) = k 2 + k(n − k).
If in the split graph S(n, k) = K k ∨ E n−k , we label the vertices of the K k with {1, 2, . . . , k} and those of the E n−k with {k + 1, k + 2, . . . , n}, then we can use this to describe the structure of the lex graph. If m = k 2 + k(n − k) + w, we note that the lex graph with n vertices and m edges is L(n, k, w) := L(n, m) = S(n, k) + {(k + 1)x : k + 2 x k + w + 2} .
Given n and m, we would like to determine k and w so that L(n, m) = L(n, k, w). Throughout this paper, we assume that 0 w n − k − 2 so that there is no ambiguity about the value of k and w for a given n and m. Essentially, the lex graph L(n, k, w) Figure 5: Schematics of the split graph and the lex graph consists of the split graph S(n, k) along with a star with w edges inside the E n−k . (See Figure 5.) We note that in the threshold code of the lex graph, the center of the star of size w in L(n, k, w) corresponds to the lone 1 inside of the string of initial 0s. From this point forward, we refer to the two types of vertices in the lex graph as those from the complete part and those from the empty part (even though the empty part may contain a star). Given the lex graph L(n, k, w), it is easy to determine the number of independent sets in it, as we do in the following lemma.
Proof. Note first that if any of the vertices in the complete part of the lex graph L(n, k, w) are included in an independent set, then no other vertices can be in the independent set since these vertices are dominating. There are k such independent sets. If, on the other hand, none of the vertices in the complete side are in an independent set I and the center of the star of size w in the empty part is also not in I, then there are 2 n−k−1 such independent sets (including the empty set) since the rest of the vertices form an independent set. If the center of the star of size w in the empty set is in I, then none of the other vertices of the star can be in I, and so there are 2 n−k−w−1 such I. These account for all independent sets in L(n, k, w), proving the lemma.
By extension we may also determine j(R(n, n ; m)) in a general form. Noting that isolates can be mapped to any vertex of J by an element of Hom(R(n, n ; m)), we have by Lemma 16, j(R(n, n ; m)) = 3 n−n k + 2 n −k−1 + 2 n −k−w−1 where k = k(n , m) and w = w(n , m). Now, we are finally ready to state and prove the main theorem of the paper, which gives asymptotically sharp bounds on (m).
the electronic journal of combinatorics 27(2) (2020), #P2.38 Proof. We first prove the upper bound on (m). The idea is compare j(L(n, m)) to j(R(n, n − r; m)) = 3 r j(L(n − r, m)). When the latter of these two is larger, we can remove r vertices from the lex component of a potentially extremal graph (i.e., the disjoint union of a lex graph and an empty graph) and increase the number of homomorphisms into J. Since we need to compare the number of homomorphisms into J, we let k and w be the integers so that L(n, m) = L(n, k, w). Likewise, we suppose that k r and w r are the integers so that L(n − r, m) = L(n − r, k r , w r ). Note that k r k as the removal of vertices from a lex graph forces the new lex component to be denser. We will show that the number of homomorphisms into J goes up provided that k r is not too much larger than k. Let d r be defined by Now, suppose that k r k + d r − 1. (We will determine when this happens in just a bit.) In this case, we have i(L(n, k, w)) = 2 n−k−1 + 2 n−k−w−1 + k The strict inequality holds provided that r 1. The question remains as to when k r k + d r − 1. Suppose, to the contrary, that k r k + d r . Then we know that, since w n − k − 2, e(L(n, k, n − k − 2)) e(L(n, k, w)) = e(L(n − r, k r , w r )) e(L(n − r, k r , 0)) e(L(n − r, k + d r , 0)).
Thus, writing out the first and last expressions in the above, we have This reduces to Rearranging, we get Note that if d r > 1, which happens provided that r 2, then 1 − d r < 0. So, if k r k + d r and r 2, we know that Thus, provided r 2, we know that if then k r k + d r − 1 and so (2) holds. So, we have a lower bound on n in terms of r and k (which depends on n and m) that implies that (2) holds. We would like to show that we can find an r so that we can remove r vertices from L(n, m) and increase the number of homomorphisms into J. We will show that such an r exists provided n > (1 + α)k + c √ k for some explicit constant c. In fact, we claim that if n > (1 + α)k + c √ k, then and we can remove r vertices from L(n, m) and increase the number of homomorphisms into J. After a bit of work and using the fact that d r = r/α, we have that (3) is equivalent to n − (1 + α)k > 2α 2 k + (2 + 1 α )r 2 + r 2(r − α) .
We will find a stronger inequality that implies this (and is cleaner) provided r 2. In what follows, we will use the fact that if r 2, then r − α r/8 several times. Thus, And so, we know that (3) is implied by r 2 and n − (1 + α)k > 4 3 + 1 α r + 8α 2 k r .
Multiplying through by r yields a quadratic inequality in r and so the above is equivalent to r 2 being between its two roots We are left to show that there is an r 2 between these two roots. We show that this occurs when n > (1 + α)k + c √ k where c = 384(3 + 1/α)α 2 . If n > (1 + α)k + c √ k, then (n − (1 + α)k) 2 > c 2 k which in turn implies that Also, note that the smaller root in (4) is positive. Thus, if we can show that the gap between the two roots is at least two, then there is an r 2 that does the job for us, i.e., Using (5), the above is implied if But we know that n − (1 + α)k > c √ k c and one can check that c > 16(3+1/α) √ 3 . So, there is an r 2 between the two roots in (4) and thus, we have shown that if n > (1 + α)k + c √ k, we can remove r (as defined above) vertices from L(n, m) and increase the number of homomorphisms into J.
We are left to show what bound on (m) this yields. Let n = (1 + α)k + c √ k so that we may not be able to remove r vertices and so (m) n. Then , where the last step follows from the fact that (1 + α)x + c √ x is increasing for all x > 0. Thus, we have proved the upper bound.
The proof of the lower bound, while similar to that of the upper bound, is a bit different and so we include it for completeness. In this case, we add add r vertices to L(n, m). Let L(n, m) = L(n, r, w) and define k r and w r to be the integers for which L(n + r, m) = L(n + r, k r , w r ). In this case, note that k k r . Again, let d r = r log 2 (3/2). We compare j(L(n, m) ∪ E r ) to j(L(n + r, m)).
We would like to figure out when k r k − d r − 2. So we assume the contrary, so that k r k − d r − 3. Then, as above, we have e(L(n, k, 0)) e(L(n, k, w)) = e(L(n + r, k r , w r )) e(L(n + r, k − d r − 3, w r )) e(L(n + r, k − d r − 3, n + r − k + d r + 2)).