Matroid base with Congruency constraint

Siyue Liu, Chao Xu

Combinatorial search problem

\(\newcommand{\R}{\mathbb{R}}\) \(\newcommand{\Z}{\mathbb{Z}}\) \(\newcommand{\N}{\mathbb{N}}\)

  • A groundset of elements \(E\)
  • Feasible sets \(\mathcal{F}\subseteq 2^E\)
  • Find an element in the feasible set

Combinatorial search problem with congruency constraint

  • \(\Z_k=\{0,\ldots,k-1\}\). Addition is defined as \(a+b = a+b \pmod k\).
  • Given a label function \(\ell:E\to \Z_k\) and \(b\in \Z_k\). Let \(\ell(X)=\sum_{x\in X}\ell(x)\).
  • \(b\)-feasible sets are \(\mathcal{F}_b = \{\ell(F) = b | F\in \mathcal{F}\}\).
  • Goal: find a set in \(\mathcal{F}_b\).
  • When \(k=2\), we call it parity constraint.

Alternative formulation for parity constraint

  • A set of red elements \(R\subseteq E\).
  • Find a feasible set with odd (even) number of red elements.

Major Question

For what kind of feasible family \(\mathcal{F}\), is search over \(\mathcal{F}_b\) is easy?

Example: Cycles

Cycle

Given a (directed) graph, find a cycle.

  • Find a cycle: depth first search.
  • odd length cycle: odd closed walk

Example: Cycles

Cycle

Given a (directed) graph, find a cycle.

Example: Matching

  • Find a perfect matching with even number of red edges:
  • Find a perfect matching with \(0 \pmod 3\) red edges: RP, unknown if it is in P.

Example: Modular Subset sum

  • \(\mathcal{F}=2^E\).
  • Find a subset of elements that sums to \(b \pmod k\).
  • Standard dynamic programming algorithm with running time \(O(nk)\).
  • Pseudopolynomial time!
  • Faster algorithm of \(\tilde{O}(n+k)\) time exists (Axiotis et al. 2019, 2021; Cardinal and Iacono 2021).

Matroid

Zero Base Problem

Given a matroid \(M\) and \(\ell:E\to \Z_k\). Find a base \(B\) such that \(\ell(B)=0\).

  • Label sum \(0\) is for convenience.
  • Folklore algorithm: Reduce to \(n^{O(k)}\) matroid intersection.
  • Does this problem have a pseudopolynomial time algorithm (Papadimitriou and Yannakakis 1982)?
  • Is the problem in FPT with respect to \(k\)?

Our result

Theorem (Combinatorial)

If \(k\) is a prime power or product of two primes, then for any base \(B\), if there exists a zero base, then there exists a zero base \(D\) such that \(|B\setminus D|\leq k-1\).

Theorem (Algorithm)

If \(k\) is a prime power or product of two primes, then there exists an algorithm to find a zero base in a \(\Z_k\) labelled matroid of \(n\) elements in \(O((2k-1)^{k-1}n^c)\) time.

Zero base problem is FPT!

Matroid backgrounds

  • Let \(M=(E,\mathcal{I})\) is a set system.
  • \(\mathcal{I}\subseteq 2^E\) are the independent sets.
  • The rank of \(X\subseteq E\) is \(r(X) = \max \{ |I| \mid I\subseteq X, I\in \mathcal{I} \}\).

Matroid backgrounds

  • \(\mathcal{B}\) the set of bases are the maximal independent sets.
  • \(M=(E,\mathcal{I})\) is a matroid if
    • \(\mathcal{B}\) is non-empty
    • If \(A,B\in \mathcal{B}\), then for every \(a\in A\setminus B\), there exists \(b\in B\setminus A\) such that \(A-a+b\in \mathcal{B}\).

Matroid backgrounds

Definition (Partition Matroid)

A matroid \(M=(E,\mathcal{I})\) is a partition matroid if there is a partition \(E_1,\ldots,E_k\) of \(E\) and capacities \(a_1,\ldots,a_k\), such that a set \(I\) is independent if and only if \(|I\cap E_i|\leq a_i\).

Matroid backgrounds

Definition (Matroid Intersection)

For two matroids \(M_1=(E,\mathcal{I}_1)\) and \(M_2=(E,\mathcal{I}_2)\), the matroid intersection \(M=M_1\cap M_2\) is the set system \(M=(E,\mathcal{I}_1 \cap \mathcal{I}_2)\).

Optimization over matroid intersection takes polynomial time.

Folklore algorithm

  • \(E_i = \{ e \mid e\in E, \ell(e)=i\}\).
  • Enumerate all \(a_0,\ldots,a_{k-1}\) such that \(\sum_{i=0}^{k-1} i\cdot a_i = 0\), and \(0\leq a_i\leq |E_i|\)
  • For each \(a_0,\ldots,a_{k-1}\), run matroid intersection between \(M\) and the partition matroid over the partition \(E_0,\ldots,E_{k-1}\) with capacities \(a_0,\ldots,a_{k-1}\).
  • return the result of any feasible matroid intersection.
  • Correctness: If \(B\) be the zero base, then it would be found by the matroid intersection with capacities \(|E_0\cap B|,\ldots,|E_{k-1}\cap B|\).

