1 Introduction and Notation

A group of people under the name of GERAD developed a computer system called AutoGraphiX (AGX) based on [1, 2]. AGX is used to aid posing conjectures in graph theory and finding extremal graphs related to graph parameters. In this paper, we solve two conjectures proposed by AGX [5]. To introduce the conjectures, we first introduce some terminologies.

Let G=(V,E) be a connected simple graph with n vertices. Denote by N G (v) the set of neighbors of vertex v in G. If there is no danger of confusion, subscript G is omitted. A set SV(G) is a dominating set of G if for any vV, either vS or N(v)∩S≠∅. The domination number β(G) of a graph G is the minimum cardinality of a dominating set of G. Let d(u,v) be the length of a shortest path connecting u and v. The eccentricity of vertex v in G is ecc(v)=max{d(v,u):uV}. The diameter D(G)=max{ecc(v):vV} and the radius r(G)=min{ecc(v):vV}.

The family of graphs T(l;k 1,k 2,⋯,k t ) is defined by the following algorithm: For a length-(l−1) path P l :v 1 v 2v l , do nothing to the first k 1 vertices, then pend a vertex to every vertex of the following k 2 vertices, do nothing to the next k 3 vertices, pend a vertex to every vertex of the next k 4 vertices, and so on. The vertex of P l which was pended a vertex is called attachment vertex. Take T(20;1,2,3,4,2,1,7) for an example (see Fig. 1). The family of graphs T(l;k 1,k 2,⋯,k t ;p 1,G 1;p 2,G 2;⋯;p q ,G q ) is the graph obtained from T(l;k 1,k 2,⋯,k t ) by pending graph G j to vertex \(v_{p_{j}}\) for j=1,2,⋯,q.

Fig. 1
figure 1

T(20;1,2,3,4,2,1,7)

Let P n be a path on n vertices. The following are two conjectures proposed in [5] (we restate them using the above terminologies).

Conjecture 1.1

(Conjecture A.328-U in [5])

For any graph G on n vertices,

with equality if and only if G is a tree with D(G)=n−2, and β(G)=(n+3)/3 if n≡0 (mod 3) and a path P n if \(n\not\equiv0\ (\mathrm{mod}\ 3)\).

Conjecture 1.2

(Conjecture A.382-U in [5])

For any graph G on n vertices,

$$\beta(G)+r(G)\leqslant \bigl\lfloor(5n+4)/6 \bigr\rfloor, $$

with equality if and only if G=P n when \(n\not\equiv3\ (\mathrm{mod}\ 6)\) and G=T(n−1;i,1,n−2−i) for some i≡2 (mod 3) when n≡3 (mod 6).

These two conjectures are not exact. The exact results are the following two theorems which will be proved in this paper.

Theorem 1.1

Let G be a graph on n vertices, where n⩾6.

  1. (i)

    When n≡0 (mod 3), β(G)D(G)⩽(n 2+n−6)/3. Furthermore, a tree T achieves the upper bound if and only if T=T(n−1;i,1,ni−2) for some i≡2 (mod 3).

  2. (ii)

    When n≡1 (mod 3), β(G)D(G)⩽(n 2+n−2)/3, and the only extremal tree is P n .

  3. (iii)

    When n≡2 (mod 3) and n⩾12, β(G)D(G)⩽(n 2+n−12)/3. Furthermore, a tree T achieves the upper bound if and only if T=T(n−2;i,1,j,1,nij−4) for some i≡2 (mod 3), 0⩽jni−5 and j≡0 (mod 3).

  4. (iv)

    When n=8, β(G)D(G)⩽21, and the only extremal tree is P 8. When n=11, β(G)D(G)⩽40, and extremal trees are P 11, T=T(n−2;i,1,ni−3;i+1,K 1) for i=2 or 5, and T=T(n−2;i,1,j,1,nij−4) for (i,j)∈{(2,0),(2,3),(5,0)}.

Theorem 1.2

For any connected graph G on n vertices,

$$\beta(G)+r(G)\leqslant \bigl\lceil(5n-1)/6 \bigr\rceil. $$

