1 Introduction

Fubini numbers are the ordered analogues of Bell numbers. The nth Fubini number (\(n\ge 0\)) counts the ordered partitions of a set with n elements, where denotes a Stirling number of the second kind. Their denomination is due to L. Comtet [14] in view of Fubini’s theorem in mathematical analysis. The related nth Fubini polynomial is (\(n\ge 0\)). For a classical reference on Fubini numbers and polynomials, see [27].

Fubini numbers have several restricted variants and generalizations.

If \(n\ge m\ge 0\), then the nth m-nonconsecutive Fubini number is the number of those ordered partitions of an n-element set in which two distinct elements are not allowed to be in the same block whenever the difference of their indices is at most m. (Details about m-nonconsecutive Stirling numbers of the second kind , which are equal to if \(m\le k\le n\), can be found, e.g., in [12, 13]; for more references, see [21]). Obviously, \(F_n^{(0)}=F_n\). We can also define the nth m-nonconsecutive Fubini polynomial as . H. Prodinger [25] proved that

$$\begin{aligned} F_n^{(m)}=\frac{1}{2^m}\sum _{k=1}^{m+1}\genfrac[]{0.0pt}{}{m+1}{k}F_{n-m-1+k}, \end{aligned}$$

where \(\genfrac[]{0.0pt}{}{m+1}{k}\) denotes an (unsigned) Stirling number of the first kind.

For \(n,r\ge 0\), the nth r-Fubini number counts those ordered partitions of a set with \(n+r\) elements where the first r elements belong to distinct blocks. They were introduced by I. Mező and G. Nyul [24]. (The r-Stirling numbers of the second kind were first defined by L. Carlitz [11], A. Z. Broder [9], and later rediscovered by R. Merris [23]. We use the parametrization where is the number of partitions of an \((n+r)\)-element set into \(k+r\) nonempty subsets such that the first r elements have to be in distinct blocks.) By definition, \(F_{n,0}=F_n\) and \(F_{n,1}=F_{n+1}\). The nth r-Fubini polynomial is .

Fubini numbers can be also defined for multisets. Let \(m_1,\ldots ,m_s\) be positive integers and \(n=m_1+\cdots +m_s\). Denote by \(F_{n,(m_1,\ldots ,m_s)}\) the number of ordered partitions of an n-element multiset where the underlying set contains s elements whose multiplicities are \(m_1,\ldots ,m_s\). Then \(F_{n,(1,\ldots ,1)}=F_n\). M. Griffiths and I. Mező [19] investigated Stirling numbers of the second kind for special multisets, and they derived the formula

$$\begin{aligned} F_{n,(m,1,\ldots ,1)}=\sum _{k=1}^n\sum _{l=1}^k(-1)^{k-l}\genfrac(){0.0pt}{}{k}{l}\genfrac(){0.0pt}{}{m+l-1}{m}l^{n-m}. \end{aligned}$$

Finally, we mention briefly a few more variants of Fubini numbers and polynomials without going into details, because they lie beyond the scope of this paper. We can prescribe certain restrictions on the cardinalities of the blocks, such restricted and associated Fubini numbers can be found in [5, 10]. Fubini type polynomials related to Whitney and r-Whitney numbers appear in [4, 15]. Recently, G. Rácz [26] studied Fubini–Lah numbers and polynomials, where not only the partition itself but also the blocks are ordered.

In our paper, we introduce Fubini numbers and Fubini polynomials of graphs, which notions cover ordinary, m-nonconsecutive Fubini numbers and polynomials, r-Fubini numbers and polynomials as special cases, and it will turn out that they are closely connected with the variant for multisets, as well.

2 Fubini Numbers and Polynomials of Graphs

Let G be a simple (finite) graph. A partition of V(G) is said to be an independent partition if each block is an independent vertex set, in other words, if adjacent vertices belong to distinct blocks. In [17], B. Duncan and R. Peele introduced Stirling numbers of the second kind and Bell numbers for graphs. (\(0\le k\le |V(G)|\)) and \(B_G\) count independent partitions of V(G) into k and an arbitrary number of blocks, respectively. These numbers already appeared before in the literature in connection with graph colourings, but the above-mentioned authors were the first who considered them from an enumerative point of view, as generalizations of classical Stirling and Bell numbers. A detailed study was given in [21], and several recent results can be found in [1,2,3, 16, 18, 20, 22]. One can define the corresponding Bell polynomial of the graph G, which notion is actually one of the variants of the \(\sigma \)-polynomials, see [7, 8].