Simpler algorithm

  • Hard to explain to anyone who never seen matroid intersection before.
  • Can we handle parity case with an easier algorithm?

Structural theorem for parity

Lemma (Brualdi 1969)

Let \(B\) and \(D\) be bases, then there exists a bijection \(f:B\setminus D\to D\setminus B\), such that for all \(e\in B\setminus D\), \(B-e+f(e)\) is a base.

Theorem

If a matroid has a zero base in \(\Z_2\), then for any base \(B\), there exists an zero base \(D\) such that \(|B\setminus D|\leq 1\).

Proof: If \(B\) is a zero base, then we are done. Otherwise, \(B\) is a \(1\) base, then consider a bijection \(f:B\setminus D \to D\setminus B\). At least 1 \(e\in B\setminus D\), \(\ell(f(e))+\ell(e) = 1\). \(B-e+f(e)\) is a zero base.

Parity constraint zero base

The algorithm for finding a zero base over \(\Z_2\).

  1. Find any base \(B\), if it is an zero base, return \(B\).
  2. If it is not an zero base, then find a pair \(e\in B\) and \(f\not\in B\), such that \(\ell(e)+\ell(f)=1\), \(B-e+f\) is a base. Return \(B-e+f\).
  3. Otherwise, no such base exists.

What about larger modulus?

Definition (Strongly Base-orderable Matroid)

A matroid is strongly base-orderable, if for any bases \(B\) and \(D\), there exists a bijection \(f:B\setminus D\to D\setminus B\), such that for all \(X\subseteq B\setminus D\), \(B-X+f(X)\) is a base.

Similar proof show

Theorem

If a strongly base-orderable matroid has a zero base, then for any base \(B\), there exists an zero base \(D\) such that \(|B\setminus D|\leq k-1\).

A sensible conjecture

Proximity Conjecture

If the matroid has a zero base in \(\Z_k\). Let \(B\) be the a base, there exists a zero base \(D\) such that \(|B\setminus D|\leq k-1\).

\(k-1\) is the best possible

  • A block matroid is a matroid where \(E\) can be partitioned into two bases (called blocks).
  • Note for any base \(D\), \(\ell(D\setminus B) = |D\setminus B|\pmod k\).

Implications of the conjecture

A \(O(n^{2(k-1)})\) time algorithm:

  • Find any base \(B\)
  • For \(k'\leq k-1\)
    • For each \(S\) a subset \(B\) of size \(k'\), \(T\) a subset of \(E\setminus B\) of size \(k'\)
      • Test if \((B\setminus S)\cup T\) is a zero base, if so, return.
  • No zero base exists

FPT algorithm given conjecture is true

  • Find a base \(B\), and let \(v = (|E_0\cap B|,\ldots,|E_{k-1}\cap B|)\).
  • For every \(u\) such that \(\|v-u\|_1 \leq k-1\) and \(\sum_{i=0}^{k-1} i \cdot u_i = b\), we compute the matroid intesection of \(M\) and \(M'\), a partition matroid over \(E_0,\ldots,E_{k-1}\) with capacities \(u_0,\ldots,u_{k-1}\).
  • Output a common base.

Total running time is \((2k-1)^k\) times matroid intersection.

Observations

Conjecture (Strong Proximity)

Let \(B\) be any base, for each \(b\in \Z_k\), if there exists a base \(D'\) such that \(\ell(D')=b\), then there exists a base \(D\) such that \(\ell(D)=b\) and \(|B\setminus D|\leq k-1\).

Observations:

  • Minimal counterexample would be a block matroid of rank \(k\)
  • \(B\) and \(D\) are disjoint.
  • \(\ell(D')\) is unique, that is no other base \(D\) has \(\ell(D)=b\).

A labelling isolates a base, if no other base has the same label sum.

Combinatorial characterization

Our main conjecture equivalent to the following:

Conjecture (Isolation)

For every block matroid of rank \(k\), there is no \(\Z_k\) labelling that isolates a block.

For a fixed \(k\), number of block matroid of rank \(k\) is finite. One can check the theorem is true for small \(k\)!

We’ve tested for \(k=2,3,4,5\), all of which are true.

Prime case

Theorem (Isolation)

Let \(p\) be a prime. For every block matroid of rank \(p\), there is no \(\Z_p\) labelling that isolates a block.

Proof

Consider disjoint bases \(B\) and \(D\).

A pair \(e\in D\) and \(e'\not\in D\) is called trivially exchangeable, if \(\ell(e)=\ell(e')\) and \(D-e+e'\) is a base.

If \(D\) has a trivially exchangeable pair, then we are done.

Proof

If \(D\) does not have a trivially exchangable pair with label \(i\), then we claim \(r(E_i) = r(E_i\cap B)+r(E_i\cap D)\).

Let \(M\) be a matroid with bases \(\mathcal{B}\), let \(p\) be a prime number, \(\ell:E\to \Z_p\) a label function.

\[|\ell(\mathcal{B})|\geq \min\{p, \sum_{i\in \Z_p} r(E_i-r(M)+1)\}.\]

Pick a \(e\in D\), and consider the matroid \(M'=M-e\). \[\begin{aligned} &\left(\sum_{i\in \Z_p} r(E_i)\right) - r(M')+1\\ \geq& \left(\sum_{i\in \Z_p,\ell(e)\neq i} r(E_i\cap B) + r(E_i\cap D) \right)\\ & + r(E_{\ell(e)}\cap B) + (r(E_{\ell(e)}\cap D)-1) - p + 1\\ =& 2p-p \\ =& p\\ \end{aligned}\] \(M'\) has a base of every sum. There is a base \(D'\) in \(M'\) s.t \(\ell(D')=\ell(D)\), which is also a base in \(M\).

Generalizations

Conjecture (Schrijver-Seymour)

Let \(M\) be a matroid with bases \(\mathcal{B}\), let \(G\) be an abelian group and \(\ell:E\to G\) a label function. If \(H=Stab(\ell(M))\), then \[|\ell(\mathcal{B})|\geq |H|\cdot (\sum_{Q\in R/H} r(\ell^{-1}(Q))-r(M)+1)).\]

