# Test conjectures on $k$-partitions over submodular functions

This article we consider tools one can use to quickly test conjectures. Testing conjectures quickly run into realm of infeasibility due to the combinatorial explosion. We look through an actual example and learn a few techniques. We use Sage and any fast linear program solver, like Gurobi.

# 1 A conjecture on $k$-partitions of submodular function

A set of $k$ non-empty and disjoint sets that partitions $V$ is called a $k$-partition. Let $f:2_{V}→R$ be a submodular function, a minimum $k$-partition is a $k$-partition $X$ of $V$ such that $∑_{X∈X}f(X)$ is minimized.

A $k$-partition $X$ and a $j$-partition $Y$ is noncrossing, if $X⊆Y$ for some $X∈X$ and $Y∈Y$. We denote it $X⊲Y$.

For two partitions, $X⊓Y={X∩Y∣X∈X,Y∈Y}$.

For two partitions $X$ and $Y$, $X≤Y$ if for each $X∈X$, $X⊆Y$ for some $Y∈Y$.

$f:2_{V}→R$ is a submodular function with $∣V∣≥k$. Let $X$ be a minimum $k−1$-partition and $Y$ be a minimum $k$-partition. There exists a minimum $k$-partition $Y_{′}$ such that $X⊲Y_{′}$ and $X⊓Y≤Y_{′}$.

We are interested in writing a program to test the conjecture for small $k$. The idea is to find different ways $X$ can intersect with $Y$, a matrix that encodes such information are called configurations. For each configuration, we want to know under such configuration, can we find the desired $Y_{′}$.

# 2 Enumerate non-isomorphic configurations

Given $X={X_{1},…,X_{k−1}}$ and $Y={Y_{1},…,Y_{k}}$. Let $Z_{i,j}=X_{i}∩Y_{j}$.

We want to show some $Y_{′}$ is a min $k$-partition, where each partition class of $Y_{′}$ has to be the union of some $Z_{i,j}$s.

It doesn’t matter if $Z_{i,j}$ has
$100$ or $1$ vertices, only the emptyness matters.
Consider a matrix $M_{i,j}=max(1,∣Z_{i,j}∣)$. Such a matrix is called a
*configuration*. Define two configurations are
*isomorphic*, if one can be obtained by swapping rows and columns
of the other.

We are interested in enumerate the possible configurations up to isomorphism.

Find integer ${0,1}$ matrices and then modulo the action of a permutation group (that defines the isomorphism) can be done in Sage. There is a function that generates all integer vectors modulo a permutation group, and the vectors has length $ℓ$ with elements in ${0,…,n}$. See the reference on Integer vectors modulo the action of a permutation group.

`IntegerVectorsModPermutationGroup(P, max_part=1)`

Once we have the output, we filter the vectors to maintain the required properties, for example, has at least a $1$ on each row.

The input of the Sage function has to take the desired permutation group $P$.

One might think we just take $S_{k−1}×S_{k}$ to obtain $P$, where $S_{k}$ is the symmetric group of order $k$. Unfortunately, this is not correct. This gives you the action on the rows and columns, but what we really need, is what happens to each element in the matrix.

The correct way is to use the wreath products. We want to consider
$S_{k−1}≀S_{k}$ intersect with $S_{k}≀S_{k−1}$. However, we have to make
sure the mapping of the elements are correct. The following is the code
in SAGE, and the elements are numbers $1$
to $k(k−1)$. Note we made sure the
mapping has the same labels through permutation `pi`

.

```
a = SymmetricGroup(k-1)
b = SymmetricGroup(k)
matrix = [[k*x+y+1 for y in range(k-1)] for x in range(k)]
pi = list(itertools.chain.from_iterable(map(list, zip(*matrix))))
# we have to use SAGE to access GAP
GG = gap.WreathProduct(gap(a),gap(b))
HH = gap.WreathProduct(gap(b),gap(a))
G = PermutationGroup(gap_group = GG.AsPermGroup())
Hbad = PermutationGroup(gap_group = HH.AsPermGroup())
# make sure the elements are labelled correctly.
H = PermutationGroup([perm_replace(pi,g) for g in Hbad.gens()])
# The correct permutation group
P = H.intersection(G)
```

At this point, we obtain all possible configurations. In particular, for $k=3,4,5,6$, the number of configurations are $13,87,1053,28576$.

If we restrict to configurations where there is at least a $1$ in each row and at least a $1$ in each column, it cuts down the configurations to $5,42,633,20755$. We can further observe that for some configurations, it implies $X⊲Y$ already, so we do not have to check such configurations. Let’s call configurations after the above filtering good configurations. The number of good configurations for $k=3,4,5,6$ are $3,23,353,12828$.

# 3 Test if there exists a noncrossing $Y_{′}$ for a configuration $M$