Then, we define the Fubini number \(F_G\) of the graph G to be the number of ordered independent partitions of V(G). Since the number of ordered independent partitions of V(G) into k nonempty subsets is (\(0\le k\le |V(G)|\)), we immediately obtain , where summation could be taken from the chromatic number \(\chi (G)\).

Now, it is straightforward to define the Fubini polynomial of the graph G as . Clearly, a combinatorial meaning can be assigned to this polynomial. Namely, for \(c\ge 1\), \(F_G(c)\) is the number of c-coloured ordered independent partitions of V(G), where distinct blocks can have the same colour.

Since \(F_G(1)=F_G\), it will be sufficient to prove our theorems for Fubini polynomials, the similar property follows by a substitution for Fubini numbers.

We can immediately give four examples of Fubini numbers and polynomials for special graphs:

  • Simply, \(F_{K_n}=n!\) and \(F_{K_n}(x)=n!x^n\) for the n-vertex complete graph \(K_n\), since each block is a singleton in the only independent partition of \(V(K_n)\).

  • We have \(F_{E_n}=F_n\) and \(F_{E_n}(x)=F_n(x)\) for the n-vertex empty graph \(E_n\), because every subset of \(V(E_n)\) is independent.

  • If \(P_n^{(m)}\) is the n-vertex m-path graph (\(n\ge m\)), i.e., a simple graph where two vertices are adjacent if and only if their indices differ by at most m, then \(F_{P_n^{(m)}}=F_n^{(m)}\) and \(F_{P_n^{(m)}}(x)=F_n^{(m)}(x)\).

  • Finally, in [21] we introduced the graph \(R_{n,r}\) consisting of n isolated vertices and a clique with r vertices, in other words, the disjoint union of \(E_n\) and \(K_r\), to study r-Stirling numbers of the second kind and r-Bell numbers through graphs. For this graph, we have \(F_{R_{n,r}}=F_{n,r}\) and \(F_{R_{n,r}}(x)=x^{r}F_{n,r}(x)\).

Fubini numbers and polynomials of graphs satisfy the deletion–contraction relation.

Theorem 2.1

If G is a simple graph and \(e\in E(G)\), then \(F_G=F_{G-e}-F_{G/e}\) and \(F_G(x)=F_{G-e}(x)-F_{G/e}(x)\).

Proof

The assertion follows by the standard argument. A c-coloured ordered independent partition of \(V(G-e)\) is a c-coloured ordered independent partition of V(G) if the endpoints of e belong to distinct blocks. Otherwise, it corresponds to a c-coloured ordered independent partition of V(G/e). Therefore, \(F_{G-e}(c)=F_G(c)+F_{G/e}(c)\) for any \(c\ge 1\). \(\square \)

The Fubini number and polynomial of a graph can be expressed as a linear combination of ordinary Fubini numbers and polynomials. We call them Berceanu type identities, since C. Berceanu [6] proved it for Bell numbers (see also [21]).

Theorem 2.2

If G is a simple graph with chromatic polynomial \(p_G(x)=\sum \limits ^{|V(G)|}_{j=0}a_jx^j\), then

$$\begin{aligned} F_G=\sum _{j=0}^{|V(G)|}a_jF_j \hbox { and } F_G(x)=\sum _{j=0}^{|V(G)|}a_jF_j(x). \end{aligned}$$

Proof

It can be easily proved by induction on the number of edges. The induction step depends on the fact that deletion–contraction relations hold for both the chromatic polynomials and Fubini polynomials of graphs. \(\square \)

Using formal power series, the following Dobiński type formulas can be derived for the Fubini number and polynomial of a graph.

Theorem 2.3

If G is a simple graph, then

$$\begin{aligned} F_G=\sum _{j=0}^{\infty }\frac{p_G(j)}{2^{j+1}} \hbox { and } F_G(x)=\frac{1}{x+1}\sum _{j=0}^{\infty }p_G(j)\left( \frac{x}{x+1}\right) ^j. \end{aligned}$$

Proof

It is known (see, e.g., [21]) that the chromatic polynomial of G is , where \(x^{\underline{k}}\) denotes the kth falling factorial of x. Moreover, we need the reformulation \(\sum \limits _{j=0}^{\infty }\genfrac(){0.0pt}{}{j+k}{k}x^j=(1-x)^{-k-1}\) of the binomial series to obtain

\(\square \)

The expected value of the chromatic polynomial transform of a geometric random variable can be expressed by the Fubini polynomial of the graph.

Theorem 2.4

