1 Introduction

The study of graph invariants plays crucial role in graph theory. Invariants are the tools to classify graph families according to the particular property. Sometimes, invariants reveal structural (hidden) connections between graph families or relations to families of other combinatorial objects. The most studied invariants, as for instance, the chromatic number, has a simple definition. However, there are also useful invariants that are based on more complicated concepts. The boolean number is such an invariant, its definition involves the so-called boolean complex associated to a given simple graph [3, 10,11,12]. Though the definition of the boolean numbers is of topological nature it turned out that they are in close relation to several graph theoretical issues. For instance, it can be obtained as special value of the bivariate chromatic polynomials [4]. Jonsson and Welker [10] revealed the strong connection to acyclic orientations. From our results in the special case of Ferrers graphs, it follows that the boolean number of a Ferrers graph is equal to the Crapo’s beta invariant, which is defined as a certain value of the derivative of the chromatic polynomial of the graph and counts the number of acyclic orientations with a unique sink and unique source [7]. We note here that since chromatic polynomials appear in several contexts we also suspect that the boolean numbers could be treated with techniques from these areas, as from the theory of hyperplane arrangements [7].

However, in this paper we focus on a more direct (elementary) approach that was introduced by Ragnarsson and Tenner [12]. Ragnarsson and Tenner [12] defined the derangement set of a graph and showed that the boolean number of the graph is equal to the cardinality of this set. They presented a recursive algorithm that constructs the derangement set of a graph depending on the particular linear ordering of its vertex set.

It is always an important fundamental question what we can say about the invariant of some well-known basic or special “interesting” graph families as complete graphs, bipartite complete graphs, path graphs, bipartite graphs, etc. The boolean number of the complete graph, \(K_n\), for instance, is the number of derangements of \([n]=\{1,2,\ldots , n\}\) [15, A000166], as shown in [6, 11, 13]. The special graph family, the family of the so-called Ferrers graphs, graphs associated to a given Ferrers shape, gives rise to interesting cases. We think that these results are beautiful examples how different ideas and aspects in mathematics fit at a point together.

For Ferrers graphs associated to staircase shapes Ragnarsson and Tenner [12] described a linear ordering and gave a bijective proof to show that the derangement set of a Ferrers graph of the staircase shape is the set of permutations of alternating excedances. This proof gives a combinatorial explanation of the result in [3] stating that the boolean numbers of Ferrers graphs with staircase shapes are the median Genocchi numbers [15, A005439]. Note that the median Genocchi numbers count also the number of regions of a certain hyperplane arrangements as shown by Hetyei [8]. Our work provides a connection between these two seemingly independent results.

One of the aims of our note is to point out that this is a special case of a general correspondence between the boolean numbers of Ferrers graphs and the number of \(F_{\lambda }\)-Callan sequences [2]. Another goal is to highlight that the boolean numbers of the complete bipartite graphs, for which Claesson et al. [3] derived a formula, is also a known number array, the D-relatives of poly-Bernoulli numbers [1, 15, A272644].

We characterize the derangement set of general Ferrers graphs based on the canonical labelings [2, 14] and the algorithm of Ragnarsson and Tenner [12]. This characterization implies that the cardinality of the derangement set of a graph associated to a general Ferrers shape, \(F_{\lambda }\), is the same as the number of \(F_{\lambda }\)-Callan sequences.

Moreover, we present a bijection between the derangement sets and the corresponding \(F_{\lambda }\)-Callan sequences. Further correspondences to certain fillings of Ferrers shapes (lonesum fillings, \(\Gamma \)-free fillings, etc) follow from our bijection. In particular, this bijection connects the derangement sets of a graph, i.e., the boolean numbers of Ferrers shapes to several combinatorial objects, including EW–tableaux, LE–tableaux, acyclic orientations, abelian sandpile models, [2, 14] etc.

The outline of the paper is as follows. Since we addressed this note also to readers who are not familiar with all the details in the different areas, we want to keep this note self-contained as far as it is possible. For these reasons, in Sect. 2 we recall the necessary definitions and concepts about the boolean number. In Sect. 3, we consider first complete bipartite graphs, because the key ideas are easy to follow in this special case. Finally, after understanding the case of the complete bipartite graphs the generalization to Ferrers graphs which we work out in Sect. 4 is almost straightforward.

2 Preliminaries

2.1 The Boolean Complex and the Boolean Number of a Graph

