# An efficient algorithm to test forcibly-connectedness of graphical degree sequences

We present an algorithm to test whether a given graphical degree sequence is forcibly connected or not and prove its correctness. We also outline the extensions of the algorithm to test whether a given graphical degree sequence is forcibly k-connected or not for every fixed k> 2. We show through experimental evaluations that the algorithm is efficient on average, though its worst case run time is probably exponential. We also adapt Ruskey et al's classic algorithm to enumerate zero-free graphical degree sequences of length n and Barnes and Savage's classic algorithm to enumerate graphical partitions of even integer n by incorporating our testing algorithm into theirs and then obtain some enumerative results about forcibly connected graphical degree sequences of given length n and forcibly connected graphical partitions of given even integer n. Based on these enumerative results we make some conjectures such as: when n is large, (1) almost all zero-free graphical degree sequences of length n are forcibly connected; (2) almost none of the graphical partitions of even n are forcibly connected.

There are no comments yet.

## Authors

• 69 publications
• ### An Efficient Algorithm to Test Potentially Bipartiteness of Graphical Degree Sequences

As a partial answer to a question of Rao, a deterministic and customizab...
08/19/2019 ∙ by Kai Wang, et al. ∙ 0

• ### Reconfiguration of Connected Graph Partitions

Motivated by recent computational models for redistricting and detection...
02/27/2019 ∙ by Hugo A. Akitaya, et al. ∙ 0

• ### Short Cycles via Low-Diameter Decompositions

We present improved algorithms for short cycle decomposition of a graph....
10/11/2018 ∙ by Yang P. Liu, et al. ∙ 0

• ### Construction of Simplicial Complexes with Prescribed Degree-Size Sequences

We study the realizability of simplicial complexes with a given pair of ...
06/01/2021 ∙ by Tzu-Chi Yen, et al. ∙ 0

• ### Efficient constructions of the Prefer-same and Prefer-opposite de Bruijn sequences

The greedy Prefer-same de Bruijn sequence construction was first present...
10/15/2020 ∙ by Evan Sala, et al. ∙ 0

• ### Finding linearly generated subsequences

We develop a new algorithm to compute determinants of all possible Hanke...
03/05/2020 ∙ by Claude Gravel, et al. ∙ 0

• ### Efficient Computation of Sequence Mappability

Sequence mappability is an important task in genome re-sequencing. In th...
07/31/2018 ∙ by Mai Alzamel, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

A graphical degree sequence of finite length is a non-increasing sequence of non-negative integers such that it is the vertex degree sequence of some simple graph (i.e. a finite undirected graph without loops or multiple edges). Given an arbitrary non-increasing sequence of non-negative integers , it is easy to test whether it is a graphical degree sequence by using the Erdős-Gallai criterion [7] or the Havel-Hakimi algorithm [11, 9]. Seven equivalent criteria to characterize graphical degree sequences are summarized by Sierksma and Hoogeveen [19]. The notion of partition of an integer is well known in number theory, and is defined to be a non-increasing sequence of positive integers whose sum is the given integer. An integer partition is called a graphical partition if it is the vertex degree sequence of some simple graph. Essentially a zero-free graphical degree sequence and a graphical partition are the same thing.

It is often interesting to observe the properties of all the graphs having the same vertex degree sequence. A graph with degree sequence is called a realization of . Let P be any property of graphs (e.g. being bipartite, connected, planar, triangle-free, Hamiltonian, etc). A degree sequence is called potentially P-graphic if it has at least one realization having the property P and forcibly P-graphic if all its realizations have the property P [15]. In this paper we only consider the property of -connectedness ( is fixed). Wang and Cleitman [20] give a simple characterization of potentially -connected graphical degree sequences of length , through which we can easily test whether a given graphical degree sequence is potentially connected. However, to the best of our knowledge no simple characterization of forcibly -connected graphical degree sequences has been found so far and no algorithm has been published to test whether a given graphical degree sequence is forcibly connected or forcibly -connected with given . Some sufficient (but unnecessary) conditions are known for a graphical degree sequence to be forcibly connected or forcibly -connected [5, 3, 6].

In the rest of this paper we will present a straight-forward algorithm to characterize forcibly connected graphical degree sequences and outline the extensions of the algorithm to test forcibly -connectedness of graphical degree sequences for fixed . We will demonstrate the efficiency of the algorithm through some computational experiments and then present some enumerative results regarding forcibly connected graphical degree sequences of given length and forcibly connected graphical partitions of given even integer . Base on the observations on these available enumerative results we make some conjectures about the relative asymptotic behavior of considered functions and the unimodality of certain associated integer sequences.

## 2 The testing algorithm