Theorem (Liu-X)

For any group \(G\) where Schrijver-Seymour conjecture is true, and a zero base exists, then for any base \(B\), there is a zero base \(D\) such that \(|B\setminus D|\leq |G|-1\).

Main result

Schrijver-Seymour conjecture is true if \(|G|=pq\) or \(G=\Z_{p^k}\), for prime \(p\) and \(q\).

Theorem

Let \(k\) be a power of a prime, or product of two primes. For a matroid \(M\), let \(B\) be a base, for each \(b\in \Z_k\), if \(D'\) such that \(\ell(D')=b\), then there exists a base \(D\) such that \(\ell(D)=b\) and and \(|B\setminus D|\leq k-1\).

Open Problems

Conjecture (Proximity for Optimization)

For any optimum base \(B\), either there exists an optimum zero base \(D\) such that \(|B\setminus D|\leq k-1\), or there is no zero base.

We verified this is true for \(\Z_3\) and \(\Z_4\).

Open Problems

\(D(G)\), the Davenport constant of a group \(G\), is the smallest number that any set of size \(D(G)\) must contain a non-empty subset that sums to 0.

\(D(G)\) can be much smaller than \(|G|\), but \(D(G)=|G|\) if \(G=\Z_k\).

Theorem

Let \(G\) be a group and \(M\) be a strongly base-orderable matroid. For any optimum base \(B\), either there exists a optimum zero base \(D\), such that \(|B\setminus D|\leq D(G)-1\), or there is no zero base.

Does the above theorem generalize to all matroids?

References

Arkin, E. M., C. H. Papadimitriou, and M. Yannakakis. 1991. “Modularity of Cycles and Paths in Graphs.” J. ACM 38 (2): 255–74. https://doi.org/10.1145/103516.103517.
Axiotis, Kyriakos, Arturs Backurs, Karl Bringmann, Ce Jin, Vasileios Nakos, Christos Tzamos, and Hongxun Wu. 2021. “Fast and Simple Modular Subset Sum.” In Symposium on Simplicity in Algorithms (SOSA), 57–67. https://doi.org/10.1137/1.9781611976496.6.
Axiotis, Kyriakos, Arturs Backurs, Ce Jin, Christos Tzamos, and Hongxun Wu. 2019. “Fast Modular Subset Sum Using Linear Sketching.” In Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, 58–69. SODA ’19. USA: Society for Industrial; Applied Mathematics.
Cardinal, Jean, and John Iacono. 2021. “Modular Subset Sum, Dynamic Strings, and Zero-Sum Sets.” In Symposium on Simplicity in Algorithms (SOSA), 45–56. https://doi.org/10.1137/1.9781611976496.5.
DeVos, Matt, Luis Goddyn, and Bojan Mohar. 2009. “A Generalization of Kneser’s Addition Theorem.” Advances in Mathematics 220 (5): 1531–48.
Maalouly, Nicolas El, Raphael Steiner, and Lasse Wulf. 2022. “Exact Matching: Correct Parity and FPT Parameterized by Independence Number.” https://arxiv.org/abs/2207.09797.
Papadimitriou, Christos H., and Mihalis Yannakakis. 1982. “The Complexity of Restricted Spanning Tree Problems.” J. ACM 29 (2): 285–309. https://doi.org/10.1145/322307.322309.
Robertson, Neil, P. D. Seymour, and Robin Thomas. 1999. “Permanents, Pfaffian Orientations, and Even Directed Circuits.” Annals of Mathematics. Second Series 150 (3): 929–75. http://eudml.org/doc/120561.
Schrijver, Alexander, and Paul D. Seymour. 1990. “Spanning Trees of Different Weights.” In Polyhedral Combinatorics, Proceedings of a DIMACS Workshop, Morristown, New Jersey, USA, June 12-16, 1989, edited by William J. Cook and Paul D. Seymour, 1:281. DIMACS Series in Discrete Mathematics and Theoretical Computer Science. DIMACS/AMS. https://doi.org/10.1090/dimacs/001/21.