Fix a finite group $G$. I am interested in the following decision problem: the input is some elements of $G$ with a partial order on them, and the question is whether there is a permutation of the elements that satisfies the order and is such that the composition of the elements in that order yields the group's neutral element $e$.
Formally, the $G$-test problem is as follows, where the group $G$ is fixed:
- Input: a finite partially ordered set $(P, <)$ with a labeling function $\mu$ from $P$ to $G$.
- Output: whether there exists a linear extension of $P$ (i.e., a total order $(P, <')$ such that for all $x, y \in P$, $x < y$ implies $x <' y$), such that, writing the elements of $P$ following the total order $<'$ as $x_1, \ldots, x_n$, we have $\mu(x_1) \cdot \cdots \cdot \mu(x_n) = e$.
For any group $G$, the $G$-test problem is clearly in NP. My question is: Is there a group $G$ such that the $G$-test problem is NP-hard?
A few remarks about equivalent problem statements:
- The language of posets and linear extensions can be equivalently replaced by that of DAGs and topological orders. That is, if you prefer, you can think of the input as a DAG with vertices labeled with group elements, and as the output as asking whether some topological sort of the input DAG achieves $e$.
- One could instead consider a harder problem where we are given a poset $(P, <)$ and $g \in G$, and ask whether $g$ (rather than $e$) can be realized. In fact the stronger problem reduces to the above: we can ask whether $e$ can be realized by $(P', <)$, where $P'$ is $P$ but with an element labeled $g^{-1}$ which is smaller than all others. Hence the natural choice of $e$ in the above definition.
Now, about my attempts to solve the problem:
- Of course, if the group $G$ is commutative, the $G$-test problem is clearly in PTIME as all linear extensions achieve the same group element, so we can just choose any one of them by topological sort and check whether it is $e$ or not. So the interesting case is non-commutative $G$. More generally, if $G$ has a homomorphism to some non-trivial commutative group (e.g., the signature, for permutations), a necessary but non-sufficient condition is to look at the problem through the homomorphism and check it in PTIME in the commutative image. I fail to see whether this can generalize to a decomposition scheme for all finite groups.
- If the order relation is empty (i.e., we are given a multiset of elements in $G$ and can use any permutation), the problem can be solved by dynamic programming, where the states are the number of occurrences of each element in $G$ that are still not used (remember that $G$ is fixed, so the number of states is then polynomial in the input).
- For inputs that are posets of constant width, we can use a dynamic algorithm following a chain decomposition. So if hardness holds it must be using inputs posets that are arbitrarily wide. Note that for wide posets the number of possible "states" in a dynamic programming approach would be the number of upsets of the poset, which in general is exponential and not polynomial, so that approach does not directly work.
- The same problem could be studied for monoids rather than groups, but for monoids I already know that it is hard, by a fairly convoluted argument that involves the transition monoid of an automaton and reduces to a variant of a previous CStheory question. The full proof of this is in this preprint, appendices D.1.3 and D.1.4, though the terminology is very different. Hence, when $G$-testing is PTIME, it has to use the invertibility of group elements.
- If we asked whether all linear extensions realize $e$ (rather than whether some does), then I know the problem to be in PTIME (see appendix D.2 of the same preprint), though I also know that this other problem would be coNP-hard for monoids rather than groups (D.1.3 and D.1.4).
If $G$-test is hard for some $G$, of course, the natural question is whether some dichotomy holds, and which criterion would distinguish tractable $G$ and non-tractable $G$. In fact this question can be more generally asked when we use finite automata instead of groups. (Formally: Fix a finite alphabet $\Sigma$, and a finite deterministic finite automaton (DFA) $A$ on $\Sigma$, and consider the $A$-test problem, given a poset labeled with elements from $\Sigma$, of checking whether some linear extension forms a word accepted by $A$.) Of course I have no idea about these harder questions.