Let G be a simple graph with chromatic polynomial \(p_G(x)\), and \(\xi \) be a geometric random variable with parameter \(0<p\le 1\) in the sense that \(\mathsf {P}(\xi =j)=(1-p)^j p\) (\(j\ge 0\)). Then

$$\begin{aligned} \mathsf {E}p_G(\xi )=F_G\left( \frac{1-p}{p}\right) . \end{aligned}$$

Especially, for parameter \(p=\frac{1}{2}\), we have \(\mathsf {E}p_G(\xi )=F_G\).

Proof

After the necessary convergence considerations, it follows from Theorem 2.3 that

$$\begin{aligned} F_G\left( \frac{1-p}{p}\right) =p\sum _{j=0}^{\infty }p_G(j)\left( 1-p\right) ^j=\sum _{j=0}^{\infty }p_G(j)\mathsf {P}(\xi =j)=\mathsf {E}p_G(\xi ). \end{aligned}$$

\(\square \)

Remark

For the graphs \(E_n\), \(K_n\), \(P_n^{(m)}\), \(R_{n,r}\), and a geometric random variable \(\xi \) with parameter p, Theorems 2.3 and 2.4 give

$$\begin{aligned}&F_n(x)=\frac{1}{x+1}\sum _{j=0}^{\infty }j^n\left( \frac{x}{x+1}\right) ^j,\; n!x^{n}=\frac{1}{x+1}\sum _{j=0}^{\infty }j^{\underline{n}}\left( \frac{x}{x+1}\right) ^j, \\&F_n^{(m)}(x)=\frac{1}{x+1}\sum _{j=0}^{\infty }j^{\underline{m}}(j-m)^{n-m}\left( \frac{x}{x+1}\right) ^j, \\&x^{r}F_{n,r}(x)=\frac{1}{x+1}\sum _{j=0}^{\infty }j^nj^{\underline{r}}\left( \frac{x}{x+1}\right) ^j, \end{aligned}$$

and

$$\begin{aligned}&\mathsf {E}\xi ^n=F_n\left( \frac{1-p}{p}\right) ,\; \mathsf {E}\xi ^{\underline{n}}=n!\left( \frac{1-p}{p}\right) ^n, \\&\mathsf {E}(\xi ^{\underline{m}}(\xi -m)^{n-m})=F_n^{(m)}\left( \frac{1-p}{p}\right) ,\; \mathsf {E}(\xi ^n\xi ^{\underline{r}})=\left( \frac{1-p}{p}\right) ^{r}F_{n,r}\left( \frac{1-p}{p}\right) . \end{aligned}$$

In the rest of the paper, we study Fubini numbers and polynomials for trees, m-trees and cycle graphs.

Theorem 2.5

If G is a tree with \(n\ge 2\) vertices, then

$$\begin{aligned} F_G=\frac{F_{n}+F_{n-1}}{2} \hbox { and } F_G(x)=\frac{xF_{n}(x)+xF_{n-1}(x)}{x+1}. \end{aligned}$$

Proof

For a tree G with n vertices, it is proved in [21, 28] that and (\(1\le k\le n\)). Using the recurrence relation for Stirling numbers of the second kind, we have

\(\square \)

Remark

For an \((n+1)\)-vertex tree, Theorems 2.2 and 2.3 give

$$\begin{aligned} \frac{xF_{n+1}(x)+xF_{n}(x)}{x+1}= & {} \sum _{j=0}^{n}(-1)^{n-j}\genfrac(){0.0pt}{}{n}{j}F_{j+1}(x)\\ {}= & {} \frac{1}{x+1}\sum _{j=0}^{\infty }j(j-1)^{n}\left( \frac{x}{x+1}\right) ^j. \end{aligned}$$

Before stating the following theorem, we need to recall the recursive definition of m-trees (\(m\ge 0\)). The only m-vertex m-tree is the m-vertex complete graph. If \(n\ge m+1\), then an n-vertex m-tree is obtained from an \((n-1)\)-vertex m-tree by adding a new vertex and joining it to an m-vertex clique of the original graph. (For \(m=0\) and \(m=1\), m-trees are empty graphs and trees, respectively.)

Theorem 2.6

If \(m\ge 0\) and G is an m-tree with \(n\ge m+1\) vertices, then

$$\begin{aligned} F_G=\frac{(m+1)!}{2^m}F_{n,(m+1,1,\ldots ,1)}. \end{aligned}$$

Proof

It can be found in [21, 28] that (\(0\le k\le m-1\)) and (\(m\le k\le n\)) for an n-vertex m-tree G; therefore, .