It should be remarked that extremal trees for Theorem 1.2 include the two classes of trees stated in Conjecture 1.2. However, there are a lot more. Although it can be seen from the proof of Theorem 1.2 that the diameter of an extremal tree is at least n−6, a complete characterization is far from neat, and thus we choose not to go into the cumbersome description of all extremal trees.

As D(G),r(G)=+∞ for disconnected graphs, we only consider connected graphs. Furthermore, it is sufficient to consider simple graphs since loops and parallel edges do not influence the three parameters considered in this paper. For simplicity of notation, β(G),D(G),r(G) are sometimes abbreviated as β,D,r.

2 Upper Bound for βD

First, we introduce some previous results which will be used in this paper.

Based on a polynomial algorithm proposed by Cockayne et al. [3] in 1975, it can be deduced that

Lemma 2.1

β(P n )=⌈n/3⌉.

Applying operation f to a connected graph H is to pend one vertex to every vertex of H, resulting in a graph f(H). Denote by g(f(H)) the graph obtained from f(H) by adding a new vertex x and joining x to at least one vertex of H. The order of a graph G is the number of vertices in G. Notice that the order of f(H) is even and the order of g(f(H)) is odd.

Theorem 2.1

([6])

For a connected graph H such that f(H) has n vertices, β(f(H))=β(g(f(H)))=n/2.

Theorem 2.2

([4])

For a graph G on n vertices without isolated vertex, β(G)⩽⌊n/2⌋.

First, we prove an arithmetic result.

Lemma 2.2

Let x 1,x 2,⋯,x t be t positive integers. Then

$$\sum_{i=3}^t \biggl\lceil \frac{x_i-2}{3} \biggr\rceil+\sum_{j=1}^{2} \biggl\lceil\frac{x_j-1}{3} \biggr\rceil \leqslant \biggl\lceil\frac{\sum_{i=1}^tx_i}{3} \biggr\rceil. $$

Proof

Suppose among the last t−2 integers, there are t l integers equal to l modulo 3 for l=0,1,2. Without loss of generality, we assume that

$$x_i= \begin{cases} 3y_i, & 3\leqslant i\leqslant t_0+2,\\3y_i+1,& t_0+3\leqslant i\leqslant t_0+t_1+2,\\ 3y_i+2, & t_0+t_1+3\leqslant i\leqslant t, \end{cases} $$

where any y i is non-negative integer and t=t 0+t 1+t 2+2. Also assume that x j =3y j +s j for j=1,2, where y j ,s j are a non-negative integers and 0⩽s j ⩽2. Then

while

$$\biggl\lceil\frac{\sum_{i=1}^tx_i}{3} \biggr\rceil=\sum_{i=1}^t y_i+ \biggl\lceil\frac{t_1+2t_2+s_1+s_2}{3} \biggr\rceil. $$

Since t 1,t 2⩾0, the desired inequality follows. □

Next, we derive an upper bound for β(T) where T is a tree on n vertices whose diameter is at least n/2+1.

Lemma 2.3

For two fixed integers n and D with Dn/2+1, let \(\mathcal{T}=\{T\mid T\ \mbox{\textit{is a tree with order}}\ n\ \mbox{\textit{and diameter}}\ D\}\). Then the maximum value of β(T) for \(T\in\mathcal{T}\) is achieved at T 0=T(D+1;2,n−1−D,2Dn) with β(T 0)=nD+⌈(2Dn−1)/3⌉.

Proof

We first remark that the condition Dn/2+1 is to guarantee the existence of T 0 with 2Dn⩾2.

For any tree \(T\in\mathcal{T}\), considering a path of length D as the spine (which has D+1 vertices), T can be written as T=T(D+1;k 1,k 2,⋯,k t ;p 1,G 1;p 2,G 2;⋯;p q ,G q ) for some t and q, and G i is a tree for 1⩽iq.

Let G=T(D+1;2,k′,D−1−k′;D−1,G′), where

$$k'=\sum_{2\leqslant i\leqslant t-1}^{i\ \text{is even}}k_i, $$

