Keywords

1 Introduction

A hypergraph \(\mathcal{H}\) is defined as a couple \((Vert,\mathcal{E})\), where Vert is a finite set of vertices \(v_1,\dots ,v_n\), and \(\mathcal{E}\subset 2^{\vert Vert \vert }\setminus \emptyset \) is a set of hyperedges, i.e. subsets of Vert. The notion of hypergraph naturally extends that of graph, where the edges are restricted to only couples of vertices (see [2] for preliminary notions and results on hypergraphs). In this paper, we consider simple hypergraphs, i.e. hypergraphs that are loopless and with distinct hyperedges. The degree of a vertex \(v\in Vert\) is the number of hyperedges that contain v. A hypergraph is said to be h-uniform (simply h-graph), if every hyperedge has cardinality h.

A fundamental and widely investigated notion related both to graph and to hypergraph is that of degree sequence, that is the list of its vertex degrees, usually written in non-increasing order, as \(d=(d_1,d_2,\ldots ,d_n)\), with \(d_1\ge d_2\ge \cdots \ge d_n\), and n being the cardinality of Vert.

The problem of characterizing the degree sequences for simple graphs, say graphic sequences, was solved by Erdős and Gallai (see [1, 6]):

Theorem 1

(Erdős, Gallai). A sequence \(d=(d_1,d_2,\ldots ,d_n)\) where \(d_1\ge d_2\ge \cdots \ge d_n\) is graphic if and only if \(\varSigma _{i=1}^nd_i\) is even and

$$\begin{aligned} {\sum _{i=1}^k d_i \le k(k-1)+\sum _{i=k+1}^n \min \{k,d_i\}, 1\le k\le n.} \end{aligned}$$

Then, other characterizations appeared in the literature: in [9], seven of them are listed and they are proved to be equivalent, one of them leading to a constructive proof of the Erdős-Gallai Theorem.

On the other hand, the problem of the characterization of the degree sequences of h-uniform hypergraphs (say h-graphic sequences) is one of the most challenging among the unsolved problems in the theory of hypergraphs even for the simplest case of \(h=3\).

In [5], Dewdney proposes the following theorem as a non-constructive characterization of an h-uniform degree sequences based on the possibility of splitting a uniform hypergraph into two uniform parts, one of them (eventually void) of smaller degree:

Theorem 2