Given a finite simple graph \(G=(V,E)\), let the following equivalence relation defined on the set of words on V without repetition: w and \(w'\) are equivalent if \(w'\) can be obtained from w by applying a sequence of commutations \(tt'\rightarrow t't\) such that t and \(t'\) are not adjacent in G, i.e. \((t,t')\in E\). We denote the equivalence class of w by [w] and the set of the equivalence classes by \({\mathcal {B}}(G)\). Further, we order the set \({\mathcal {B}}(G)\) by saying that \([v]\le [w]\) if there are representatives \(v'\in [v]\) and \(w'\in [w]\) such that \(v'\) is a subword of \(w'\). (A subword of a word \(\omega _1\ldots \omega _r\) is a word \(\omega _{j_1}\ldots \omega _{j_s}\) such that \(1\le j_1\le \cdots \le j_s\le r\).) With this order \({\mathcal {B}}(G)\) is a poset, the boolean poset of G. The boolean poset is a ranked poset, whose rank is given for each [w] by the length of a representative word \(w\in [w]\). The boolean complex is defined as the regular cell complex, \(\Delta (G)\), that has \({\mathcal {B}}(G)\) as its face poset. The geometric realization \(|\Delta (G)|\) is obtained the usual way by taking for each k-cell in \(\Delta (G)\) a geometric simplex and gluing the simplices together according to the face poset. \(|\Delta (G)|\) is isomorphic to the wedge sum of \((n-1)\)-spheres [11, 12].

$$\begin{aligned} |\Delta (G)|\simeq \bigvee _{i=1}^{\beta (G)}S^{|V(G)|-1}. \end{aligned}$$

The number of the spheres, \(\beta (G)\), is called the boolean number of G. One approach to determine the boolean number is the recursive definition of these numbers [11]. The initial conditions are as follows: the boolean number for a graph with no edges is 0, while the boolean number of the graph containing two vertices adjacent by an edge, \(K_2\), is 1.

For graphs with at least three vertices it holds:

$$\begin{aligned} \beta (G)=\beta (G-e)+\beta (G/e)+\beta (G-[e]). \end{aligned}$$
(1)

The graph operations \(G-e\), G/e, \(G-[e]\) are defined as usual. Given a graph \(G=(V,E)\) and an edge \(e\in E\) \(G-e\) is the graph obtained from G by deleting the edge e, G/e is the graph obtained from G by contracting the edge e and deleting all redundant edges, and \(G-[e]\) is the graph obtained from G by deleting the vertices incident to e.

It is easy to see, for instance, that \(\beta (G)=0\) holds for any graph that contains an isolated vertex. This recursion was used in [3] to compute the boolean numbers for Ferrers graphs.

2.2 Acyclic Orientations

The poset \({\mathcal {B}}(G)\) can be also seen as the poset of acyclic orientations on induced subgraphs. An orientation of \(G=(V,E)\) is an assignment of a direction to each edge (ij) denoted by \(i\rightarrow j\) or \(j\rightarrow i\). An orientation of G is acyclic if it doesn’t contain coherently directed cycles. An induced subgraph is the graph on a subset \(V'\subset V\) of vertices of G with all the edges from E that are on \(V'\). To an acyclic orientation one can associate a word w on the vertices of the underlying vertex set: we arrange the vertices in an order such that each edge points forward. To an injective word w (a word such that each letter of the groundset appears at most once) we can associate the acyclic orientation on the induced graph with vertex set of the elements of the word and edges \(a\rightarrow b\) if a precedes b in the word w. The authors in [10] showed that this defines a poset isomorphism between the boolean poset of a graph and the poset of acyclic orientations on induced subgraphs. Moreover, \({\mathcal {B}}(G)\) is shellable and the boolean number is equal to the number of some maximal elements. Hence, the boolean number is the number of certain acyclic orientations of the graph G.