### 2.1 Preliminaries

Based on a result of Wang and Cleitman [20], a graphical degree sequence is potentially -connected if and only if and . Taking , we get that a zero-free graphical degree sequence is potentially connected if and only if .

Note that any graphical degree sequence with a 0 in it can be neither potentially nor forcibly connected. We will design an algorithm to test whether a zero-free graphical degree sequence is forcibly connected based on the simple observation that is forcibly connected if and only if it is not potentially disconnected, i.e., it does not have any disconnected realization. Equivalently we need to test whether can be decomposed into two sub graphical degree sequences. For example, 3,3,3,3,2,2,2 is a potentially connected graphical degree sequence of length 7. It is not forcibly connected since it can be decomposed into two sub graphical degree sequences 3,3,3,3 and 2,2,2. Note also that when a graphical degree sequence can be decomposed into two sub graphical degree sequences, the terms in each sub sequence need not be consecutive in the original sequence. For example, the graphical degree sequence 4,4,3,3,3,2,2,2,1 can be decomposed into two sub graphical degree sequences 4,4,3,3,3,1 and 2,2,2 or into 4,4,3,3,2 and 3,2,2,1. We say that the graphical degree sequence 3,3,3,3,2,2,2 has a natural decomposition because it has a decomposition in which the terms in each sub sequence are consecutive in the original sequence. The graphical degree sequence 4,4,3,3,3,2,2,2,1 is not forcibly connected but does not have a natural decomposition. On the other hand, the graphical degree sequence 6,6,6,5,5,5,5,4,4 is forcibly connected since there is no way to decompose it into two sub graphical degree sequences.

### 2.2 Pseudo-code and the proof of its correctness

In this section we will present the pseudo-code of our Algorithm 1 to test forcibly-connectedness of a given zero-free graphical degree sequence. We then give a proof why it correctly identifies such graphical degree sequences.

We assume the input is a zero-free graphical degree sequence already sorted in non-increasing order. In case an input that does not satisfy this condition is given, we can still easily test whether it is graphical by the Erdős-Gallai criterion [7] or the Havel-Hakimi algorithm [11, 9]. The output will be True if the input is forcibly connected and False otherwise. The output can also include a way to decompose the input in case it is not forcibly connected and such a decomposition is desired.

Now we show why Algorithm 1 correctly identifies whether is forcibly connected or not. The conditional test on line 1 works as follows.

• If , then in any realization of the vertex with degree will be in a connected component with at least vertices, leaving at most 1 vertex to be in any other connected component should the input be non forcibly connected. However, a graph with a single vertex has the degree sequence 0, which contradicts the assumption that is zero-free. Thus in this case must be forcibly connected.

• If , then the vertex with degree will be in a connected component with at least vertices. Should the input be non forcibly connected, there will be another connected component not containing and also having at least vertices since each vertex in that connected component has degree at least . This will result in a realization with at least vertices, a contradiction. Thus in this case must also be forcibly connected.

The conditional test on line 3 works as follows. Let .

• If

is odd, then

must be even since the degree sum of a graphical degree sequence must be even. When we reach line 3, we must have . Now can be decomposed into two sub graphical degree sequences of length and respectively since . Thus it is not forcibly connected.

• If is even, we consider two cases.

Case (A): is even, i.e. mod 4. In this case can be decomposed into two graphical degree sequences of length since . Thus it is not forcibly connected.

Case (B): is odd, i.e. mod 4. Further consider two sub cases. (B1): if is odd, then can be decomposed into two graphical degree sequences of length and respectively since as a result of and being both odd and . (B2): if is even, then can be decomposed into two graphical degree sequences of length since . Thus in this case is not forcibly connected.

Lines 5 to 7 try to find if can be decomposed into two sub graphical degree sequences such that each sub sequence contains terms consecutive in the original sequence , i.e. if the input has a natural decomposition. For each given , the two sub sequences and can be tested whether they are graphical by utilizing a linear time algorithm [12] that is equivalent to the Erdős-Gallai criterion. The smallest that need to be tested is since can only be in a graphical degree sequence of length at least and has length . The largest that need to be tested is at most since can only be in a graphical degree sequence of length at least and has length . Actually the upper bound of the tested can be chosen to be at most the largest such that since can only be in a graphical degree sequence of length at least . Let be the largest integer that satisfies this inequality. Note since satisfies the inequality at the point of line 5. Also note that because if then , which leads to , a contradiction. Therefore the upper bound of tested is chosen to be . Additional data structures can be maintained to skip the tests of those for which each of the two sub sequences and has odd sum. Clearly a necessary condition for the input to have a natural decomposition is . A weaker necessary condition easier to check is , i.e. .