The theorem is proved by induction on m. If \(m=0\), then G is the n-vertex empty graph, while the multiset in question is actually an n-element set; hence, both sides of the equation are equal to \(F_{n}\). Then, suppose that \(m\ge 1\) and the statement holds for \(m-1\).

For this m, we use induction on n. If \(n=m+1\), then G is the \((m+1)\)-vertex complete graph, the multiset contains \(m+1\) identical elements; hence, \(F_G=(m+1)!\) and \(F_{m+1,(m+1)}=2^m\). Now, suppose that \(n\ge m+2\) and the assertion is true till \(n-1\).

To prove the formula for n, consider an n-element multiset with one element having multiplicity \(m+1\), hereafter referred to as multiple element, and all the other elements having multiplicity 1. We enumerate the \(F_{n,(m+1,1,\ldots ,1)}\) ordered partitions of this multiset. Two types of such ordered partitions can be distinguished depending on whether the multiple element occurs in the last block.

If the last block contains at least one copy of the multiple element, then it can happen that it is a singleton, or it has cardinality at least two. In both cases, we can assign to this ordered partition an ordered partition of the multiset in which the multiple element has only multiplicity m by omitting the last block, or by deleting one copy of the multiple element from the last block, respectively. Therefore, the first induction hypothesis gives that the number of those ordered partitions of our original multiset where the last block contains at least one copy of the multiple element is

On the other hand, if the last block does not contain the multiple element, then denote by j the number of distinct elements in the other blocks including the multiple one (\(j=1,\ldots ,n-m-1\)), which means that those blocks have \(m+j\) elements altogether. For a fixed j, these elements can be chosen in \(\genfrac(){0.0pt}{}{n-m-1}{j-1}\) ways, then by the second induction hypothesis and the recurrence of binomial coefficients we obtain that the number of possibilities is

Consequently, using the binomial transformation identity and the recurrence of classical Stirling numbers of the second kind, the number of those ordered partitions where the last block contains no copies of the multiple element is

Summarizing, the number of ordered partitions of our multiset is

\(\square \)

Remark

Combining the results of H. Prodinger [25], M. Griffiths, I. Mező [19] and our Theorem 2.6, for \(n\ge m\ge 1\), we obtain the identity

$$\begin{aligned} \sum _{k=1}^{m}\genfrac[]{0.0pt}{}{m}{k}F_{n-m+k}=m!\sum _{k=1}^n\sum _{l=1}^k(-1)^{k-l}\genfrac(){0.0pt}{}{k}{l}\genfrac(){0.0pt}{}{m+l-1}{m}l^{n-m}. \end{aligned}$$

Theorem 2.7

If \(C_n\) is the cycle graph with \(n\ge 3\) vertices, then

$$\begin{aligned} F_{C_n}=\frac{F_n+(-1)^n}{2} \hbox { and } F_{C_n}(x)=\frac{xF_n(x)+(-1)^{n}x^2}{x+1}. \end{aligned}$$

Proof

The proof is by induction on n. In the induction step, for \(n\ge 4\), we have \(F_{C_{n}}(x)=F_{P_{n}}(x)-F_{C_{n-1}}(x)\) by Theorem 2.1, and beside the induction hypothesis we apply Theorem 2.5 for the n-vertex path graph \(P_{n}\). \(\square \)

Remark

For the graph \(C_n\), Theorems 2.2 and 2.3 give

$$\begin{aligned} \frac{xF_n(x)+(-1)^{n}x^2}{x+1}= & {} \sum _{j=0}^{n}(-1)^{n-j}\genfrac(){0.0pt}{}{n}{j}F_{j}(x)+(-1)^n(x-1) \\= & {} \frac{1}{x+1}\sum _{j=0}^{\infty }\left( (j-1)^n+(-1)^n(j-1)\right) \left( \frac{x}{x+1}\right) ^j. \end{aligned}$$

3 Appendix

We close our paper with a few words about Bell polynomials of graphs. As mentioned before, in [21] we investigated Stirling numbers of the second kind and Bell numbers for graphs. However, we could prove the corresponding properties of Bell polynomials of graphs, as well. The deletion–contraction relation and the Berceanu type identity also hold for Bell polynomials, we have \(B_G(x)=x^{m}B_{n-m}(x)\) if G is an m-tree with \(n\ge m+1\) vertices, and Dobiński’s formula becomes

$$\begin{aligned} B_G(x)=\frac{1}{\exp (x)}\sum _{j=0}^{\infty }\frac{p_G(j)}{j!}x^j. \end{aligned}$$