\(|V(G')|=\sum_{i=1}^{p}|V(G_{i})|\), and G′=f(H) or g(f(H)) for some connected graph H depending on the parity of |V(G′)|. Clearly, G also has n vertices.

Claim 1 β(T)⩽β(G).

Notice that the diameter of G might be larger than D, and G might not be a tree. However, we only use G to obtain an intermediate upper bound for β(T), which will be further upper bounded by the domination number of a tree in \(\mathcal{T}\). In the following, we prove the claim.

Let S be a minimum dominating set of G. For i=3,4,⋯,2+k′, suppose u i is the vertex pended to v i where v i is the attachment vertex. Clearly, either u i S or v i S. If u i S, then (S∖{u i })∪{v i } is still a dominating set whose size is at most |S|. Hence, we may assume that {v 3,v 4,⋯,v 2+k}⊆S. Then v 2 and v 3+k are both dominated. For the same reason, we may assume that v 2S, which dominates v 1. To dominate the vertices in G′, we see from Theorem 2.1 that \(\lfloor V(G')/2\rfloor=\lfloor \sum_{i=1}^{q}|V(G_{i})|/2\rfloor\) vertices are needed. To dominate the vertices in the path v 4+k v 5+kv D+1, ⌈(D−2−k′)/3⌉ vertices are needed by Lemma 2.1. Notice that

$$D-\bigl(2+k'\bigr)= \Biggl(\sum_{1\leqslant i\leqslant t}^{i\ \text{is odd}}k_i \Biggr)-3. $$

Hence

(1)
(2)

By a similar argument and by Theorem 2.2, we can construct a dominating set for T of cardinality at most

$$\biggl\lceil\frac{k_1-1}{3} \biggr\rceil+\sum _{2\leqslant i\leqslant t-1}^{i\ \text{is\ even}}k_i+ \sum _{3\leqslant i\leqslant t-2}^{i\ \text{is\ odd}} \biggl\lceil\frac{k_i-2}{3} \biggr\rceil+ \biggl\lceil\frac {k_t-1}{3} \biggr\rceil +\sum _{i=1}^{q} \biggl\lfloor\frac{|V(G_i)|}{2} \biggr \rfloor. $$

Then we can deduce β(T)⩽β(G) by Lemma 2.2. Claim 1 is proved.

Claim 2 β(T(D+1;2,k′,D−1−k′;D−1,G′))⩽β(T 0) holds for any G′=f(H) or g(f(H)) with |V(G′)|=nD−1−k′.

By expression (1), β(T(D+1;2,k′,D−1−k′;D−1,G′))=f(k′) where

$$ f\bigl(k'\bigr)=1+k'+ \biggl\lceil \frac{D-2-k'}{3} \biggr\rceil+ \biggl\lfloor\frac {n-D-1-k'}{2} \biggr\rfloor. $$
(3)

Notice that T 0 is a special graph of T(D+1;2,k′,D−1−k′;D−1,G′), namely, taking k′=n−1−D and G′=∅. Thus to show Claim 2, it suffices to prove

$$ f\bigl(k'\bigr)\leqslant f(n-1-D). $$
(4)

Suppose k′<n−1−D. If nD−1−k′≡1 (mod 2), then replacing k′ by k′+1 in (3), the second term is increased by 1, the third term is decreased by at most 1, and the fourth term remains the same. Hence f(k′+1)⩾f(k′). If nD−1−k′≡0 (mod 2), then k′⩽(n−1−D)−2. Replacing k′ by k′+2 in (3), the second term is increased by 2, the third term is decreased by at most 1, and the fourth term is decreased by 1. Hence f(k′+2)⩾f(k′). Proceeding like this, inequality (4) can be achieved. Thus Claim 2 is proved.

Combining the above three claims, we see that T 0 has the maximum domination number in \(\mathcal{T}\). The expression of β(T 0) follows from (3). □

Now, we study the upper bound for βD and characterize the extremal trees.

Proof of Theorem 1.1

Notice that deleting an edge from graph G while keeping the graph to be connected, both β and D are non-decreasing. Hence, to study the upper bound for βD, it suffices to consider trees.

In the case that D⩽⌈n/2⌉, we see from Theorem 2.2 that βD⩽⌊n/2⌋⋅⌈n/2⌉, which is strictly smaller than the upper bounds stated in the theorem for n⩾6. Hence in the following, we assume D⩾⌈n/2⌉+1. Then by Lemma 2.3,

$$ \beta \leqslant n-D+\bigl\lceil(2D-n-1)/3\bigr\rceil $$
(5)

for any fixed D. Define a function g on variable D as

The stable point of g(D) is

$$D_0= \begin{cases}n-1/2, & 2D-n-1\equiv0\ (\mathrm{mod}\ 3),\\ n+1/2, & 2D-n-1\equiv1\ (\mathrm{mod}\ 3),\\ n, & 2D-n-1\equiv2\ (\mathrm{mod}\ 3). \end{cases} $$

Since Dn−1<D 0, the maximum value of g(D) can be obtained by analyzing the maximum value of D in view of 2Dn−1 (mod 3).

When n≡0 (mod 3), the maximum value of D is

$$D_{\max}= \begin{cases}n-3, & D\equiv0\ (\mathrm{mod}\ 3),\\n-2, & D\equiv1\ (\mathrm{mod}\ 3),\\ n-1, & D\equiv2\ (\mathrm{mod}\ 3),\\ \end{cases} $$

and

$$2D_{\max}-n-1\equiv \begin{cases}2, & D\equiv0\ (\mathrm{mod}\ 3),\\1, & D\equiv1\ (\mathrm{mod}\ 3),\\ 0, & D\equiv2\ (\mathrm{mod}\ 3).\\ \end{cases} $$

Thus

$$g(D_{\max})= \begin{cases}(n^2-9)/3, & D\equiv0\ (\mathrm{mod}\ 3),\\(n^2+n-6)/3, & D\equiv1\ (\mathrm{mod}\ 3),\\ (n^2-n)/3, & D\equiv2\ (\mathrm{mod}\ 3).\\ \end{cases} $$

Hence, when n≡0 (mod 3), βD⩽(n 2+n−6)/3, and the upper bound is achieved at D=n−2. By Lemma 2.3, an extremal graph is T(n−1;2,1,n−4). To find out all extremal trees in this case, first observe that the upper bound is achieved only at D=n−2, hence any extremal tree T has the form T=T(n−1;i,1,ni−2) for some 1⩽in−3. Second, observe that

$$\beta\bigl(T(n-1;i,1,n-i-2)\bigr)= \biggl\lceil\frac{i-1}{3} \biggr \rceil+1+ \biggl\lceil\frac{n-i-3}{3} \biggr\rceil. $$

So, for such a tree T, β(T)D(T) attains (n 2+n−6)/3 if and only if i≡2 (mod 3). Thus (i) of the theorem is proved.

By a similar argument, it can be deduced that when n≡1 (mod 3), βD⩽(n 2+n−2)/3, and the upper bound is achieved at D=n−1. Since D=n−1, the extremal tree can only be P n .

For n≡2 (mod 3), it can be deduced that the maximum value of D is

$$D_{\max}= \begin{cases}n-2, & D\equiv0\ (\mathrm{mod}\ 3),\\n-1, & D\equiv1\ (\mathrm{mod}\ 3),\\ n-3, & D\equiv2\ (\mathrm{mod}\ 3),\\ \end{cases} $$

and

$$ g(D_{\max})= \begin{cases}(n^2-n-2)/3, & D\equiv0\ (\mathrm{mod}\ 3),\\(n^2-1)/3, & D\equiv1\ (\mathrm{mod}\ 3),\\ (n^2+n-12)/3, & D\equiv2\ (\mathrm{mod}\ 3).\\ \end{cases} $$
(6)

Hence in the case n⩾12, we have βD⩽(n 2+n−12)/3, and the upper bound is achieved at D=n−3. By Lemma 2.3, an extremal tree is T(n−2;2,2,n−6). To find out all extremal trees in this case, observe that the upper bound is achieved only at D=n−3, hence any extremal tree T has one of the following three forms:

(F1):

T=T(n−2;i,1,ni−3;i+1,K 1) for some 1⩽in−4, where K 1 is a single vertex;

(F2):

T=T(n−2;n−2;i,P 2) for some 3⩽in−4, where P 2 is a path on two vertices;

(F3):

T=T(n−2;i,1,j,1,nij−4) for some 0⩽jni−5.

In order that βD attains (n 2+n−12)/3, it suffices to find out when (n+4)/3 can be reached by β. For a tree with the form (F1), β=1+⌈(i−1)/3⌉+⌈(ni−4)/3⌉⩽(n+1)/3. For a tree with the form (F2), β⩽1+⌈(n−2)/3⌉=(n+1)/3 (a dominating set contains the pending vertex of P 2 and a dominating set of the spine). For a tree with the form (F3), β=2+⌈(i−1)/3⌉+⌈(j−2)/3⌉+⌈(nij−5)/3⌉ which attains (n+4)/3 if and only if i≡2 (mod 3) and j≡0 (mod 3). Thus (iii) of the theorem is proved.

For n=8, we see from (6) that βD⩽(n 2−1)/3=21 and the upper bound is achieved at D=n−1=7. Hence there is only one extremal tree P 8. For n=11, βD⩽(n 2−1)/3=(n 2+n−12)=40 and the upper bound is achieved at D=n−3=8 or D=n−1=10. When D=10, the extremal tree is P 11. When D=8, similarly to the analysis in the above paragraph, extremal trees are as described in (iv) of the theorem. □

Remark

For n⩽5, it is easy to see that β(G)D(G)⩽⌊n/3⌋⋅(n−1) and the extremal graph is P n .

3 Upper Bound for β+r

The proof of Theorem 1.2 follows the same idea as Sect. 2.

Proof of Theorem 1.2

Denote by g(G)=β(G)+r(G). By the monotonicity of β and r, it suffices to consider trees. For any tree T, r(T)=⌊(D(T)+1)/2⌋. Combining this with inequality (5), we see that for any fixed D,

In each case, g(T) is monotone increasing with D. Hence g(T) achieves its maximum at D max, where D max is the maximum possible value of D which depends on the values of 2Dn−1 (mod 3) and D (mod 2).

Recall that D maxn−1. When n≡0 (mod 6),

$$D_{\max}= \begin{cases}n-4, &2D-n-1\equiv0\ (\mathrm{mod}\ 3)\ \mbox{and}\ D\equiv 0\ (\mathrm{mod}\ 2),\\ n-1,&2D-n-1\equiv0\ (\mathrm{mod}\ 3)\ \mbox{and}\ D\equiv1\ (\mathrm {mod}\ 2),\\ n-2,&2D-n-1\equiv1\ (\mathrm{mod}\ 3)\ \mbox{and}\ D\equiv0\ (\mathrm {mod}\ 2),\\ n-5,&2D-n-1\equiv1\ (\mathrm{mod}\ 3)\ \mbox{and}\ D\equiv1\ (\mathrm {mod}\ 2),\\ n-6,&2D-n-1\equiv2\ (\mathrm{mod}\ 3)\ \mbox{and}\ D\equiv0\ (\mathrm {mod}\ 2),\\ n-3,&2D-n-1\equiv2\ (\mathrm{mod}\ 3)\ \mbox{and}\ D\equiv1\ (\mathrm {mod}\ 2),\\ \end{cases} $$

and thus

$$g(T)\leqslant \begin{cases}5n/6, &\mbox{when}\ D=n-i\ \mbox{for}\ i=1,2,3,5,\\ (5n-6)/6,&\mbox{when}\ D=n-i\ \mbox{for}\ i=4,6.\\ \end{cases} $$

Hence the upper bound is 5n/6 which is achieved at D=ni for i=1,2,3,5. By a similar argument, it can be seen that

$$g(T)\leqslant \begin{cases}(5n+i)/6, & n\equiv i\ (\mathrm{mod}\ 6)\ \mbox{for}\ \ i\not\equiv5\ (\mathrm{mod}\ 6),\\(5n-1)/6, & n\equiv5\ (\mathrm{mod}\ 6), \end{cases} $$

which can be unified as g(T)⩽⌈(5n−1)/6⌉. □