The for loop starting from line 8 is to test whether the input can be decomposed into two sub graphical degree sequences of length and respectively, whether the decomposition is natural or not. At first glance we need to test the range of in since the shortest zero-free graphical degree sequence has length 2. By symmetry we do not need to test those beyond . Actually we only need to test the range of from to . We can start the loop with since, should the input be decomposable, must be in a sub graphical degree sequence of length at least and the other sub graphical degree sequence not containing must also be of length at least due to all its terms being at least . There is no need to test those since, should the input be decomposable, must be in a sub graphical sequence of length at least and the other sub graphical sequence not containing must have length at most .

The condition tested on line 9 () is necessary for to be decomposable into two sub graphical degree sequences of length and respectively. A zero-free graphical degree sequence of length must have all its terms less than . If is decomposable into two sub graphical degree sequences of length and respectively, must have at least terms less than and terms less than . Therefore, the smallest terms of () must be all less than and the smallest terms of () must be all less than . These translate to the necessary conditions and for to be decomposable. The condition has already been satisfied since based on the loop range of on line 8.

Lines 10 to 12 first find out the sub sequence of consisting exactly of those terms less than and then exhaustively enumerate all sub sequences of with length and even sum, trying to find a valid decomposition of into and with length , consisting of the terms of not in . Note that the terms of need not be consecutive in . The motivation for the construction of and is that, should the input be decomposable into two sub graphical degree sequences of length and respectively, the sub graphical degree sequence with length must have all its terms coming from . For each such sub sequence of with length (we can always choose such an since has length due to the definition of on line 10), let the remaining terms of form a sub sequence of length . If both and are graphical degree sequences, then the input is not forcibly connected since we have found a valid decomposition of into and and we may return False on line 12. The conditional test on line 11 () is added because at this point we know cannot be naturally decomposed and we can therefore exclude the consideration of since under this condition there is only one possible choice of from and consequently only one possible decomposition of into two sub sequences of length and respectively, which is also a natural decomposition. If we remove the natural decomposition test from lines 5 to 7 and also remove the conditional test on line 11, the algorithm would obviously still be correct. If in the for loop from lines 8 to 13 we never return False on line 12, this means there is no way to decompose the input into two sub graphical degree sequences whatsoever and we should return True on line 14. If we return False on line 4, 7, or 12 then a valid decomposition can also be returned if desired.

Later we will show that there is a computable threshold given the length of the input such that if is below this threshold the algorithm can immediately return False without any exhaustive enumerations. However, our computational experiences suggest that if the input satisfies then Algorithm 1 already runs fast and it might not be worthwhile to add the computation of the additional threshold into it.

### 2.3 Extensions of the algorithm

In this section we show how to extend Algorithm 1 to perform additional tasks such as listing all possible decompositions of a graphical degree sequence and testing forcibly -connectedness of a graphical degree sequence for fixed .

#### 2.3.1 Enumeration of all possible decompositions

Algorithm 1 can be easily extended to give all possible decompositions of the input into two sub graphical degree sequences in case it is not forcibly connected. We simply need to report a valid decomposition found on line 3, 6 and 12 and continue without returning False immediately. Such an enumerative algorithm to find all valid decompositions of the input can be useful when we want to explore the possible realizations of and their properties.

#### 2.3.2 Testing forcibly k-connectedness of d when k≥2

It is also possible to extend Algorithm 1 to decide whether a given graphical degree sequence is forcibly biconnected or not. We know that a connected graph is biconnected (non-separable) if and only if it does not have a cut vertex. This characterization leads us to observe that if in any forcibly connected graphical degree sequence the removal of any term and the reduction of some collection of elements from the remaining sequence by 1 each results in a non forcibly connected graphical degree sequence then is not forcibly biconnected. If no such term and a corresponding collection of elements from the remaining sequence can be found whose removal/reduction results in a non forcibly connected graphical degree sequence, then is forcibly biconnected. We give a pseudo-code framework in Algorithm 2 to decide whether a given graphical degree sequence is forcibly biconnected or not. To simplify our description, we call the above mentioned combination of removal/reduction operations a generalized Havel-Hakimi (GHH) operation, notationally . We remark that if the obtained on line 4 of Algorithm 2 is not a graphical degree sequence then the condition on line 5 is not satisfied and the algorithm will not return False

at the moment.