We now have a configuration $M$, and now we are interested in creating a linear program to decide if there always exists a minimum $k$-partition $Y_{′}$ that is non-crossing with the minimum $(k−1)$-partition $X$. For a given $M$, one can always recover $X$ and $Y$.

Let $V$ be the set of vertices, which equals to the number of $1$s in $M$. Let $P_{k}(V)$ be the set of $k$-partitions of $V$. For each $U⊆V$, we create a variable $x_{U}$. It represents the value of $f(U)$. We also create a variable $z$.

For a partition $S$, $x_{S}$ is just $∑_{S∈S}x_{S}$.

Consider the following linear program.

$ maxs.t. zx_{S∪{a}}+x_{S∪{b}}≥x_{S∪{a,b}}+x_{S}x_{X}≤x_{X_{′}}x_{Y}≤x_{Y_{′}}x_{Y}=1z≤x_{Y_{′}} ∀S⊆V,a,b∈V∖S∀X_{′}∈P_{k−1}(V)∀Y_{′}∈P_{k}(V)∀Y_{′}∈P_{k}(V),X⊲Y_{′} $

The first set of constraints are the submodular inequalities. The second shows $X$ is a minimum $k−1$-partition, and the third shows $Y$ is a minimum $k$-partition. We also set the value of the minimum $k$-partition to be $1$. Finally, we consider every $k$-partition that is non-crossing with $X$, and $z$ is a lower bound of their value.

If the objective value $z=1$, then this means there is at least $1$ $k$-partition $Y_{′}$ that is non-crossing with $X$ has the value same as the minimum $k$-partition. Therefore the conjecture is true if and only for every configuration $M$, the above linear program has optimum $1$.

# 4 Redundant constraints

One can easily prove the conjecture for $k=3,4$ by directly using the above linear program over all good configurations. However, it runs into difficulty with $k=5$. This is because the linear program is way too large. The number of $k$ partitions for $n$ elements is the Stirling number of the second kind ${kn }$. ${520 }=749206090500$ and ${420 }=45232115901$. However, it seems many constraints are redundant due to symmetry. It be interesting to see if we can cut it down to a manageable size. If so, maybe the conjecture for $k=5$ or even $k=6$ might be solvable.

To do this, we consider the following definition. Consider a vector $s=(s_{1},…,s_{k})$. We say a family of $k$-partitions $F$ is $s$-complete, if $f(P)≥f(Y)$ for all $P∈C$, then $f(P)≥f(Y)$ for all $k$-partition $P$. Here $Y={Y_{1},…,Y_{k}}$ is a $k$-partition such that $∣Y_{i}∣=s_{i}$. Let $λ(s)$ to be the size of the minimum $s$-complete family. So instead of considering all $k$-partitions for the constraints, we just have to consider the $s$-complete family for some $s$. If $λ(s)$ is very small, then there is hope to solve the problem quickly.

Let $t$ be a $k$-tuple consists of only $d$’s, then we define $λ_{k}(d)=λ(t)$. It would be very interesting to see how large $λ_{k}(d)$ is.

As an example, we show a simple result on $λ(a,b)$.

$λ(a,b)≤2_{a}+2_{b}−3$.

Indeed, let $Y=(Y_{1},Y_{2})$ consists of $a$ and $b$ elements.

Consider the following family $F$: For each non-empty set $S$ such that either $S⊊Y_{1}$ or $S⊊Y_{2}$, $(S,V−S)∈F$. Also, let $Y∈F$.

So there are $2_{a}−2+2_{b}−2+1$ sets in $F$.

Next, we show $F$ is an $(a,b)$-complete family. Consider any $(X_{1},X_{2})$ not in $F$ and consider the intersection with $(Y_{1},Y_{2})$. Let $Z_{i,j}=X_{i}∩Y_{j}$.

Let $∣Z_{1,1}∣=x$ and $∣Z_{2,1}∣=y$, then we have $∣Z_{1,2}∣=a−x$ and $∣Z_{2,2}∣=b−x$. Consider when all $Z_{i,j}$ is non-empty.

$i=1∑2 j=1∑2 f(X_{i})+f(Y_{j}) =2(f(X_{1})+f(X_{2})+f(Y_{1})+f(Y_{2}))≥i=1∑2 j=1∑2 f(Z_{i,j})+f(X_{i}∪Y_{j})=i=1∑2 j=1∑2 f(Z_{i,j})+f(Z_{i,j}ˉ )≥4(f(Y_{1})+f(Y_{2})) $

Which shows $f(X_{1})+f(X_{2})≥f(Y_{1})+f(Y_{2})$.

Otherwise, if some $Z_{i,j}$ is empty, then we have $(X_{1},X_{2})=(Y_{1},Y_{2})∈F$.

In particular, $λ_{2}(d)≤2_{d+1}$.

$λ_{k}(d)=O(k_{d})$.