9

Given a binary operation specified as an $n \times n$ Cayley table, what is the complexity of the best deterministic algorithm for testing if the binary operation is a group?

There's a fairly simple deterministic $O(n^2 \log n)$ algorithm which works as follows. We can check if the binary operation is a quasigroup in $O(n^2)$ time by verifying the Latin square property. It is also easy to determine if the group has an identity element in $O(n^2)$ time. Quasigroups have generating sets of size at most $\log_2 n$ and such a generating set can be found in $O(n^2)$ time using a simple greedy algorithm. Applying Light's associativity test then allows us to test associativity in $O(n^2 \log n)$ time.

An obvious lower bound is $\Omega(n^2)$. According to wikipedia, there is a randomized BPP algorithm for testing associativity in $O(n^2)$, so this bound is tight for BPP algorithms.

Is there a deterministic $O(n^2)$ algorithm as well?

Qudit
  • 3,300
  • 1
    The input is $n^2\log n$ bits - so you're asking for a sublinear algorithm? I couldn't access the Rajagopalan-Schulman BPP algorithm paper so don't know what their computational model is. – Dap Nov 10 '17 at 08:03
  • @Dap No, it would be a linear time algorithm. In this model, one typically assumes group operations and things like equity testing can be done in constant time. Think of each group element as using one unit of memory. – Qudit Nov 10 '17 at 08:10
  • (The quote is from the Light's etc. Wiki page) "[...] Light's associativity test simplifies the task in some instances [...] [, but] it does not improve the worst-case runtime of the naive algorithm, namely $O(n^3)$ for sets of size $n$ [...]" – Kan't Sep 05 '25 at 11:08
  • @Kan't In general, Light's associativity test does not improve on $O(n^3)$. However, when there is a generating set $S$ there is an obvious modification that takes only $O(|S| n^2)$ time. Also your edit is incorrect. $O(n^2)$ is an upper bound and not a lower bound (see the standard definition). – Qudit Sep 06 '25 at 16:14
  • Oops, sorry, my.l misunderstanding. – Kan't Sep 06 '25 at 16:34
  • @Kan't No worries! – Qudit Sep 06 '25 at 23:40
  • 1
    If you admit that the table is a Latin square (which may not be your case, admittedly), then the following link provides a deterministic $O(n^2\log n)$ algorithm, without Light's associativity test: https://math.stackexchange.com/q/5094211/1092170 – Kan't Sep 08 '25 at 12:30
  • 1
    @Kan't It's fine to assume a latin square because that property can be tested in $O(n^2)$ time. Your link looks like an interesting alternate approach. – Qudit Sep 09 '25 at 20:01

1 Answers1

0

It was shown only recently that testing whether a Latin Square is a group takes time $O(n^{2} \log^{c} n) = \tilde{O}(n^2)$ (the $\tilde{O}$ hides the polylogarithmic factor).

https://arxiv.org/pdf/2011.03133.pdf

ml0105
  • 15,138
  • That is an interesting paper but I don't think it is directely relevant to the question above. The algorithm that the authors give is in the Turing machine model whereas here I am considering the more usual RAM machine model. Presumably, this difference is the reason for the extra log factors in the paper. Also , I guess you meant $\tilde{O}(n^2)$ instead of $\tilde{O}(n)$. – Qudit May 15 '22 at 06:39