Similarly we can test whether a given graphical degree sequence is forcibly -connected or not for iteratively as long as we already have a procedure to test whether a graphical degree sequence is forcibly -connected or not. Suppose we already know an input is potentially -connected and forcibly -connected. We can proceed to choose a term and a collection of size from the remaining sequence and perform a GHH operation on . If the resulting sequence is a graphical degree sequence and is non forcibly -connected, then is not forcibly -connected. If no such term and a corresponding collection of elements from the remaining sequence can be found whereby a GHH operation can be performed on to result in a non forcibly -connected graphical degree sequence, then is forcibly -connected. We give a pseudo-code framework in Algorithm 3 to decide whether a given graphical degree sequence is forcibly -connected or not.

## 3 Complexity analysis

We conjecture that Algorithm 1 runs in time polynomial in on average. The worst case run time complexity is probably still exponential in . We are unable to provide a rigorous proof at this time, but we will later show through experimental evaluations that it runs fast on randomly generated long graphical degree sequences most of the time.

Now we give a discussion of the run time behavior of Algorithm 1. Observe that lines 1 to 4 take constant time. Lines 5 to 7 take time if we use the linear time algorithm from [12] to test whether an integer sequence is graphical. Lines 9 to 11 combined take time and they are executed times. So the overall time complexity is excluding the time on line 12.

Next consider all candidate decompositions of into and on line 12. The sub sequence is taken from whose length could be as large as and the length of could be as large as . Therefore in the worst case we may have up to candidate decompositions, which could make the run time of Algorithm 1 exponential in .

A careful implementation of Algorithm 1 will help reduce running time by noting that is a multi-set and provides us an opportunity to avoid duplicate enumerations of because different combinations of the indices could produce the same sub sequence . For this purpose, we can assume the input is also provided in another format where contains copies of for and . (Clearly and .) Now enumerating of length from can be equivalently translated to the following problem of enumerating all non-negative integer solutions of Equation (1) subject to constraints (2),

 k∑i=1xi=l, (1)
 0≤xi≤fq−k+i, for i=1,⋯,k, (2)

where is the number of distinct elements in which can also be represented as and satisfies and since all the elements of are and . In this context and vary with as the for loop from lines 8 to 12 progresses. Each solution of Equation (1) represents a candidate choice of out of with length by taking copies of . Further improvement could be achieved by noting the odd terms among since we must have an even number of odd terms in for it to have even sum. We can categorize the variables of Equation (1) into two groups based on the parity of the corresponding and enumerate only its solutions having an even sum of the ’s belonging to the odd group.

The number of solutions of Equation (1) can be exponential in . For example, let and let for . Then the number of solutions of Equation (1) will be at least by taking half of all to be 4 and the remaining half to be 0. However in practice we rarely find such a large number of solutions are actually all enumerated before Algorithm 1 returns.

To the best of our knowledge, the computational complexity of the decision problem of whether a given graphical degree sequence is forcibly connected is unknown. The problem is clearly in co-NP since a short certificate to prove that a given input is not forcibly connected is a valid decomposition of the input sequence. But is it co-NP-hard? As far as we know, this is an open problem.

The time complexity of the extension Algorithms 2 and 3 to test whether a given graphical degree sequence is forcibly -connected or not for is apparently exponential due to the exhaustive enumeration of the candidate collection of size from the remaining sequence and the ultimate calls to Algorithm 1 possibly an exponential number of times.

The computational complexity of the decision problem of whether a given graphical degree sequence is forcibly -connected () is also unknown to us. Clearly the problem is still in co-NP when is fixed as to prove that a graphical degree sequence is not forcibly -connected is as easy as using a sequence of certificates each consisting of a pair () and a certificate being a valid decomposition to show that the final resulting sequence is decomposable after a sequence of GHH operations on , but we do not know if it is inherently any harder than the decision problem for .

## 4 Computational results

In this section we will first present some results on the experimental evaluation on the performance of Algorithm 1 on randomly generated long graphical degree sequences. We will then provide some enumerative results about the number of forcibly connected graphical degree sequences of given length and the number of forcibly connected graphical partitions of a given even integer. Based on the available enumerative results we will make some conjectures about the asymptotic behavior of related functions and the unimodality of certain associated integer sequences.

### 4.1 Performance evaluations of algorithm 1

In order to evaluate how efficient Algorithm 1 is, we aim to generate long testing instances with length in the range of thousands and see how Algorithm 1 performs on these instances.

Our experimental methodology is as follows. Choose a constant in the range [0.1,0.95] and a constant in the range of [0.001,] and generate 100 random graphical degree sequences of length with largest term around and smallest term around . Each such graphical degree sequence is generated by first uniformly random sampling integer partitions with the specified number of parts and the specified largest part and smallest part and then accept it as input for Algorithm 1 if it is a graphical degree sequence. We run Algorithm 1 on these random instances and record the average performance and note the proportion of them that are forcibly connected. Table 1 lists the tested and . The largest tested is 0.49 since any graphical degree sequence of length and smallest term at least will cause Algorithm 1 to return True on line 2.