(Dewdney). Let \(\pi = (d_1,\dots ,d_n)\) be a non-increasing sequence of non-negative integers. \(\pi \) is h-graphic if and only if there exists a non-increasing sequence \(\pi ' = (d_2',\dots ,d_n')\) of non-negative integers such that

  1. 1.

    \(\pi '\) is \((h-1)\)-graphic,

  2. 2.

    \(\sum _{i=2}^{n} d_i' = (h-1)d_1\), and

  3. 3.

    \(\pi '' = (d_2-d_2',\dots ,d_n-d_n')\) is h-graphic.

The underlying idea in the characterization rests on the possibility of splitting an h-uniform hypergraph H into two parts: for each vertex v, the first one consists of the hypergraph obtained from H after deleting all the hyperedges not containing v, and then removing, from all the remaining hyperedges, the vertex v; this hypergraph is identified in the literature with \(L_H(v)\), say the link of v, and its degree sequence the link sequence of v. The second hypergraph \(H_v^-\), say the residual of v, is obtained from H after removing all hyperedges containing v. It is clear that H can be obtained from \(L_H(v)\) and \(H_v^-\); furthermore one can notice that \(L_H(v)\) is \((h-1)\)-uniform, while \(H^-_v\) preserves the h-uniformity.

Such a recursive decomposition of a uniform hypergraph into smaller parts stops when each of them either is 2-uniform, or has only one single hyperedge: in both cases the hypergraphs that realize the sequence can be efficiently reconstructed. Finally, we proceed in merging the obtained hypergraph: let \(\pi ' = (d_2',\dots ,d_n')\) be \((h-1)\)-graphic and \(\pi '' = (d_2'',\dots ,d_n'')\) be h-graphic, and let \(H'=(Vert', \mathcal{E'})\) and \(H''=(Vert'', \mathcal{E''})\) be the related hypergraphs, respectively. \(H'\) and \(H''\) can be merged into the hypergraph \(H=(Vert, \mathcal{E})\) whose degree sequence is \(\pi =(\frac{|\mathcal{E}|}{h-1}, d_1'+d_1'',\dots ,d_n'+d_n'')\), as follows: identify the sets \(Vert'\) and \(Vert''\)

  • \(Vert=Vert' \cup \{v\}\), v being a new vertex not in Vert,

  • \(\mathcal{E}=\mathcal{E'}_v\cup \mathcal{E''} \) being \(\mathcal{E'}_v\) the set of hyperedges obtained adding to each element of \(\mathcal{E'}\) the vertex v.

It is straightforward that \(\mathcal{E}\) is h-uniform and it has \(\pi \) as degree sequence.

We point out that the process to split the degree sequence \(\pi \) cannot be efficiently performed, since one has to test, in general, a non-polynomial number of couple of sequences \(\pi '\) and \(\pi ''\).

So, gaining the efficiency in this step, will guarantee efficiency to the whole process, making a valuable step towards the general problem of the characterization of the degree sequences of hypergraphs. Surprisingly, many necessary conditions have been provided for a sequence to be h-uniform, most of them generalize the Erdős and Gallai Theorem, or rely on two well known theorems by Havel and Hakimi [13, 14], on the other hand, few necessary ones are present. Recently, one of this latter, provided in [10], exploits Dewdney’s Theorem to set a lower bound on the length of a sequence in order to be h-uniform, according to its maximum value and to the span of its elements, where span of a sequence means the maximum difference between its elements. The present paper describes and extends this result using a different perspective, providing a polynomial time strategy to determine one of the hypergraphs of the related instances. The Discrete Tomography framework we are going to consider, has valuable mathematical and statistical tools to challenge inverse problems in the form of reconstructions of discrete objects modeled as integer matrices, from the knowledge of their row and column sums, say horizontal and vertical projections. The paper is organized as follows: in Sect. 2 we introduce the main definitions and we recall some results about h-uniform degree sequences. Furthermore, after translating the h-uniformity problem in the Discrete Tomography framework, we sketch an already known hypergraph reconstruction strategy. In Sect. 3, we extend this strategy to a set of instances including those introduced in [10], and so providing for them an effective proof. Finally, in Sect. 4, we discuss future possible developments of our strategy, and we present some related open problems.

2 Definitions and Known Results

Here, we recall a sufficient condition, provided in [10], for a sequence to be h-uniform, together with an extension as corollary. This condition turns out to be non efficient in the sense that a non-polynomial number of cases has to be considered in order to test the h-uniformity. Then, we move to the Discrete Tomography environment, where we show how to embed the h-uniformity problem. A recent strategy described in [11] allows to efficiently reconstruct one of the h-uniform hypergraphs compatible with a given constant degree sequence. After recalling this result, we show how to adapt it to comprehend near-regular sequences.

2.1 A Sufficient Condition for a Sequence to be h-Graphic

A characterization of the degree sequences of simple hypergraphs is a challenging task. As a first step, we consider the subset of hypergraphs having h-uniformity, i.e. those hypergraphs whose hyperedges have the same cardinality h.

The following sufficient condition for a sequence \(\pi \) to be h-graphic is provided in [10] and it relies on Theorem 2; when \(h=2\), it turns out to be a simple consequence of the Erdős-Gallai Theorem for graphs. Let \(\sigma (\pi )\) indicate the sum of the elements of \(\pi \).

Theorem 3

  Let \(\pi \) be a non-increasing sequence of length n with maximum entry \(\varDelta \) and t entries that are at least \(\varDelta -1\). If h divides \(\sigma (\pi )\) and

$$\begin{aligned} {\left( {\begin{array}{c}t-1\\ h-1\end{array}}\right) } \ge \varDelta \end{aligned}$$
(1)

then \(\pi \) is h-graphic.

It is useful to sketch the proof of this theorem in order to underline the connection with Theorem 2 and, as a consequence, the non-efficiency of the process.

The h-graphicality of a sequence \(\pi =(d_0,\dots ,d_{n-1})\) is tested after recursively split it into a series of link and residual sequences as follows: let \(0\le i \le \varDelta -1\),

$$ s_i=\sum _{j=1}^{n-1} max \{0, d_j-i\} - (h-1) \varDelta \,\,\, \text{ and } \,\,\, c=max \{ i : s_i \ge 0 \} . $$

The link sequence of \(\pi \) is defined as the sequence \(L=(l_1,\dots ,l_{n-1})\) where, for \(1\le i \le n-1\),

$$\begin{aligned} l_i= {\left\{ \begin{array}{ll} d_i-c-1 &{} \text { if } 1\le i \le s_c, \\ d_i-c &{} \text { otherwise. } \end{array}\right. } \end{aligned}$$
(2)

Finally, the residual sequence is defined as the sequence \(R=(r_1,\dots ,r_{n-1})\), with \(r_i=d_i-l_i\), for \(1\le i \le n-1\). The proof proceeds by showing that the two sequences already defined are \(h-1\) and h uniform, respectively. The proof completes after noticing that a sequence of the form \(\pi '=(1^{mh},0^{n-mh})\) is h-graphic since it is realized by a hypergraph on n vertices having m disjoint hyperedges.

Corollary 1

Let \(\pi \) be a non-increasing sequence with maximum entry \(\varDelta \), and let p be the minimum integer such that \(\varDelta \le \left( {\begin{array}{c}p-1\\ h-1\end{array}}\right) \). If h divides \(\sigma (\pi )\) and \(\sigma (\pi ) \ge (\varDelta -1)p+1\), then \(\pi \) is h-graphic.

The corollary allows to drop the near-regularity condition on the first part of the sequence, replacing it with a sufficiently large sum of the sequence.

In the sequel, we will show how one can have a better grasp on both these results once translated into the Discrete Tomography environment. Furthermore, this translation allows to use its mathematical tools to enlarge the set of sequences that can be tested be h-graphic.

2.2 Translating h-Graphicality into the Discrete Tomography Environment

The problem of checking the h-graphicality of a non-increasing integer sequence \(\pi \) has been related to a class of problems that are of great relevance in the field of Discrete Tomography. More precisely the aim of Discrete Tomography is the retrieval of geometrical information about a physical structure, regarded as a finite set of points in the integer lattice, from measurements, known as projections, of the number of atoms in the structure that lie on parallel lines with fixed scopes. A common simplification is to represent a finite physical structure as a binary matrix, where an entry is 1 or 0 according to the presence or absence of an atom in the structure at the corresponding point of the lattice. One of the challenging problems in the field is then to reconstruct the structure, or, at least, to detect some of its geometrical properties from a small number of projections. One can refer to the books of G.T. Herman and A. Kuba [7, 8] for further information on the theory, algorithms and applications of this classical problem in Discrete Tomography.

So, let \(A=(a_{i,j})\) be an \(m \times n\) binary matrix; we define two vectors \(H=(h_1,\dots ,h_m)\), and \(V=(v_1,\dots ,v_n)\) called the horizontal and vertical projections of A, respectively, such that

$$ \sum _{j=1}^na_{i,j}=h_i \text{ and } \sum _{i=1}^ma_{i,j}=v_j \text{ with } 1\le i\le m, 1\le j\le n. $$

Seminal results show that the characterization, and the reconstruction of A from its two projections H and V, can be done in polynomial time; see [7] for a survey. Furthermore, in [7, 8] there are applications in Discrete Tomography requiring additional constraints.

As shown in [1], Chapters 14 and 15, this problem is equivalent to the reconstruction of a bipartite graph \(G=(H,V,E)\) from its degree sequences \(H=(h_1,\ldots ,h_m)\) and \(V=(v_1,\ldots ,v_n)\).

So, in this context, the problem of the characterization of the degree sequence \((d_1,d_2,\ldots ,d_n)\) of an h-uniform hypergraph \(\mathcal H\) (without parallel edges) asks whether there is a binary matrix A with non-negative projection vectors \(H=(h,h,\ldots ,h)\) and \(V=(d_1,d_2,\ldots ,d_n)\) with distinct rows, i.e., A is the incidence matrix of \(\mathcal H\) where rows and columns correspond to hyperedges and vertices, respectively, so that the element \(a_{i,j}\) has value 1 if and only if the i-th hyperedge contains the j-th vertex. We indicate with \(\mathcal E\) the class of such matrices.

In [11], the authors consider the case of h-uniform hypergraphs that are also d-regular, i.e., each vertex has the same degree. This reflects on the vertical projection V of the related matrix by setting all its values to d.

The authors start from the following two trivial conditions that are necessary for the existence of an \(m \times n\) matrix consistent with two vectors \(H=(h_1,\dots ,h_m)\) and \(V=(v_1,\dots ,v_n)\) of projections:

  • Condition 1: for each \(1\le i \le m\) and \(1\le j \le n\), it holds \(h_i \le n\) and \(v_j\le m\);

  • Condition 2: the sums of the entries of the horizontal and the vertical projections are equal, i.e., \(\sum _{i=1}^m h_i = \sum _{j=1}^n v_j,\)

and then they add a third one that is trivially necessary and that determines the existence of an element of \(\mathcal E\) having projections \(H=(h,\dots ,h)\) and \(V=(d, \dots , d)\):

  • Condition 3: the following inequality holds:

    $$d\le {\frac{h}{n}} \cdot {{n}\atopwithdelims (){h}}.$$

Condition 3 can be rephrased, in our setting, as follows: there does not exist a matrix in \(\mathcal E\) having \(H=(h,\ldots ,h)\) and \(V=(d,\ldots ,d)\) as projections, and more than \({n}\atopwithdelims (){h}\) different rows, otherwise at least two of them have to be equal.

The characterization is obtained by showing that the three conditions are also sufficient: the authors define an efficient procedure that reconstructs an element A of \(\mathcal E\) from its constant projections H and V, and that uses properties of combinatorics of words; we indicate this procedure by \(REC(H,V,\mathcal{E})\). In particular, if we consider each row of the \(m \times n\) output matrix A as a binary word, then the procedure REC inserts, inside A, a submatrix \(A'\) of dimension \(m' \times n\) having the minimal admissible constant vector of vertical projections and whose rows are all the possible cyclic h-shifts of the word \(u=(1)^h,(0)^{n-h}\). Here, the power notation \((x)^y\) indicates the repetition of the symbol x for y times, and the cyclic h-shift operator is defined on a generic word \(w=w_1,\dots ,w_n\) as the operator \(s(w)^h=w_{n-h+1},\dots ,w_{n},w_1,\dots ,w_{n-h}\). Simple computations leads to the fact that \(m'=n / g.c.d.\{h,n\}\), and the vertical projections of \(A'\) have constant value \(v= h / g.c.d.\{h,n\}\). The computational complexity of the reconstruction process can be obtained by observing that a CAT algorithm has been defined in [16] to generate Lyndon words of length n and given density h, and that the number of required Lyndon words is O(m). Furthermore, for each Lyndon word, we require to generate the related necklace, so the total computational complexity turns out to be \(O(h\cdot n^2 \cdot m^2)\).

3 A Constructive Proof of Theorem 3

Now, we present a variant of the procedure REC that includes near-regular instances, and that will be used to provide a constructive proof of Theorem 3 and Corollary 1. Such approach will allow to enlarge the set of degree sequences that can be proved to be h-graphic.

3.1 A Procedure to Reconstruct Near d-Regular, h-Uniform Hypergraphs

Let us characterize the degree sequences of h-uniform hypergraphs that are near d-regular, i.e., whose hyperedges have cardinality d or \(d-1\); we indicate the related set of binary matrices (having no equal rows, and horizontal and vertical projections \(H=(h,\dots ,h)\) and \(V=(d,\dots ,d,d-1,\dots ,d-1)\), respectively) with \(\mathcal {E}_1\).

In [3], it has been proved that for these projections H and V, Conditions 1 and 2 are sufficient to ensure the existence of a compatible matrix. Adding Condition 3 and extending REC to REC1, we characterize the elements of \(\mathcal {E}_1\). We sketch the procedure REC1: let \(H=(h, \ldots ,h)\) of length m, and \(V=(d, \ldots ,d,d-1,\dots , d-1)\) of length n, be two vectors of projections satisfying Conditions 1, 2, and 3:

  • Step 1: compute the constant vectors of projection \(H'\) and \(V'\) such that \(H'=(h,\dots ,h)\) has length \(m' = k/h > m\), and \(V'=(v',\dots ,v')\), of length n and \(v'=k/n\), with k being the least integer such that it is both multiple of h and n, and greater than \(h \cdot m\).

  • Step 2: run \(REC(H',V',\mathcal{E})\), and let A be its output. Detect the submatrix \(A'\) of A whose rows are the successive h-shifts of \((1)^h(0)^{n-h}\), as defined in the previous section. Delete in A, one by one, these rows according to the order provided by the successive application of the h-shifts, till reaching the desired near-regular projections V. Give A as output.

The details of the algorithm together with the proof of its correctness can be found in [12]; its computational complexity is the same as REC procedure. In Fig. 1, (b), there is an example of the reconstruction of an element of \(\mathcal {E}_1\) representing a 3-uniform hypergraph having near regular degree sequence \(V=(2,2,2,2,2,1,1)\).

3.2 Reconstructing an h-Uniform Hypergraph Whose Degree Sequence Satisfies Inequality (1)

Let us consider a non-decreasing sequence of integers \(\pi \) that satisfies inequality (1); we show how to reconstruct an h-uniform hypergraph represented by an \(m\times n\) matrix A, whose degree sequence is \(\pi \).

The strategy, say REC-Link, adds efficiency to the steps in the proof of Theorem 3, and acts on each link sequence to reconstruct the related part of A from its horizontal and vertical projections. Two lemmas are needed:

Lemma 1

Let \(L=(l_1,\dots , l_{t+1})\) be a link sequence, computed as in Theorem 3. It holds that

$$ l_{t+1} \le {{t}\atopwithdelims (){h-2}}. $$

Proof

Let us compute an upper bound to \(l_{t+1}\): since \(\sigma (L)=\varDelta \cdot (h-1)\), then we have \(\varDelta \cdot (h-1) \le {{t}\atopwithdelims (){h-1}} \cdot (h-1)\). An upper bound of \(l_{t+1}\) can be set to \({{t}\atopwithdelims (){h-1}} \cdot \frac{(h-1)}{t+1}\) since L is non-increasing. The computation of the binomial coefficients leads to the thesis.    \(\square \)

In words, Lemma 1 states that the elements 1 in column \(t+1\) of matrix \(A_L\) are not too many, in particular they allow different configurations of the remaining \(h-2\) entries 1 from column 1 to t. Note that this inequality resembles that of Condition 3.

Remark 1

Let M be a matrix having different rows. Each permutation of its columns preserves the difference of the rows.

So, starting from \(\pi =(d_0,\dots ,d_{n-1})\), let \(\varDelta \) be its maximum element and t be the entries that are at least \(\varDelta -1\), as in Theorem 3. We compute the link sequence \(L=(l_1,\dots ,l_{n-1})\) and define REC-Link as follows

REC-Link

  • Input: \(H=(h-1,\dots ,h-1)\) of length \(\varDelta \), and \(V=L\);

  • Output: the \(\varDelta \times (n-1)\) matrix \(A_L\) compatible with H and V.

  • Step 1: if \(t=n-1\), then REC1 on input (HV) reconstructs \(A_L\) and provides it as output.

  • Step 2: if \(t<n-1\), then

    • Step 2.1: place the elements 1 in \(A_L\) from column \(t+1\) to n as follows: let \(j=0\); for each \(t+1 \le i \le n\) place \(l_i\) elements 1 in column i, from position j to \(j+l_i-1 \mod (\varDelta )\) and update \(j=j+l_i \mod (\varDelta )\).

    • Step 2.2: divide \(A_L\) into \(A_1,\dots , A_k\) blocks of consecutive rows according to their different configurations; by Step 2.1, all equal rows are grouped in the same block. Let \(h_i\) be the number of 1s that lie in each row of \(A_i\), and \(r_i\) the number of its rows. For each block \(A_i\) run REC1 on input \((H_i,V_i)\), with \(H_i=(h-1-h_i,\dots , h-1-h_i)\) of length \(r_i\), and \(V_i\) being the near-regular vector such that \(\sigma (V_i)=r_i \cdot (h-1-h_i)\), i.e. the near-regular vector compatible with \(H_i\).

    • Step 2.3: update in \(A_L\) the first t columns of each \(A_i\) with the matrix obtained as output from REC1 on the related instance, after rearranging the first t columns of each block in order to let them sum up to the near-regular vertical projections \(l_1,\dots , l_t\).

The correctness of Steps 2.1 and 2.3 directly follows from Lemma 1 and Remark 1, respectively, and its computational complexity is inherited from REC. Each matrix obtained from a link sequence by procedure REC-Link becomes part of the final matrix A, according to the proof of Theorem 3, after appending as first column a full sequence of entries 1 of length \(\varDelta \). The following example clarifies the reconstruction:

Example 1

Let us consider \(\pi =(14,14,14,14,13,13,13,13,12,12,12,11,11,4)\), and check if it is 5-graphic. We compute the link sequence according to the parameters \(t=8\), \(\varDelta = 14\), and \(34 \times 14\) being the dimension of A. The conditions of Theorem 3 are satisfied, since 5 divides \(\sigma (\pi )=170\), and \({\left( {\begin{array}{c}t-1\\ h-1\end{array}}\right) } \ge \varDelta \) holds since \(35 \ge 14\). The link sequence turns out to be \(L=(6,6,6,5,5,5,5,4,4,4,3,3,0)\), with \(c=8\). The link sequence satisfies the equation \(\sigma (L)=\varDelta (h-1)=14 \cdot 4 = 56\).

Let us run REC-Link on \(H=(4,\dots ,4)\) of dimension 14, and \(V=L\). Since \(t<n-1\), then Step 2 starts: Step 2.1 place the 1s in the columns from 8 to 13 as in Fig. 1(a), and the blocks \(B_1, \dots B_5\) are detected according to Step 2.2. Step 2.3 proceeds in their reconstruction using REC1. Figure 1(b) shows how REC1 acts on \(B_3\), one of the blocks having maximum number of rows. Lemma 1 assures that the instance \((H_3,V_3)\) with \(H_3=(3,3,3,3)\) and \(V_3=(2,2,2,2,2,1,1)\) can be reconstructed by REC1, since \({\left( {\begin{array}{c}7\\ 3\end{array}}\right) } \ge 4\).

Fig. 1.
figure 1

(a): the link sequence L computed from \(\pi \) of Example 1, and the related matrix \(A_L\) to be reconstructed. (b): a call of REC1 on the near-regular instance \((H_3,V_3)\). The procedure at first computes and reconstructs the matrix satisfying the minimal regular instance containing \(V_3\), then cuts off, one after the other, those rows that are consecutive 3-shifts of \((1)^3(0)^4\) till reaching the near-regular vertical projection \(V_3\). The darkest part of (b) is what remains. (c): all the blocks are reconstructed and their columns arranged in order to sum up to the near-regular sequence \((l_1,\dots l_t)=(6,6,6,5,5,5,5)\). A first column of 1 entries is appended and the first \(\varDelta \) different rows of A are reconstructed.

4 Conclusions and Open Problems

In this article, we consider a sufficient condition for an integer sequence \(\pi \) to be h-graphic, i.e. to be the degree sequence of an h-uniform hypergraph, as stated in Theorem 3, from [10]. Such a result is here approached from a different perspective, and translated into the Discrete Tomography framework where its specific tools are used to provide an effective proof. The obtained construction allows to forecast new results that constructively relax the constraint for h-graphicality stated in Theorem 3. Furthermore, this new perspective yields further challenging problems as sketched below.

First, it seems appropriate to approach the still unsolved problem of characterizing the degree sequences of 3-uniform hypergraphs. Some NP-completeness results are present in the literature mainly concerning their characterization from sets of subsumed graphs (see [4]), but they do not shed light on the general problem.

Still concerning 3-uniform hypergraphs, in [15], the authors focus on edge exchanges in order to determine how to pass from one hypergraph to another satisfying the same degree sequence. One can observe that the edge exchange has a natural counterpart in Discrete Tomography with the well known notion of switching, i.e. the changes of the values of a matrix in specific subsets of its elements that preserves the projections. It would be of some interest to develop a switching theory that also preserves the mutual difference between rows by relying on the properties of edge exchanges.