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

03/02/2018 ∙ by Kai Wang, et al. ∙ Georgia Southern University 0

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.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

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.

Input: A zero-free graphical degree sequence
Output: True or False, indicating whether is forcibly connected or not
1 if  or  then
2       return True
3 if  then
4       return False
; //
5  if there exists an such that and and are both graphical then
6       return False
7 for  to  do
8       if  then
             ; //
9              if  then
10                   Form all candidate decompositions of into and such that is taken from of length and is of length and both with even sum. If both and are graphical, return False 
11            
12      
return True
Algorithm 1 Pseudo-code to test forcibly-connectedness of a graphical degree sequence

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 -connectedness of when

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.

Input: A zero-free graphical degree sequence
Output: True or False, indicating whether is forcibly biconnected or not
1 if  is not potentially biconnected or forcibly connected then
2       return False
3 for each and each collection of size from  do
4       ;
5       if  is a non forcibly connected graphical degree sequence then
6             return False
7      
return True
Algorithm 2 Pseudo-code to test whether a graphical degree sequence is forcibly biconnected (See text for the description of GHH operation)

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.

Input: A zero-free graphical degree sequence and an integer
Output: True or False, indicating whether is forcibly -connected or not
1 if  is not potentially -connected or forcibly -connected then
2       return False
3 for each and each collection of size from  do
4       ;
5       if  is a non forcibly -connected graphical degree sequence then
6             return False
7      
return True
Algorithm 3 Pseudo-code to test whether a graphical degree sequence is forcibly -connected (See text for the description of GHH operation)

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),

(1)
(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.

0.10 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.09
0.20 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.19
0.30 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.29
0.40 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.39
0.50 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.49
0.55 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.49
0.60 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.49
0.65 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.49
0.70 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.49
0.75 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.49
0.80 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.49
0.85 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.49
0.90 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.49
0.95 0.001,0.002,0.003,…,0.01,0.02,0.03,…,0.49
Table 1: Chosen and in the experimental performance evaluation of Algorithm 1.
of
0.55 0.30 to 0.40
0.60 0.20 to 0.30
0.65 0.15 to 0.24
0.70 0.09 to 0.17
0.75 0.05 to 0.12
0.80 0.03 to 0.09
0.85 0.01 to 0.07
0.90 0.003 to 0.04
0.95 0.001 to 0.03
Table 2: Transition interval of for each (for ).

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.

Term Meaning
number of zero-free graphical sequences of length
number of potentially connected graphical sequences of length
number of forcibly connected graphical sequences of length
number of potentially connected graphical degree sequences
of length with degree sum
number of forcibly connected graphical degree sequences
of length with degree sum
number of forcibly connected graphical degree sequences of
length with largest term
minimum largest term in any forcibly connected graphical
sequence of length
number of graphical partitions of even
number of potentially connected graphical partitions of even
number of forcibly connected graphical partitions of even
number of potentially connected graphical partitions of
even with parts
number of forcibly connected graphical partitions of
even with parts
number of forcibly connected graphical partitions of with largest term
minimum largest term of forcibly connected graphical partitions of
Table 3: Terminology used in this section

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.

4 7 6 0.857143
5 20 18 0.900000
6 71 63 0.887324
7 240 216 0.900000
8 871 783 0.898967
9 3148 2843 0.903113
10 11655 10535 0.903904
11 43332 39232 0.905382
12 162769 147457 0.905928
13 614198 556859 0.906644
14 2330537 2113982 0.907079
15 8875768 8054923 0.907518
16 33924859 30799063 0.907861
17 130038230 118098443 0.908182
18 499753855 454006818 0.908461
19 1924912894 1749201100 0.908717
20 7429160296 6752721263 0.908948
21 28723877732 26114628694 0.909161
22 111236423288 101153550972 0.909356
23 431403470222 392377497401 0.909537
24 1675316535350 1524043284254 0.909705
25 6513837679610 5926683351876 0.909860
26 25354842100894 23073049582134 0.910006
Table 4: Number of forcibly connected graphical degree sequences of length and their proportions in zero-free graphical degree sequences of length .
degree sum 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42
7 11 15 22 26 29 29 26 23 18 13 8 5 2 1 1
3 5 10 19 25 28 29 26 23 18 13 8 5 2 1 1
Table 5: Number of potentially (row ) and forcibly (row ) connected graphical degree sequences of length 7 with given degree sum .
largest part 14 13 12 11 10 9 8 7 6
3166852 2624083 1398781 600406 201128 52903 9718 1031 21
Table 6: Number of forcibly connected graphical degree sequences of length 15 with given largest term .

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:

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:

(3)

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

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.

3 4 5 6 7 8 9 10 11 12 13 14
2 2 2 3 3 3 4 4 5 5 5 6
15 16 17 18 19 20 21 22 23 24 25 26
6 6 7 7 7 7 8 8 8 8 8 9
Table 7: Minimum largest term of forcibly connected graphical sequences of length .

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.

10 17 8 0.470588
20 244 81 0.331967
30 2136 586 0.274345
40 14048 3308 0.235478
50 76104 15748 0.206927
60 357635 66843 0.186903
70 1503172 256347 0.170537
80 5777292 909945 0.157504
90 20614755 3026907 0.146832
100 69065657 9512939 0.137738
110 219186741 28504221 0.130045
120 663394137 81823499 0.123341
130 1925513465 226224550 0.117488
140 5383833857 604601758 0.112299
150 14555902348 1567370784 0.107679
160 38173235010 3951974440 0.103527
170 97368672089 9714690421 0.099772
Table 8: Number of forcibly connected graphical partitions of and their proportions in all graphical partitions of
number of parts 5 6 7 8 9 10 11
1 9 26 38 37 36 30
1 9 25 22 10 9 5
Table 9: Number of potentially (row ) and forcibly (row ) connected graphical partitions of 20 with given number of parts .
largest part 3 4 5 6 7 8 9 10
1 14 26 20 12 5 2 1
Table 10: Number of forcibly connected graphical partitions of 20 with given largest term .
10 20 30 40 50 60 70 80 90 100
2 3 4 5 5 6 6 6 7 7
Table 11: Minimum largest term of forcibly connected graphical partitions of .

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.