We implemented our Algorithm 1 using C++ and compiled it using g++ with optimization level -O3. The experimental evaluations are performed on a common Linux workstation. We summarize our experimental results for the length as follows.

1. For those instances with in the range from 0.1 to 0.5, Algorithm 1 always finishes instantly (run time ) and all the tested instances are non forcibly connected. This does not necessarily mean that there are no forcibly connected graphical degree sequences of length with largest term around with in this range. It only suggests that forcibly connected graphical degree sequences are relatively rare in this range.

2. For each in the range from 0.55 to 0.95, we observed a transition interval of for each fixed . See Table 2 for a list of observed transition intervals. All those instances with below the range are non forcibly connected and all those instances with above the range are forcibly connected. Those instances with in the range exhibit the behavior that the proportion of forcibly connected among all tested 100 instances gradually increases from 0 to 1 as increases in the range . For example, based on the results of Table 2, the proportions of forcibly connected graphical degree sequences of length 1000 with largest term around 850 () and smallest term below around 10 () are close to 0. If the smallest term is above around 70 () then the proportion is close to 1. When the smallest term is between 10 and 70 ( in the range from 0.01 to 0.07) then the proportion transitions from 0 to 1. Again these results should be interpreted as relative frequency instead of absolute law.

3. Algorithm 1 is efficient most of the time but encounters bottlenecks at occasions. For from 0.80 to 0.95 and near the lower end of the transition interval , Algorithm 1 does perform poorly on some of the tested instances with run time from a few seconds to more than a few hours (time out). The exact range of near the lower end of where Algorithm 1 could perform poorly varies. We observed that this range of for which the algorithm could perform poorly is quite narrow. For example, when , , this range of we observed is from 0.001 to 0.01. We observed that the frequency at which the algorithm performs poorly also varies. We believe that this is because among all possible instances with given length and given largest and smallest terms there is still great variety in terms of difficulty of testing their property of forcibly connectedness using Algorithm 1. In particular, some instances will trigger the exhaustive behavior of Algorithm 1 on line 12, making it enumerate a lot of candidate decompositions without returning.

We have also performed experimental evaluations of Algorithm 1 for the length without being able to finish all the same choices as for because of shortage of time. The behavior of Algorithm 1 on inputs of these longer lengths is similar to the case of but with different transition intervals and varied range of near the lower end of the transition interval for which it could perform poorly.

To sum up, we believe that the average case run time of Algorithm 1

is polynomial. We estimate that more than half of all zero-free graphical degree sequences of length

can be tested in constant time on line 1. However, its worst case run time should be exponential. As mentioned above, the computational complexity of the decision problem itself is unknown to us.

Currently we have a very rudimentary implementation of Algorithm 2 and do not have an implementation of Algorithm 3 for any yet. Algorithm 2 can start to encounter bottlenecks for input length around 40 to 50, which is much shorter than the input lengths Algorithm 1 can handle. We suspect that to handle input length when will be very difficult unless significant enhancement to avoid many of those exhaustive enumerations can be introduced.

### 4.2 Enumerative results

In this section we will present some enumerative results related to forcibly connected graphical degree sequences of given length and forcibly connected graphical partitions of given even integer. We also make some conjectures based on these enumerative results. For the reader’s convenience, we summarize the notations used in this section in Table 3.

In a previous manuscript [21] we have presented efficient algorithms for counting the number of graphical degree sequences of length and the number of graphical degree sequences of -connected graphs with vertices (or graphical degree sequences of length that are potentially -connected). It is proved there that the asymptotic orders of the number of zero-free graphical degree sequences of length and the number of potentially connected graphical degree sequences of length are equivalent. That is, . In order to investigate how the number of forcibly connected graphical degree sequences of length grows compared to we conduct computations to count such graphical degree sequences. We do not have any algorithm that can get the counting result without actually generating the sequences. The fastest algorithm we know of that can generate all zero-free graphical degree sequences of length is from Ruskey et al [18]. We adapted this algorithm to incorporate the test in Algorithm 1 to count those that are forcibly connected. Since grows as an exponential function of based on the bounds given by Burns [4] () for all sufficiently large with positive constants), it is unlikely to get the value of for large using an exhaustive generation algorithm. We only have counting results of for up to 26 due to the long running time of our implementation. The results together with the proportion of them in all zero-free graphical degree sequences are listed in Table 4. From the table it seems reasonable to conclude that the proportion will increase when and it might tend to the limit 1.