Green and Zaslavsky showed [7] that the number of acyclic orientations of a graph with a specified \(u_0v_0\) edge such that \(u_0\) is the unique source and \(v_0\) is the unique sink is the derivative of the chromatic polynomial evaluated at 1 with an appropriate signing. This expression, \(\chi '(G;1)\), is called the Crapo’s beta-invariant of G.

2.3 The Bivariate Chromatic Polynomial

Based on the recursive property of the boolean number (1) one can show that it is the evaluation of certain graph polynomials [3].

Dohmen et al. [4] introduced a generalization of the chromatic polynomial, the bivariate chromatic polynomial P(Gxy). P(Gxy) counts the number of colorings of G using y proper and \(x-y\) improper colors. Two adjacent vertices can only be colored by an improper color but not by a proper color.

Let \(a_{ij}\) be the number of independent partitions (such that there are no edges between vertices contained in the same block) of G with exactly i singletons and j blocks containing two or more vertices. Then

$$\begin{aligned} P(G;x,y)=\sum _{i=0}^n\sum _{j=0}^na_{ij}\sum _{k=0}^{i}\left( {\begin{array}{c}i\\ k\end{array}}\right) (x-y)^k(y)_{i+j-k}, \end{aligned}$$

where \((y)_n=y(y-1)\cdots (y-n+1)\).

The boolean number is given by the bivariate polynomial evaluated at \(x=0\) and \(y=-1\) [3].

$$\begin{aligned} \beta (G)=(-1)^nP(G;0,-1). \end{aligned}$$

2.4 Derangement Set of Graphs

Ragnarsson and Tenner [12] present an algorithm that constructs a set of permutations to a given finite simple graph G, \({\mathcal {D}}(G)\), the derangement set of the graph G such that

$$\begin{aligned} \beta (G)=|{\mathcal {D}}(G)|. \end{aligned}$$

We recall the definition of the algorithm. Let t denote the maximal vertex of G.

  • If \(V=\{1,2\}\) with an edge between them, then \({\mathcal {D}}(G)=\{(12)\}\).

  • If t is an isolated vertex, then \({\mathcal {D}}(G)=\emptyset \).

Let \(e=\{s,t\}\) be the maximal edge of the graph, where t is the maximal vertex and s is the maximal vertex adjacent to t. The recursive step is defined on operations on the maximal edge.

  • Deletion: Since \(G-e\) has the same vertex set as G, the permutations associated to these graphs are the same.

  • Simple Contraction: Let x be the vertex in G/e that is obtained by contracting e. Given a permutation \(\pi \) associated to the vertex set of G/e, let \(\pi ^*\) be the permutation on the vertex set of G such that we replace x by st in this order in the cycle notation of \(\pi \).

  • Extraction: The vertex set of \(G-[e]\) is a subset of the vertex set of G, i.e., \(V(G-[e]) = V(G)\setminus \{s,t\}\). Given a permutation \(\pi \) on the vertex set of \(G-[e]\), a permutation \(\pi +(st)\) on the vertex set of G is given by applying \(\pi \) to any element of the vertices of \(G-[e]\) and the transposition (st) to the elements s and t.

The recursive step is the following: If t is not an isolated vertex, \(e=\{s,t\}\) is the maximal edge, and G has at least three vertices, then set:

$$\begin{aligned} {\mathcal {D}}(G):={\mathcal {D}}(G-e)\cup \{\pi ^*:\pi \in {\mathcal {D}}(G/e)\}\cup \{\pi +(st):\pi \in {\mathcal {D}}(G-[e])\}. \end{aligned}$$

The recursive step and the initial conditions of the algorithm coincide with those for the boolean number. Another useful characterization of \({\mathcal {D}}(G)\) is also given in [12].

Let \(\pi \) be a permutation written in standard cycle form, i.e. written as a product of cycles, the least element of a cycle in the first place and the cycles arranged from left to right in increasing order of the minimum elements of the cycles. For instance, \(\pi =(14)(2573)(6)\). For a vertex t of G, let \(\lambda _{\pi }(t)\) be the first element appearing to the left of t that is smaller than t, i.e.

$$\begin{aligned} \lambda _{\pi }(t)=\pi ^{-\ell }(t)\quad \text{ with }\quad \ell =\min \{i:\pi ^{-i}(t)\le t\}. \end{aligned}$$

Further, let \(\rho _{\pi }(t)\) the set of elements obtained by starting at t and moving to the right until reaching a smaller element than t, i.e.

$$\begin{aligned} \rho _{\pi }(t)=\{t, \pi (t),\pi ^2(t),\ldots , \pi ^{k-1}(t)\}\quad \text{ with }\quad k=\min \{i: \pi ^i(t)\le t\}. \end{aligned}$$

For instance, for the smallest element t in the cycle \(\rho _{\pi }(t)\) is the entire set of the elements in the cycle and \(\lambda _{\pi }(t)=t\). In our example \(\lambda _{\pi }(5)=2\) and \(\rho _{\pi }(5)=\{5,7\}\).

Theorem 1

([12]) Let G be a finite simple graph and let \(\pi \) be a permutation on its vertex set. Then \(\pi \in {\mathcal {D}}(G)\) if and only if for every vertex t of G the vertex \(\lambda _{\pi }(t)\) is adjacent to a vertex in \(\rho _{\pi }(t)\).

3 The Complete Bipartite Graphs

3.1 Applications of General Results

First, we apply the known facts recalled in the previous section to complete bipartite graphs.

Claesson et al. [3] presented the following formula for the boolean numbers of complete bipartite graphs using the recursive relation (1):

$$\begin{aligned} \beta (K_{n,k})=\sum _{i=0}^{n}(-1)^{n+i}i!i^k\left\{ \begin{array}{l}{n+1}\\ {i+1} \end{array}\right\} . \end{aligned}$$
(2)

However, it is not mentioned there that this number sequence is the so-called D-relatives of poly-Bernoulli numbers. The D-relatives of poly-Bernoulli numbers, \(D_{n,k}\), were introduced in [1] as the number of lonesum matrices of size \(n\times k\) without all-1 rows and all-1 columns. A matrix is called lonesum if it is uniquely reconstructible from its row sum and column sum vectors. The first few values are given in Table 1.

Table 1 D-relatives of poly-Bernoulli numbers

The interested reader finds a detailed description about the combinatorial properties of the D-relatives of poly-Bernoulli numbers such as combinatorial interpretations and different formulas in [1]. A connection that is not mentioned there is given in [9].

Here we recall the exponential generating function given by

$$\begin{aligned} \sum _{n=1}^{\infty }\sum _{k=1}^{\infty }D_{n,k}\frac{x^n}{n!}\frac{y^k}{k!}=\frac{1}{e^x+e^y-e^{x+y}}, \end{aligned}$$

and a closed formula: for \(n\ge 1\) and \(k\ge 1\)

$$\begin{aligned} D_{n,k}=\sum _{i=0}^{\min (n,k)}(i!)^2\left\{ \begin{array}{l}{n}\\ {i} \end{array}\right\} \left\{ \begin{array}{l}{k}\\ {i}\end{array}\right\} . \end{aligned}$$

It is known that \(D_{n,k}\) enumerates the acyclic orientations of the complete bipartite graph \(K_{n+1,k+1}\) with an edge \(u_0v_0\) where \(u_0\) is a unique source and \(v_0\) is a unique sink [1]. Hence, the D-relatives of poly-Bernoulli numbers are equal to the Crapo’s beta invariant of the complete bipartite graphs, i.e.

$$\begin{aligned} D_{n,k}=(-1)^{n+k}\chi '(K_{n+1,k+1};1). \end{aligned}$$

Simple calculations show that \(D_{n,k}\) is also an evaluation of the bivariate chromatic polynomial. The bivariate chromatic polynomial of the complete bipartite graph is

$$\begin{aligned} P(K_{n,k};x,y)=\sum _{m=0}^{n}\left( {\begin{array}{c}n\\ m\end{array}}\right) (x-y)^{n-m}\sum _{j=0}^{m}\left\{ \begin{array}{l}{m}\\ {j}\end{array}\right\} (y)_{j}(x-j)^k. \end{aligned}$$

Substituting \(x=0\) and \(y=-1\), we obtain the formula (2). Hence, we have

$$\begin{aligned} \beta (K_{n,k})=P(K_{n,k};0, -1)=D_{n,k}. \end{aligned}$$

We summarize these facts in the following theorem.

Theorem 2

The boolean number of the complete bipartite graph \(K_{n,k}\) is the number of acyclic orientations of \(K_{n+1,k+1}\) having a specified edge \(u_0v_0\) where \(u_0\) is a unique sink and \(v_0\) a unique source. Hence,

$$\begin{aligned} \beta (K_{n,k})&=(-1)^{n+k}\chi '(K_{n+1,k+1};1). \end{aligned}$$

In particular, we have

$$\begin{aligned} \beta (K_{n,k})&=D_{n,k}. \end{aligned}$$

3.2 Derangement Sets of Complete Bipartite Graphs and Callan Sequences

We now show how the identity \(\beta (K_{n,k})=D_{n,k}\) can be seen based on the interpretation of the boolean number as the derangement set of a graph.

We characterize the derangement set of the complete bipartite graphs, \({\mathcal {D}}(K_{n,k})\). For convenience, we “color” the labels in [n] red and the labels in \(\{n+1,\ldots , n+k\}\) blue. We refer to these elements as red elements and blue elements, respectively.

Lemma 3

A derangement \(w\in {\mathcal {D}}(K_{n,k})\) is characterized by the following two properties:

  1. (a)

    Each cycle is an alternating sequence of blocks of red elements and blocks of blue elements, always starting with a red block and ending with a blue block.

  2. (b)

    In a red block the elements are increasing and in a blue block the elements are in decreasing order.

Proof

First, we show that if \(w\in {\mathcal {D}}(K_{n,k})\), then (a) and (b) are true. The crucial observations about the algorithm are the following. The cycles of a permutation are created in the extraction step. The order of the elements in a cycle is determined in the simple contraction step. Namely, during a simple contraction step the label of the new vertex is created by gluing together the labels of the contracted vertices in a certain order (smaller label first). Two elements in a derangement can only follow each other if in any contraction step during the algorithm they are glued together. Considering these facts in the special case of a complete bipartite graph, a simple case analysis shows that only sequences with the properties (a) and (b) can arise. Let (st) denote the maximal edge of the actual graph (that is arisen in any step starting from a complete bipartite graph). Then the vertex \(x=st\) that is created by contracting the edge (st) can obtain one of the following labels.

  • If \(s=r\), i.e. s is a red vertex, and \(t=b\), i.e. t is a blue vertex, then \(st=rb\), since we always write the smaller label first.

  • If \(s=r_i\) and \(t=r_j\ldots b_j\), i.e. t has a label that starts with a red element and ends with a blue element and \(r_i<r_j\), then \(st=r_ir_j\ldots b_j\).

  • If \(s=r_i\ldots b_i\) and \(t=r_j\) and \(r_i<r_j\), then \(st=r_i\ldots b_ir_j\).

  • If \(s=r_i\ldots b_i\) and \(t=r_j\ldots b_j\), then \(st=r_i\ldots b_i r_j\ldots b_j\). It is necessary that \(r_i<r_j\), since \(s<t\) and the first element determines the order of a label in the actual graph.

  • If \(s=r_i\ldots b_i\) and \(t=b_j\), then \(st=r_i\ldots b_ib_j\). Note that \(b_i>b_j\) because the recursion is always on the maximal vertex of the actual graph, hence, it is not possible that a greater \(b_i\) is not visited yet as \(b_j\) is considered.

On the other hand, let w be a permutation with the above characterization. According to Theorem 1 it is sufficient to show that for each t \(\lambda _w(t)\) is adjacent to one of the elements of \(\rho _w(t)\). This means in our terminology to show that there is an element of \(\rho _w(t)\) colored differently than \(\lambda _w(t)\). We claim that \(\lambda _w(t)\) is always red. Assume t is red. Since the red elements in a block are in increasing order \(\lambda _w(t)=t\), if t is the least element in the block or \(\lambda _w(t)=w^{-1}(t)\) (the first (red) element to the left of t). In both cases \(\lambda _w(t)\) is red. Assume now that t is blue. Let B be the block that contains t and R the red block directly to the left of B. Since the blue elements are in decreasing order in the block there are no elements in B to the left of t that is smaller than t. Hence, the first element that is smaller than t is in R. Note that all red elements are smaller than any blue elements.

We have to show now that there is a blue element in \(\rho _w(t)\) for all t. If t itself is blue, we are done, since \(\rho _w(t)\) contains t. If t is red, let say in a block \(R_i\), then there is no smaller element in \(R_i\) to the right of t, and even not in \(B_i\), in the blue block followed directly by the red block \(R_i\). The first smaller element can be in \(R_{i+1}\) or to the left of t in \(R_i\). In both cases \(B_i\) is contained in \(\rho _{w}(t)\), so we are done. \(\square \)

Next, we recall the definition of the so-called Callan sequences that decode acyclic orientations of complete bipartite graphs in a natural way.

Definition 4

A Callan sequence \((R_1;C_1)(R_2;C_2)\ldots (R_m;C_m)\) for some \(m\in {{\mathbb {N}}}_0\) is a sequence, where \(R_1\), \(R_2\), \(\ldots \), \(R_m\) is an ordered partition of \(\{1,2,\ldots , n\}\) and \(C_1\), \(C_2\), \(\ldots \), \(C_m\) is an ordered partition of \(\{n+1,\ldots , n+k\}\).

A Callan sequence uniquely determines an acyclic orientation of \(K_{n+1,k+1}\) with an edge \(u_0v_0\) where \(u_0\) is a unique source and \(v_0\) is a unique sink as follows. Let U denote the vertex class with \(n+1\) vertices, and V the vertex class with \(k+1\) vertices. Label one vertex from U by \(u_0\) (as the unique source) and the other vertices from U by \(\{1,2,\ldots , n\}\), while one vertex from V by \(v_0\) (as the unique sink) and the other vertices by \(\{n+1, n+2,\ldots , n+k\}\). Assign the edges \((u_0,v_i)\) as \(u_0\rightarrow v_i\) for all i and the edge \((u_i,v_0)\) as \(u_i\rightarrow v_0\) for all i. Further, given the Callan sequence \((R_1;C_1)(R_2;C_2)\ldots (R_m;C_m)\), assign the edges between \(u\rightarrow v\) with \(u\in C_i\) and \(v\in R_j\) if and only if \(i\le j\).

We now describe the bijection between Callan sequences and derangements associated to \(K_{n,k}\).

Given a Callan sequence \(\sigma =(R_1;C_1)(R_2;C_2)\ldots (R_m;C_m)\), we call the pairs \((R_i,C_i)\) for \(\le i\le m\) the Callan pairs. Given a Callan pair \((R_i,C_i)\), let \(\overline{R_iC_i}\) denote the number sequence that we obtain by recording the elements of the set \(R_i\) in increasing order followed by the elements of the set \(C_i\) written in decreasing order. For example, if , then . Let \(r_i\) denote the least element of \(R_i\) and let p denote the function that maps the least of the \(r_i\)’s to 1, the second least to 2, and so on. So, \(p(r_1,r_2,\ldots , r_m)\) is a permutation of \(\{1,2,\ldots , m\}\). Write \(p(r_1,\ldots , r_m)\) in standard cycle notation. Finally, extend this permutation to a permutation of \([n+k]\) by replacing each \(r_i\) with the sequence \(\overline{R_iC_i}\). We denote this map by \(\phi \). It is clear that the so obtained permutation \(\phi (\sigma )=\pi \) has the characterization (a) and (b), hence, it is a derangement associated to \(K_{n,k}\).

The inverse of the bijection is straightforward. For the sake of completeness we describe it. Let \(\pi \in {\mathcal {D}}(K_{n,k})\) be given in standard cycle notation. Each cycle is an alternating sequence of blocks of red and blocks of blue elements, always starting with a red block and ending with a blue block. Identify the red-blue block pairs with the least element, the first red element. There is a permutation given in cycle notation of these elements. Record the red-blue block pairs in the one-line notation of the permutation of the least elements that was given in cycle notation. The result of this process is a Callan sequence.

Example 5

Let the Callan sequence be

figure c

The least red elements are: , and the corresponding permutation is \(p(2,4,1,5)=2314\); in cycle notation (123)(4). So we have

$$\begin{aligned} \phi (\sigma )=\pi =(1\;3\;10\; 2\;7\;8\;13\;11\;4\;6\;14\;9)(5\;15\;12). \end{aligned}$$

4 Ferrers Graphs

In this section we show that our bijection can be applied for the more general case of Ferrers graphs.

4.1 Previous Results

The boolean numbers of Ferrers graphs were derived in [3] using the recursion (1). Our bijection proves that the boolean number is equal to the Crapo’s beta invariant of the graph, i.e. to the number of acyclic orientations with a unique sink and a unique source in this case also.

Ferrers graphs were introduced in [5]. A Ferrers graph is the bipartite graph on the vertex partition \(U=\{u_1,\ldots , u_n\}\) and \(V=\{v_1,\ldots , v_k\}\) such that

  • if \((u_i,v_j)\) is an edge then so is \((u_p,v_q)\) for \(1\le p\le i\) and \(1\le q\le j\), and

  • \((u_1,v_k)\) and \((u_n,v_1)\) is an edge.

Given a partition \(\lambda =(\lambda _1,\lambda _2,\dots ,\lambda _k)\) where \(\lambda _1\ge \lambda _2\ge \dots \ge \lambda _k\), the Ferrers shape \(F_{\lambda }\) is an arrangement of cells justified to the left and to the top such that \(F_{\lambda }\) has k rows with \(\lambda _i\) cells in the \(i{\text {th}}\) row, from top to bottom (\(i=1,\dots ,k\)). The Ferrers shape can also be given by the sequence of down and left steps of the southeast border, i.e by a word on the alphabet \(\{d,l\}\). The Ferrers shape in Fig. 1 associated to \(\lambda = (4,3,2)\) is decoded uniquely this way by the word dldldll. To a Ferrers graph we associate the Ferrers shape where there is a cell in position (ij) if and only if \((u_i, v_j)\) is an edge in the Ferrers graph. For convenience, we will also refer to the Ferrers graph associated to the Ferrers shape as \(F_{\lambda }\) (see Fig. 1).

Fig. 1
figure 1

Ferrers shape and Ferrers graph with canonical labels

A Ferrers diagram (tableau, or 0–1-filling of a Ferrers shape) is an assignment of a 0 or a 1 to each of the cells of a Ferrers shape \(F_{\lambda }\). A Ferrers diagram is lonesum if it doesn’t contain any of the two submatrices of the flipping pair:

$$\begin{aligned} {\mathcal {F}}=\left\{ \begin{pmatrix} 1 &{} 0\\ 0 &{} 1 \end{pmatrix}, \begin{pmatrix}0 &{} 1 \\ 1 &{} 0\end{pmatrix}\right\} . \end{aligned}$$

Acyclic orientations of a Ferrers graph are in natural bijection with lonesum fillings of the Ferrers shape. Namely, the cell (ij) contains 1 if and only if \(u_i\rightarrow v_j\) and the cell (ij) contains 0 if and only if \(u_i\leftarrow v_j\). Note that in this correspondence a source is an all-1 row a sink is an all-1 column in the lonesum filling of the Ferrers shape. We now consider a Ferrers shape, \(\lambda =(\lambda _1,\lambda _2,\ldots , \lambda _n)\), extended by an extra row and extra column, \(\lambda ' =(\lambda _1+1,\lambda _1+1,\lambda _2+1,\ldots , \lambda _n+1)\). Take a lonesum filling of \(F_{\lambda '}\) in that the first row and first column is an all-1 row and an all-1 column, but all the other rows and columns contain at least one 0. It is clear, that in this way we decode an acyclic orientation of the Ferrers graph associated to the shape \(F_{\lambda '}\) with a unique sink and a unique source. In the definition of the Crapo’s beta variant the vertices that play the role of a unique source and a unique sink are important. However, it follows from the above argument that the number of fillings of the Ferrers shape \(\lambda \) with the requirement not containing any all-1 rows or columns is the same as the fillings of the Ferrers shape \(\lambda '\) where only the first row and the first column do not contain 0. In accordance, we refer to Ferrers graphs, \(F_{\lambda }\), and to the extended Ferrers graphs \(F_{\lambda '}\), where we always assume that the unique source and unique sink are the vertex associated to the first row and first column of the shape \(F_{\lambda '}\), respectively. Hence, for convenience, we focus on \(F_{\lambda }\) and when we talk about the extended Ferrers graph \(F_{\lambda }\cup {u_0,v_0}\) with a unique source and a unique sink we mean the extension in the way described above.

We label now the rows and columns on the southeast border of a Ferrers shape \(F_{\lambda }\) with the numbers \(1,2,3,\dots \) such that the top row gets label 1 and the successive border edges get the remaining numbers in order. Let \(L_r(F_{\lambda })\) denote the set of the elements associated to the row (which we will refer to as red elements), and \(L_c(F_{\lambda })\) denote the set of the elements associated to the columns (which we will refer to as blue elements). Considering the Ferrers graph, this canonical labeling means in the terminology of colors that the vertices of U are red while the vertices of V are blue. Also note that each red vertex is adjacent to each greater blue vertex and with no other vertices. In the example in Fig. 1, the canonical labeling of the Ferrers shape is and the vertex classes of the associated Ferrers graphs are labeled by and .

Definition 6

For a given Ferrers shape \(F_{\lambda }\), we call a sequence an \(F_{\lambda }\)-Callan sequence if the sequence is \((R_1,C_1),\dots ,(R_m,C_m)\) for some \(m\in {{\mathbb {N}}}_0\) such that

  • \(R_1,\dots ,R_m\) is an ordered partition of the set \(L_r(F_{\lambda })\) pairwise disjoint nonempty subsets of \(L_r(F_{\lambda })\) such that \(\cup _{i=1}^{m} R_i= L_r(F_{\lambda })\),

  • \(C_1,\dots ,C_m\) is an ordered partition of the set \(L_c(F_{\lambda })\) pairwise disjoint nonempty subsets of \(L_c(F_{\lambda })\), such that \(\cup _{i=1}^{m} C_i= L_c(F_{\lambda })\),

  • \(\max R_i < \min C_i\), for all \(i=1,\dots ,m\).

The set of \(F_{\lambda }\)-Callan sequences is denoted by \(\textsc {Callan}(F_{\lambda })\).

Note that this definition is a slight modification of the definition in [2].

4.2 Generalization of the Bijection

Our bijection proves a one-to-one correspondence between the set of \(F_{\lambda }\)-Callan sequences and the set of derangements associated to the Ferrers graph \(F_{\lambda }\). We claim this fact in the following proposition.

Proposition 7

$$\begin{aligned} |{\mathcal {D}}(F_{\lambda })|=|\textsc {Callan}(F_{\lambda })|. \end{aligned}$$

Proof

First, we observe that for characterisation of a permutation of the set \({\mathcal {D}}(F_{\lambda })\) we need to augment the two properties (a) and (b) of Lemma 3 with the following property:

  • (c) a red sequence can only be followed by a blue sequence of greater elements.

This is because during a simple contraction step an existing edge of the graph is contracted, and in the case of the Ferrers graph \(F_{\lambda }\) edges are only between red and blue vertices such that the label of the red vertex is smaller than the label of the blue vertex. All the other considerations and the case analysis are the same as in the proof of Lemma 3.

Let now \(\sigma \) be a \(F_{\lambda }\)-Callan sequence, \(\sigma \in \textsc {Callan}(F_{\lambda })\). We show that \(w=\phi (\sigma )\) is in the set of associated derangements, \(w\in {\mathcal {D}}(F_{\lambda })\). We use again Theorem 1, and show that for each t, \(\lambda _w(t)\) is adjacent to one of the element of \(\rho _w(t)\).

Assume first that t is blue, i.e. \(t\in C_i\) for some i. Since the elements are arranged in decreasing order, the first element that can be smaller than t to the left of t is red. Moreover, \(\lambda _w(t)=\max R_i\). Since \(t\in \rho _w(t)\) and \(\lambda _w(t)<t\) is a red element, t and \(\lambda _w(t)\) are adjacent.

Assume now that t is red, i.e. \(t \in R_i\) for some i. Then t is the least in the cycle (\(t=\lambda _w(t)\)) or there is a smaller red element to the left of t, since red elements are in increasing order. We claim that \(\rho _w(t)\) contains all the elements in \(C_i\). Namely, in order to find the first smaller element to the right of t we have to “pass" the elements \(C_i\), since the elements of \(R_i\) to the right of t are greater than t and so are all elements in \(C_i\) because \(\max R_i<\min C_i\). The red element \(t\in R_i\) is adjacent to all \(C_i\), so we are done. \(\square \)

Example 8

Let \(F_{\lambda }\) be the Ferrers shape with border ddlddldllldlddll and the \(F_{\lambda }\)-Callan sequence

figure h

Then the smallest red elements are and \(p(5,11,1,2)=3412=(13)(24)\). Hence, we have

$$\begin{aligned} \phi (\sigma )=\pi =(1\,4\;7\;10\;9\;5\;12\;8\;6)(2\;13\;15\;3\;11\;14\;16). \end{aligned}$$

In [2] a bijection is presented between \(F_{\lambda }\)-Callan sequences and lonesum Ferrers diagrams which can be easily turned to a bijection between acyclic orientations with an edge \(u_0v_0\) where \(u_0\) is a unique source and \(v_0\) is a unique sink and \(F_{\lambda }\)-Callan sequences. Proposition 7 together with previous results [2, 12] implies the following theorem.

Theorem 9

The boolean number of the Ferrers graphs \(F_{\lambda }\) is the number of acyclic orientations of the extended graph \(F_{\lambda }\cup \{u_0,v_0\}\) with a unique source \(u_0\) and a unique sink \(v_0\). In particular, the boolean number of \(F_{\lambda }\) is equal to the Crapo’s beta invariant of \(F_{\lambda }\cup \{u_0,v_0\}\).

The special case for the Ferrers graphs with staircase shapes, \(F_{\triangle }\), is an immediate corollary. (A staircase shape is the Ferrers shape with \(\lambda _1=n\), \(\lambda _2=n-1\), \(\ldots \), \(\lambda _n=1\).)

Corollary 10

Let \(F_{\triangle }\) denote the Ferrers graph with staircase shape. The boolean number of \(F_{\triangle }\) is the number of acyclic orientations of \(F_{\triangle }\cup \{u_0,v_0\}\) with the unique source \(u_0\) and unique sink \(v_0\), and the number of the lonesum fillings of the staircase shape \(\triangle \) without any all-1 columns and all-1 row, i.e. the median Genocchi number.

Proof

The bijections in this special case can be find explicitly in [2]. \(\square \)