Since our adapted algorithm from Ruskey et al [18] for computing actually generates all forcibly connected graphical degree sequences of length it is trivial to also output the individual counts based on the degree sum or the largest degree . That is, we can output the number of forcibly connected graphical degree sequences of length with degree sum or largest term . In Table 5 we show itemized potentially and forcibly connected graphical degree sequences of length 7 based on the degree sum . The counts for are not shown because those counts are all 0. The highest degree sum is 42 for any graphical degree sequence of length 7. From the table we see that the individual counts based on the degree sum that contribute to (row ) and (row ) both form a unimodal sequence. Counts for other degree sequence lengths from 5 to 26 exhibit similar behavior. Based on the available enumerative results we find that for any given the range of even for and to be nonzero respectively are exactly the same (between and ). In fact, this can be proved as the following

###### Proposition 4.1.

An even has a potentially connected graphical partition with parts if and only if it has a forcibly connected graphical partition with parts.

###### Proof.

Sufficiency is obvious by definition. In the following we show the necessity.

Suppose an even has a potentially connected graphical partition with parts. From the Wang and Cleitman characterization [20] we know that must be between and for it to have a potentially connected graphical partition of parts. Now construct a partition of with parts as follows. Let the largest part be and let the remaining parts be as evenly as possible. That is, let and . Then the smallest parts of consist of copies of and copies of . With , we have and . Based on the Nash-Williams condition it is easy to verify that is a graphical partition of with parts and it is forcibly connected since its largest part is . ∎

In Table 6 we show itemized numbers of forcibly connected graphical degree sequences of length 15 based on the largest degree. The counts for largest degrees less than 6 are not shown because those counts are all 0. From the table we can see that the counts decrease with the largest degree. For other degree sequence lengths from 5 to 26 we observed similar behavior. The table also indicates that there are no forcibly connected graphical degree sequences of length 15 with largest degree less than 6. In fact, if we define to be the minimum largest term in any forcibly connected graphical sequence of length . This is, min{: is the largest term of some forcibly connected graphical degree sequence of length }. Clearly we have since for even the sequence of length is forcibly connected. We can show a lower bound of as follows.

###### Theorem 4.2.

For defined above, we have . That is, there is a constant such that for all sufficiently large .

###### Proof.

For the purpose of deriving a contradiction assume there is a forcibly connected graphical degree sequence of length with the largest term .

Let us first consider the case that is even. Let be the higher half (of length ) of and be the lower half (of length ) of . If both and have even sums, then they can shown to be both graphical degree sequences based on the Nash-Williams condition [17, 16, 19] as follows. Suppose the Durfee square size of is where by the definition of Durfee square. Since is graphical it satisfies the Nash-Williams condition, which can be represented as inequalities:

 j∑i=1(d′i−di)≥j, j=1,⋯,s,

where are the largest parts of the conjugate partition of the partition (). Now and have the same Durfee square size by our assumption that and they have the same largest parts. Let the largest parts of the conjugate of be with by our construction. To show that is graphical, we only need to show that the following inequalities hold:

 j∑i=1(d′′i−di)≥j, j=1,⋯,s. (3)

The first of these inequalities is clearly satisfied since . We also have the following inequalities,

 d′′j≥s and dj≤M(n), j=2,⋯,s,

so we have . Even if are all negative, their sum will be of order since . Clearly the inequalities in (3) are all satisfied since is of order . This shows that is graphical. By the same argument is graphical and we have found that can be decomposed into two sub graphical degree sequences and . This contradicts our assumption that is forcibly connected.

If both and have odd sums (we cannot have one of them having even sum and the other having odd sum since the sum of all the terms of is even), then it must be the case that both and have an odd number of odd terms. Construct two new sequences and from and by removing the largest odd term from and adding it to . Now clearly and is a decomposition of into two sub sequences of length and respectively and both having even sums. Again they are guaranteed to be graphical degree sequences by the Nash-Williams condition using a similar argument as above, which contradicts the assumption that is forcibly connected.

The case for odd can be proved in a similar way. The conclusion that cannot be of lower order than then follows. ∎

We do not have any theory or algorithm to efficiently obtain for any given . Other than recording the minimum largest term while enumerating all forcibly connected graphical degree sequences of length , a naive approach would be to let start from 3 upward and test if there is a forcibly connected graphical degree sequence of length with largest term and stop incrementing when we have found one. Obviously this works but is not efficient. Any efficient algorithm for might be worthwhile to be added into Algorithm 1 so that it can immediately return False if . However, while we conduct performance evaluations of Algorithm 1 we do find that a random graphical degree sequence of length with most likely can be decided instantly by Algorithm 1. Therefore we believe that an efficient algorithm for will not help much on average. We show the values of based on our enumerative results in Table 7. The fact that agrees with the results of Table 6 where the counts for all . As a side note, the minimum largest term in any potentially connected graphical sequence of length is clearly 2 since the degree sequence ( copies) is potentially connected while ( copies) is not potentially connected.

We also investigated the number of forcibly connected graphical partitions of a given even integer . There is a highly efficient Constant Amortized Time (CAT) algorithm of Barnes and Savage [2] to generate all graphical partitions of a given even . And there are efficient counting algorithms of Barnes and Savage [1] and Kohnert [13] to count the number of graphical partitions of even without generating them. It is known from Erdős and Richmond [8] that the number of potentially connected graphical partitions of and are of equivalent order, i.e. . It is also known from Pittel [14] that the proportion of graphical partitions among all partitions of an integer tends to 0. Although the order of the number of unrestricted partitions of is long known since Hardy and Ramanujan [10], the exact asymptotic order of is still unknown. We know of no algorithm to count the number of forcibly connected graphical partitions of without generating them. Using a strategy similar to that we employed in computing , we adapted the algorithm of Barnes and Savage [2] and incorporated the test of forcibly connectedness from Algorithm 1 and then count those that are forcibly connected. The growth of is quick and we only have numerical results of for up to 170. The results together with the proportion of them in all graphical partitions are listed in Table 8. For the purpose of saving space we only show the results in increments of 10 for . From the table it seems reasonable to conclude that the proportion will decrease when is beyond some small threshold and it might tend to the limit 0.

Like the situation for the adapted algorithm from Barnes and Savage [2] to compute actually generates all forcibly connected graphical partitions of so it is trivial to also output the individual counts based on the number of parts or the largest part. In Table 9 we show the individual counts of potentially and forcibly connected graphical partitions of 20 based on the number of parts. Counts for the number of parts less than 5 or greater than 11 are not shown since those counts are all 0. The ranges of the number of parts for which the number of potentially connected graphical partitions of with parts and the number of forcibly connected graphical partitions of with parts are nonzero are exactly the same based on Proposition 4.1. The smallest number of parts for which and are both nonzero is the smallest positive integer such that and this is also the smallest number of parts for which a partition of with this many parts might be graphical. The largest number of parts for which and are both nonzero is based on the Wang and Cleitman characterization [20]. In Table 10 we show the individual counts of forcibly connected graphical partitions of 20 based on the largest part. Counts for the largest part less than 3 or greater than 10 are not shown since those counts are all 0. Clearly is the maximum largest part of any forcibly connected graphical partition of since ( copies of 1) is a forcibly connected graphical partition of and no graphical partition of has its largest part greater than . However, similar to the case of , the minimum largest part, , of any forcibly connected graphical partition of does not seem to be easily obtainable. Clearly grows at most like since for every large even it has a graphical partition with about parts and all parts about and this graphical partition is forcibly connected. In Table 11 we show several values of . They are obtained while we exhaustively generate all graphical partitions of and keep a record of the minimum largest part. The fact that agrees with the results of Table 10 where for all . As a side note, the minimum largest part of any potentially connected graphical partition of is clearly 2 since ( copies) is a potentially connected graphical partition of while ( copies) is not.

### 4.3 Questions and conjectures

Based on the available enumerative results we ask the following questions and make certain conjectures:

1. What is the growth order of relative to ? Note that the exact asymptotic order of is unknown yet. (Some upper and lower bounds of are known. See Burns [4]). We conjecture . That is, almost all zero-free graphical degree sequences of length are forcibly connected. If this is true, then it is a stronger result than the known result (see [21]) since . Furthermore, we conjecture that is monotonously increasing when . Let and denote the number of potentially and forcibly -connected graphical degree sequences of length respectively. It is already known from [21] that when . Clearly we also have when . What can be said about the relative orders of , and when ?

2. What is the growth order of relative to ? Note that the exact asymptotic order of is unknown yet. We conjecture . That is, almost none of the graphical partitions of are forcibly connected. Furthermore, we conjecture that is monotonously decreasing when . Let and denote the number of potentially and forcibly -connected graphical partitions of respectively. What can be said about the relative orders of , and when ?

3. We conjecture that the numbers of forcibly connected graphical partitions of with exactly parts, when runs through , give a unimodal sequence.

4. Let be the smallest positive integer such that . We conjecture that the numbers of forcibly connected graphical partitions of with parts, when runs through , give a unimodal sequence.

5. What is the growth order of , the minimum largest term in any forcibly connected graphical sequence of length ? Is there a constant such that ? Is there an efficient algorithm to compute ?

6. What is the growth order of , the minimum largest term in any forcibly connected graphical partition of ? Is there a constant such that ? Is there an efficient algorithm to compute ?

7. We conjecture that the numbers of forcibly connected graphical partitions of an even with the largest part exactly , when runs through , give a unimodal sequence.

8. We showed all these decision problems to test whether a given graphical degree sequence is forcibly -connected to be in co-NP for fixed . Are they co-NP-hard? Is the decision problem for inherently harder than for ?

## 5 Conclusions

In this paper we presented an efficient algorithm to test whether a given graphical degree sequence is forcibly connected or not and its extensions to test forcibly -connectedness of graphical degree sequences for fixed . Through performance evaluations on a wide range of long random graphical degree sequences we demonstrate its average case efficiency and we believe that it runs in polynomial time on average. We then incorporated this testing algorithm into existing algorithms that enumerate zero-free graphical degree sequences of length and graphical partitions of an even integer to obtain some enumerative results about the number of forcibly connected graphical degree sequences of length and forcibly connected graphical partitions of . We proved some simple observations related to the available numerical results and made several conjectures. We are excited that there are a lot for further research in this direction.

## References

• [1] Tiffany M. Barnes and Carla D. Savage. A Recurrence for Counting Graphical Partitions. Electronic Journal of Combinatorics, 2, 1995.
• [2] Tiffany M. Barnes and Carla D. Savage. Efficient generation of graphical partitions. Discrete Applied Mathematics, 78(1–3):17–26, 1997.
• [3] F. T. Boesch. The strongest monotone degree condition for n-connectedness of a graph. Journal of Combinatorial Theory, Series B, 16(2):162–165, 1974.
• [4] Jason Matthew Burns. The Number of Degree Sequences of Graphs. PhD thesis, Massachusetts Institute of Technology. Dept. of Mathematics, 2007.
• [5] Gary Chartrand, S. F. Kapoor, and Hudson V. Kronk. A sufficient condition for n-connectedness of graphs. Mathematika, 15(1):51–52, 1968.
• [6] S. A. Choudum. On forcibly connected graphic sequences. Discrete Mathematics, 96(3):175–181, 1991.
• [7] P. Erdős and T. Gallai. Graphs with given degree of vertices. Mat. Lapok, 11:264–274, 1960.
• [8] P. Erdős and L. B. Richmond. On graphical partitions. Combinatorica, 13(1):57–63, 1993.
• [9] S. L. Hakimi. On realizability of a set of integers as degrees of the vertices of a linear graph. I. Journal of the Society for Industrial and Applied Mathematics, 10(3):496–506, 1962.
• [10] G. H. Hardy and S. Ramanujan. Asymptotic formulae in combinatory analysis. Proc. London Math. Soc., 17:75–115, 1918.
• [11] Václav Havel. A remark on the existence of finite graphs. Časopis pro pěstování matematiky, 80(4):477–480, 1955.
• [12] Antal Iványi, Gergő Gombos, Loránd Lucz, and Tamás Matuszka. Parallel enumeration of degree sequences of simple graphs II. Acta Universitatis Sapientiae, Informatica, 5(2):245–270, 2013.
• [13] Axel Kohnert. Dominance Order and Graphical Partitions. Electronic Journal of Combinatorics, 11(1), 2004.
• [14] Boris Pittel. Confirming Two Conjectures About the Integer Partitions. Journal of Combinatorial Theory, Series A, 88(1):123–135, 1999.
• [15] S. B. Rao. A survey of the theory of potentially P-graphic and forcibly P-graphic degree sequences, pages 417–440. Springer Berlin Heidelberg, 1981.
• [16] C. C. Rousseau and F. Ali. A Note on Graphical Partitions. Journal of Combinatorial Theory, Series B, 64(2):314–318, 1995.
• [17] E. Ruch and I. Gutman. The Branching Extent of Graphs. Journal of Combinatorics, Information and System Sciences, 4(4):285–295, 1979.
• [18] Frank Ruskey, Robert Cohen, Peter Eades, and Aaron Scott. Alley CATs in search of good homes. In 25th S.E. Conference on Combinatorics, Graph Theory, and Computing, volume 102, pages 97–110. Congressus Numerantium, 1994.
• [19] Gerard Sierksma and Han Hoogeveen. Seven Criteria for Integer Sequences Being Graphic. Journal of Graph Theory, 15(2):223–231, 1991.
• [20] D. L. Wang and D. J. Kleitman. On the Existence of n-Connected Graphs with Prescribed Degrees (n2). Networks, 3(3):225–239, 1973.
• [21] Kai Wang. Efficient counting of degree sequences. https://arxiv.org/abs/1604.04148, Under Review.