Manuscript Offprint
arXiv:2610.08280Almost Tight Bounds for Isomorphism Testing and Basis Construction in Finite Abelian Groups
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We study isomorphism decision and basis construction for finite Abelian groups of known order . We measure complexity by the number of additions performed in the groups and by the total running time. We give a randomized isomorphism decision algorithm that performs group additions and runs in time. This improves the upper bound of Chen and Fu [3] and matches Bshouty [1] lower bound up to polylogarithmic factors. We also prove that finding a basis with success probability at least requires group additions in the worst case. This matches the upper bound of Chen and Fu [3] up to polylogarithmic factors.
These results separate isomorphism decision from basis construction in finite Abelian groups: their optimal worst-case complexities are and , respectively.
1 Introduction
We study three fundamental computational problems for finite Abelian groups. The first is the isomorphism problem: given two Abelian groups of the same order, decide whether they are isomorphic. The second is the problem of finding the isomorphism type of an Abelian group, that is, representing it as a direct product of cyclic groups. The third is the problem of finding an explicit basis: in addition to determining the cyclic factors, we find elements of the input group that generate these factors, so that every group element has a unique representation in terms of the basis.
Although these problems are closely related algebraically, their computational complexities can be quite different. For example, knowing the isomorphism type of a group does not necessarily tell us how to find an explicit basis for it.
In this paper, we determine tight bounds for these problems. In particular, we give algorithms achieving these bounds and prove matching lower bounds. The precise definitions of the problems and our computational model are given in Section 2.
We first review the deterministic algorithms. Vikas [12] gave an -time algorithm for Abelian group isomorphism and an -time algorithm for Abelian groups of prime-power order. Kavitha [6] subsequently obtained an -time algorithm for general Abelian groups. For basis construction, Chen and Fu [3] gave a deterministic linear-time algorithm. Karagiorgos and Poulakis [5] also obtained linear-time basis algorithms when the prime factorization of is supplied. Bshouty [1] gave a deterministic construction of generators and triangular relations using group additions and time. These relations yield a basis and the isomorphism type within the same bounds. Bshouty [1] also proved lower bounds for deterministic algorithms for both isomorphism decision and basis construction, showing that the known linear-time algorithms are optimal.
Sublinear algorithms for basis construction also have a long history. Buchmann and Schmidt [2] gave an algorithm that, from a supplied generating set , computes the group structure using group operations. For a generating set of logarithmic size, this gives a bound. Chen and Fu [3] developed randomized sublinear-time basis algorithms. In particular, when the elements can be accessed through a list and the prime factorization of is supplied, their algorithm samples elements, obtains generating sets for the Sylow subgroups with high probability, and applies the Buchmann–Schmidt algorithm. Its worst-case running time is . Later, Bshouty [1] gave another -time randomized algorithm using a different approach: it constructs generators with triangular relations and then obtains a basis by computing a Smith normal form. These basis algorithms also solve isomorphism decision.
For lower bounds, Bshouty [1] proved that randomized algorithms require operations for both isomorphism decision and basis construction. This left a gap between the fourth-root lower bound and the square-root upper bound for each problem.
This paper closes both gaps up to factors polynomial in . We give a randomized algorithm that determines the isomorphism type using group additions and time, matching Bshouty's lower bound up to these factors. For explicit basis construction, we prove an lower bound, matching the existing upper bounds up to these factors. Thus, the two problems have different optimal worst-case exponents: 1/4 for isomorphism decision and 1/2 for basis construction.
Our upper bound uses earlier algorithms whose complexity depends on the structure of the group. Teske [11] generalized the Pohlig–Hellman discrete-logarithm method to finite Abelian groups. Sutherland [10] refined this approach and developed basis algorithms with more precise bounds. For an Abelian -group of rank , the principal exponential term is . Here the rank is the number of nontrivial cyclic factors. We state the precise consequence we use in Proposition 5.2. For each Sylow -subgroup , we apply this routine to . The rank of is at most , giving a fourth-root bound. We then recover the isomorphism type of from that of and the known order .
Our lower-bound proof is related to the collision arguments used by Shoup [8] for generic discrete logarithms. The common idea is that an unexpected equality between computed expressions reveals information about the group. However, a discrete-logarithm lower bound does not directly imply a basis-construction lower bound, since the required outputs differ. We therefore analyze basis construction directly on a randomly labelled elementary Abelian 2-group. We compare the algorithm's execution with a computation on formal sums and bound both the probability of an unexpected equality and the probability that the resulting output is a basis. This yields the square-root lower bound. The same symbolic comparison also gives a proof of Bshouty's fourth-root decision lower bound [1], which we include in Section 6.
The rank of a finite Abelian p-group is the smallest number of elements needed to generate it. Equivalently, if with all , then has rank . The trivial group has rank zero.
1.2 Main results
Write for the additive cyclic group of integers modulo and for the field of integers modulo a prime . Thus is the group of binary vectors of length , with coordinatewise addition modulo two. Groups isomorphic to are called elementary Abelian -groups.
Throughout, the group order is known. Group elements are represented by distinct labels, and each evaluation of the sum of two elements counts as one group addition. We give upper bounds on both the number of group additions and the total running time. Our lower bounds count only group additions and therefore also imply lower bounds on running time.
Our first result shows that constructing an explicit basis requires additions in the worst case, even when the isomorphism type of the group is known in advance.
Theorem 1.1 (Basis construction). For , every randomized algorithm that, with probability at least on every labelling, outputs elements forming a basis of a group isomorphic to requires group additions in the worst case. This holds even when all element labels and the identity label are supplied for free, and all computation other than group additions is free.
Our second result gives a faster algorithm for determining the isomorphism type. The algorithm computes the orders of the cyclic factors in a direct-product decomposition without constructing a basis of the whole group.
Theorem 1.2 (Isomorphism type and decision). The isomorphism type of a finite Abelian group of known order can be computed with probability at least using group additions and total time. Consequently, two finite Abelian groups of known order can be tested for isomorphism with probability at least within the same bounds, where is their common order.
The isomorphism algorithm matches Bshouty's lower bound [1] up to factors polynomial in . The basis lower bound matches the existing upper bounds, including those obtained from the algorithms of Chen and Fu [3], Sutherland [10], and Bshouty [1]. Thus, these results determine the optimal worst-case exponents for both problems and separate isomorphism decision from explicit basis construction.
The following table summarizes the bounds. Each upper bound applies to both the number of group additions and the total running time. Each lower bound applies to the number of group additions alone. The indicated families witness the lower bounds; hardness is not asserted at every group order.
| Task | Upper bound | Lower bound and witnessing orders |
|---|---|---|
| Isomorphism decision | ||
| Explicit basis construction |
1.3 The two main ideas
We briefly describe the two main ideas behind our lower and upper bounds. The first explains why finding a basis requires time, while the second explains why determining the isomorphism type can be done in time.
The lower-bound idea. The main difficulty in finding a basis is that the names of the group elements reveal no information about their algebraic structure. To formalize this intuition, we compare the actual execution of an algorithm with an idealized symbolic execution.
In the symbolic execution, we treat every element computed by the algorithm as a formal sum of unknown vectors. Whenever a new formal sum is obtained, we assign it a fresh random label. The same label is reused only when exactly the same formal sum appears again. Thus, as long as two distinct formal sums do not represent the same group element, the labels seen by the algorithm reveal no information about the hidden vectors.
In this idealized execution, the algorithm cannot choose a basis more effectively than by choosing independent uniformly random vectors. Its success probability is therefore at most the probability that r independent uniformly random binary vectors form a basis.
It remains to compare the symbolic execution with the actual execution. The two executions can differ only if two distinct formal sums evaluate to the same group element. If the algorithm produces at most such expressions, there are at most pairs of expressions. For each pair, the probability of such a collision is . Hence, by a union bound, the probability that any collision occurs is at most . This quantity remains small when , which gives the square-root lower bound.
The upper-bound idea. For the upper bound, consider a p-group of order . Suppose its cyclic decomposition contains factors of orders . Multiplying every element of by gives the subgroup . Under this operation, every cyclic factor of order disappears, while a factor of order , for , becomes a cyclic factor of order .
The important observation is that the rank of is at most . Indeed, every cyclic factor that survives in had order at least in , and therefore contributed at least two powers of to . Consequently, there can be at most surviving factors.
We can therefore apply the rank-sensitive basis algorithm to pP. Since pP has rank at most a/2, its running time is, up to logarithmic factors, at most . Once the cyclic factors of pP are known, the known order of P determines how many factors of order p disappeared when passing from P to pP. Thus, to determine the isomorphism type of P, we do not need to find generators for these missing order-p factors; we only need to determine how many there are. This is what allows the isomorphism-type problem to be solved faster than the explicit-basis problem.
Section 2 introduces the algebraic facts and computational model used throughout the paper. Section 3 formalizes the symbolic execution described above, and Section 4 uses it to prove Theorem 1.1. Section 5 develops the upper-bound argument and proves Theorem 1.2. Finally, Section 6 gives the matching lower bound for the decision problem and discusses the consequences for computing explicit isomorphisms.
2 Background and computational conventions
2.1 Cyclic decompositions, types, and bases
We use additive notation: the identity is 0, and is the sum of copies of for a nonnegative integer . The order of an element , denoted by , is the least positive for which . We write for the subgroup generated by a set or list . A finite direct sum, denoted by , is a Cartesian product with addition in each coordinate; it is also called a direct product.
Every finite Abelian group is a direct product of cyclic groups of prime-power order. Two such groups are isomorphic if and only if the lists of these prime-power orders, including repetitions, agree after sorting. Our algorithm computes this list. We recall the classification theorem below; see Shoup [9, Section 6.6] for a proof.
Theorem 2.1 (Fundamental theorem of finite Abelian groups). Let be a finite Abelian group of order , where ranges over the prime divisors of . For each such , the elements whose orders are powers of , together with , form a subgroup of order . Moreover, .
For each there is a unique nonincreasing list of positive integers such that . The sum of the entries in this list is .
Theorem 2.1 uniqueness says that two groups are isomorphic exactly when these lists agree for every prime. We call the collection of lists the type. Each list is a partition of , meaning a nonincreasing list of positive integers summing to . The subgroup is called the p-primary component, or the Sylow p-subgroup; no further facts about Sylow theory will be needed.
A basis records elements realizing a cyclic decomposition. More precisely, a tuple of nonidentity elements is a basis if every has a unique expression
For a p-group, the basis-element orders are exactly the orders of the cyclic groups in the decomposition given by Theorem 2.1. For a general group, bases can also combine factors of relatively prime orders. Our algorithm records the prime-power decomposition, and the lower bound uses only 2-groups, so this choice does not affect the results.
Example 2.2. The group has order and type at the prime 2. Its four coordinate vectors form a basis. If its 128 elements are renamed by arbitrary labels, the type remains , but the labels of those coordinate vectors are hidden. Producing the four integers and producing four suitable labels are different tasks.
2.2 Multiplication by a prime and rank
The upper bound needs a measure of how many cyclic factors remain after multiplication by p. For an Abelian p-group K, define
Both are subgroups: the first is the image of multiplication by p, and the second is its kernel. The subgroup consists of the identity and the elements of order p.
The quotient and the subgroup are vector spaces over : addition is their group operation, and scalar multiplication is repeated addition modulo . This is well defined because multiplication by is zero in each group. If has nontrivial cyclic factors, each factor contributes one copy of to both and . By Theorem 2.1, both vector spaces therefore have dimension . We call this number the rank of and write . The trivial group has rank zero.
For example, the group in Example 2.2 has rank four because which is isomorphic to . Its image under multiplication by two is isomorphic to , which has rank two. The two factors of order two have disappeared entirely.
Not .
One useful consequence will also control the algorithm on unsuccessful sampling runs. If U is a subgroup of an Abelian p-group K, then is a vector subspace of . The dimension interpretation above gives
Finally, an integer annihilates a group if its multiple of every element is zero. The exponent is the least positive such integer. An Abelian p-group has exponent , where h is the largest entry in its type.
2.3 Input, output, and complexity conventions
The input supplies the group order . Each group element has a distinct label, and we identify the set of labels with . Given two labels, we can perform a group addition to obtain the label of their sum. Choosing a uniform label therefore samples a uniform group element without performing any group additions. Labels and indices use bits. We measure both the number of group additions and the total running time. For the upper bounds, each group addition takes one unit of time, and ordinary computation is charged in a random-access machine. Polynomial factors in arising from arithmetic and sorting are included in the notation.
For the lower bounds, we charge only group additions. Every label is available for free, together with a distinguished identity label . All comparisons, random choices, and other computation are free. The algorithm may choose the elements to be added using the numerical values of their labels, including labels it has never used before. Thus, the lower bounds apply even to algorithms that perform arbitrary computations on labels and choose arbitrary group elements as operands.
An explicit basis must be output as labels of group elements. For a group isomorphic to , this means exactly labels. If the algorithm first constructs formal expressions for the basis elements, the group additions needed to evaluate those expressions and obtain their labels must also be counted. The same requirement applies if the output is a procedure for computing the basis elements. If a basis convention permits identity elements, these can be removed by comparison with the supplied identity label.
An algorithm performing at most q group additions can be represented by a decision tree. Each internal node specifies two labels to be added, its outgoing edges correspond to the possible labels of their sum, and its leaves specify outputs. Fixing the random choices makes the tree deterministic. We define its behavior arbitrarily on answer sequences that cannot arise from a genuine group and terminate every execution after at most q additions. This allows us to run the same tree with the symbolic addition procedure defined below, even when its answers do not describe a genuine group.
3 An unconditional symbolic comparison
Fix an Abelian group of order . Assume that for every , where is fixed. We use for the basis lower bound and for the isomorphism lower bound.
The elements of are presented to the algorithm using labels from . To assign the labels, choose a bijection uniformly at random, subject to . Thus, is the group element represented by label , and is the label of the identity.
The algorithm is given the labels but not the map . When it adds the elements labelled x and y, it receives the label
In other words, the returned label represents the sum of the two corresponding elements of H. The algorithm may use the numerical values of the labels in its computations, but the assignment of labels to elements is random.
To analyze what the algorithm can learn from group additions, we simulate its execution using formal sums of symbols , with coefficients taken modulo . We associate a formal sum with each label used in the simulation. We assign 0 to the identity label and, whenever the algorithm chooses a label that has not yet been assigned a formal sum as an operand or an output element, we assign to it the next unused symbol . When the algorithm requests the sum of two labelled elements, we add their formal sums and return the label associated with the result. The algorithm sees only the labels, not the formal sums. The precise rules for assigning labels are given below.
For example, suppose labels x, y, and z are associated with , , and , respectively. When , adding the elements labelled z and x returns label y, because . In general, two formal sums are considered equal if and only if all their coefficients agree modulo .
No elements of are used during this simulation. We first complete the simulated execution, including all the algorithm's addition requests, the returned labels, and the final output. Afterwards, we replace each symbol by an independently chosen uniform element . A formal sum then represents the element of .
Two distinct formal sums may represent the same element of H after this substitution. We call this an unexpected equality. We bound the probability of such equalities using the independent choices of the elements . The formal sums themselves are already fixed before these elements are chosen.
These independent choices do not define the random bijection : a bijection assigns distinct group elements to distinct labels, whereas independent choices may repeat. They are used only to analyze the simulation. We prove below that the simulated execution and an execution with a uniformly random labelling of H can be arranged to agree unless an unexpected equality occurs.
3.1 The symbolic simulation
We now give the precise rules for the simulation described above. A formal expression is a finite sum , where the are formal symbols and the coefficients belong to . We add expressions by adding their coefficients modulo . Two expressions are equal if and only if all their coefficients agree modulo . These expressions do not yet represent particular elements of .
Fix the algorithm’s random choices, so that its behavior is deterministic given the answers to its addition requests. We maintain a record that associates labels with formal expressions. We call a label registered once it has been assigned an expression. Different registered labels always have different expressions. Initially, only the identity label is registered, with .
The simulation follows three rules.
-
When the algorithm requests an addition, process the first operand label and then the second. If an operand label has not been registered, assign to it the next unused symbol
-
Add the two operand expressions. If the resulting expression already has a label in D, return that label. Otherwise, choose a label uniformly among all unregistered labels, assign the resulting expression to it, and return it.
-
When the algorithm terminates, process its output labels in their output order. Assign the next unused symbol to each output label that has not yet been registered.
Once a label has been assigned an expression, that assignment never changes. The simulation records the requested additions, the returned labels, the assignments in D, and the final output.
Since the algorithm’s random choices are fixed, the only randomness in this simulation is the choice of unused labels in the second rule.
Example 3.1. Take and suppose the algorithm requests the addition of two distinct, previously unregistered labels and . We assign and . Their addition returns a new label , with . If the algorithm subsequently adds the elements labelled and , the simulation returns , because . This answer follows from the rules for formal addition.
After completing the simulation, choose independent uniform elements of H, independently of all label choices made during the simulation. Replace each formal symbol by . This defines the evaluation
The assumption for every ensures that reducing coefficients modulo does not change the evaluated group element. Evaluation also preserves addition.
Let be the set of distinct expressions registered during the simulation, including 0 and the expressions assigned to output labels. Two different expressions in may evaluate to the same element of H. We call such an equality a collision, or an unexpected equality, and write Bad for the event that at least one occurs. Thus,
The equality in the example is not a collision: the expressions and are already formally equal.
If the algorithm performs at most q group additions and outputs k labels, then
Indeed, each addition registers at most two operand labels and one result label. The output introduces at most k further labels, and the identity contributes one more.
The algorithm may also compute with or compare other labels. These labels need no assignment until they are used as operands or included in the output, since such local computations do not use the group operation. We use the simulation when , which guarantees that an unused label is available whenever one is needed.
3.2 Comparing the actual and simulated executions
Since is a bijection, distinct labels represent distinct group elements: if , then . In contrast, the independent elements used to evaluate the formal symbols may repeat. Thus, the actual execution and the symbolic simulation are not identical experiments.
We will generate the two executions together, while preserving the correct distribution of each one separately. Such a joint construction is called a coupling. Our construction keeps the two executions in agreement unless a collision occurs among the evaluated formal expressions.
Lemma 3.2 (Coupling). Suppose . The symbolic simulation, together with its independent random evaluations, can be coupled to an actual execution on a uniformly random labelling of H so that, whenever Bad does not occur, the requested additions, returned labels, and outputs are identical. Moreover, in this case,
for every registered label .
Proof. We construct the random bijection gradually, assigning a group element to a label only when needed. Initially, . At every stage, all bijections extending the assignments already made must remain equally likely.
For this proof, we may also choose when the formal symbol is first introduced. This gives the same symbolic experiment as choosing all the after the simulation: each is chosen independently and uniformly from H, and the symbolic simulation never uses these values to choose its answers.
We try to keep both executions identical and to maintain for every registered label. We declare a divergence if these conditions can no longer be maintained.
A new operand or output label. Suppose the executions still agree, and has been assigned on labels. Let be a new label chosen by the algorithm as an operand or included in its output. In a uniformly random bijection, must be uniform among the elements of that have not yet been assigned to labels.
The simulation assigns the next unused symbol to . Choose its value independently and uniformly from all of . If has not yet been assigned to a label, set . Otherwise, declare divergence and choose uniformly among the unused elements of .
This rule gives the correct distribution for . Indeed, for any unused element , conditional on the preceding history, the probability that is
The first term corresponds to choosing . The second corresponds to choosing an already assigned element and then choosing a as the replacement.
If divergence occurs, equals the value of an earlier registered expression. That expression is different from the new symbol , so this gives a collision in the symbolic simulation. This argument also applies to output labels that were not used earlier.
An addition answer. Suppose the executions still agree and the algorithm requests the addition of labels and . Let . Because evaluation preserves addition, the actual sum has value . If already has a registered label, both executions return that label. Otherwise, the simulation chooses a uniformly random unregistered label and assigns . This choice is made without using .
If has not yet been assigned to a label in the actual execution, set and return there as well. This preserves the correct distribution of the random bijection: the label of a specified unused group element is uniform among the unregistered labels.
If is already assigned to a label, the actual execution returns that existing label, whereas the simulation returns the new label . Declare divergence. The expression associated with the existing label is different from , but has the same evaluation. Thus, a collision has occurred.
Completing the executions. After a divergence, continue the actual execution by extending its partially assigned bijection uniformly as needed. Continue the symbolic simulation using its original rules, choosing new answer labels without consulting the values .
Each execution therefore retains its required distribution. Every first divergence produces a collision in the symbolic simulation. Consequently, if Bad does not occur, the executions and outputs agree, and holds for every registered label. Complete uniformly on any remaining labels.
Throughout this construction, the symbolic experiment retains its original distribution; we never condition it on the absence of collisions.
The lemma reduces the analysis of the actual algorithm to two questions: how likely a collision is, and how likely the evaluated output of the symbolic simulation is to form a basis. We answer these questions next for binary vector spaces.
4 The square-root basis lower bound
Throughout this section, and . Let be the distribution on labelled copies of obtained by choosing a bijection uniformly at random, subject to .
We use the symbolic simulation of Section 3, with coefficients modulo two. For now, fix the algorithm's random choices. Let T record the complete simulated execution: the requested additions, the returned labels, the assignments of formal expressions to labels, and the output.
As before, are formal symbols. After the simulation is complete, we assign independent uniform vectors to these symbols and evaluate the formal expressions. All lower bounds below count group additions alone and therefore also apply to the total running time.
4.1 Collisions and the simulated output
The algorithm may choose each addition based on the answers to earlier additions. Nevertheless, the symbolic simulation does not use the vectors to determine its answers. Thus, after fixing T, all the formal expressions are fixed, while the vectors remain independent and uniform in V.
Lemma 4.1 (Unconditional collision bound). If the symbolic simulation registers at most M distinct formal expressions, then
Proof. Fix the complete record of the symbolic simulation. Let and be two distinct registered expressions. Since their coefficient lists differ, we can write with at least one coefficient equal to one. Choose an index such that . If we fix all the vectors except , then
The second term is fixed, and is uniform in . Adding a fixed vector to a uniform vector gives another uniform vector. Consequently, . There are at most pairs of distinct registered expressions. By the union bound,
This holds for every possible T. Averaging over T proves the stated bound. We have not conditioned on the absence of collisions.
We next examine the probability that the evaluated output is a basis. First consider independent uniform vectors in . After linearly independent vectors have been chosen, their span contains of the vectors in V. The next uniform vector lies outside that span with probability . Therefore, the probability that all r vectors form a basis is
The following lemma shows that choosing formal sums without using their values in V cannot increase this probability.
Lemma 4.2 (Simulated output probability). The evaluations of the r output expressions in the symbolic simulation form a basis of V with probability at most .
Proof. Fix T, and suppose the simulation introduced the symbols . Write the output expressions as
and let be their coefficient matrix over . Since is fixed, is fixed independently of the random vectors . If the row rank of is less than , some nonzero linear combination of its rows is zero. The same combination of the evaluated vectors is then zero. These vectors are linearly dependent and cannot form a basis.
Suppose instead that has row rank . Choose columns forming an invertible matrix. Fix the vectors corresponding to all the other columns. For any prescribed output tuple , the equations
now have exactly one solution for the remaining vectors . Indeed, we can solve the invertible linear system separately in each coordinate of . The remaining vectors are independent and uniform in . Thus, every output tuple in has probability . The evaluated output vectors are therefore independent and uniform in , and their probability of forming a basis is exactly .
For every fixed T, the basis probability is consequently either zero or . Averaging over T proves the lemma.
Both lemmas use the original independent choices of the vectors . We must not first condition on the absence of collisions. For example, two independent uniform vectors in form a basis with probability 3/8. If we condition on their being distinct and nonzero, they form a basis with probability one. Thus, the conclusion of Lemma 4.2 need not hold after such conditioning.
4.2 From the simulation to an addition lower bound
By Lemma 3.2, whenever Bad does not occur, the actual and simulated executions have the same output labels, and those labels represent the evaluated output expressions. Therefore, if the actual algorithm succeeds, either the evaluated simulated output forms a basis or Bad occurs. Indeed, let A be the event that the actual output is a basis, let S be the event that the evaluated simulated output is a basis, and put B = Bad. Since the two outputs represent the same group elements whenever B does not occur,
Thus, actual success implies that either the evaluated simulated output is a basis or Bad occurs. Taking probabilities gives . We bound these two probabilities separately.
Recall that is the distribution on labelled copies of obtained by choosing a bijection uniformly at random, subject to .
Theorem 4.3 (Quantitative success bound). Let an algorithm perform at most q group additions and output r labels. If , then
For a randomized algorithm, the probability also includes its internal random choices, and the bound of q additions must hold on every execution.
Proof. First fix the algorithm’s random choices. Use the joint construction from Lemma 3.2. By (2), the simulation registers at most distinct expressions. Lemma 4.2 bounds the first probability by , and Lemma 4.1 bounds the second by . This proves (4) for every fixed choice of the algorithm’s random bits. Averaging over those choices proves the randomized statement.
Proof of Theorem 1.1. For , equation (3) gives . An algorithm that succeeds with probability at least 2/3 on every labelling also has average success probability at least 2/3 under . Suppose first that . By Theorem 4.3,
Using , we obtain .
In the remaining case, , so , which is stronger. Thus, the algorithm requires group additions in the worst case.
5 A fourth-root algorithm for isomorphism type
Computing the isomorphism type requires only the orders of the cyclic groups in a direct-product decomposition. For each prime p, we recover this information for the p-primary subgroup P from the structure of pP and the known order of P. In particular, we determine the number of cyclic groups of order p without finding elements that generate them.
We first explain this reconstruction. We then state the existing basis-construction algorithm that we use to determine the structure of pP. Finally, we show how to obtain a small random list of generators for pP, as required by that algorithm.
5.1 Recovering a component from its image
Return to Example 2.2. If has type , then has type . Increasing these surviving exponents by one recovers . Since , the missing exponents must sum to . Every missing exponent was one, so there are exactly two missing factors. This reasoning works for every prime.
Lemma 5.1 (Reconstruction and rank). Let , and suppose the type of is , with each . Then
where the number of additional order-p factors is
Moreover, .
Proof. By Theorem 2.1, is a direct sum of cyclic groups of orders . Multiplication by acts separately on each factor. If , its image is cyclic of order ; if , its image is trivial. Thus every nontrivial factor of corresponds to exactly one factor of with exponent . All remaining factors of have order .
Orders multiply in a direct sum, so the sum of the exponents of all factors of equals . Subtracting the known exponents proves (5). Finally each of the surviving factors uses at least two powers of in . Therefore .
The useful bound is on the rank of , not on its order. For example, if , then , which can be much larger than . A generic bound depending only on would therefore be insufficient. We need the dependence on rank in the next proposition.
5.2 The existing rank-sensitive basis routine
Given a basis , where has order , every group element can be written uniquely as , . The integers are called the coordinates of in this basis. Given and the basis, finding these integers is called the generalized discrete-logarithm problem.
Sutherland’s algorithms [10] use this task to build a basis from generators. We use their published complexity bounds as an external algorithmic theorem; the remaining reduction is proved here.
Proposition 5.2 (Consequence of Sutherland's algorithms [10]). Given a prime p and a finite list S generating an Abelian p-group K of rank s, a basis and its element orders can be computed deterministically in
time, if and group operations take unit time. Neither nor s needs to be given as input.
Proof. Derivation from Sutherland [10]. We use Algorithms 1 and 4 and Propositions 1–2 of that paper, including the discrete-logarithm consequence in its Corollary 1. For nontrivial K, we have . Write and let its exponent be . The discrete-logarithm cost is (see Section A in the Appendix)
The cost of constructing a basis of K from the generating set S, also summarized in equation (3) of that paper, satisfies
for fixed , counting group operations.
Set . Since , the first bound gives . Substitution into the second gives . This is bounded by , as claimed. Element orders can be found by repeatedly multiplying by until the identity is reached.
5.3 Obtaining generators by uniform sampling
Let denote the subgroup of consisting of elements whose orders are powers of . To apply the basis-construction algorithm to , we need a generating list for this subgroup. We obtain a small such list from random samples of , as described below, without listing all elements of .
Lemma 5.3 (Random generation). If K is a finite Abelian p-group of rank s and , then k iid uniform samples fail to generate K with probability at most .
Proof. Let be elements of . Each determines a coset in the quotient group . We show that if these cosets span the vector space over , then generate . Let be the subgroup generated by the list. Spanning the quotient means , so . Iterating gives for every positive integer . Choose annihilating . Then , which means . The converse is immediate by taking images in the quotient.
Recall from Section 2.2 that . Take independent uniform samples from and consider their cosets in . Since every coset has the same number of elements, these cosets correspond to independent uniform vectors in . Suppose these vectors do not span . We show that there is a nonzero linear map such that for every . Choose a basis of their span, where , and extend it to a basis of . Define . Every sampled vector is a linear combination of , so is zero on every sampled vector. However, , so is not the zero map.
There are nonzero linear maps from to : a linear map is determined by its values on the basis vectors, and each value has choices. For any fixed nonzero map , exactly of the vectors satisfy . Thus, a uniform vector satisfies this equality with probability . By independence, all sampled vectors satisfy it with probability . Since failure to span requires at least one nonzero map to be zero on all samples, the union bound gives
If , the quotient is the zero vector space, which is spanned by every list, so the failure probability is zero.
We also need to sample the image without knowing a basis of the input. Write , where . Multiplication by sends every primary component corresponding to a prime other than to zero. One further multiplication by gives the desired image.
Lemma 5.4 (Sampling a primary image). Write . For uniform , the element is uniform in and can be computed with table queries.
Proof. Set , so that the displayed scalar is . By Theorem 2.1, multiplication by kills every primary component other than : the order of each such component divides . On , multiplication by is invertible because . Explicitly, an integer with gives its inverse. Following this map by multiplication by therefore maps onto .
For any homomorphism, the preimages of a point in its image form a coset of its kernel. All these preimage sets have equal size, so the image of a uniform element is uniform. Finally, the scalar is at most . Repeated doubling and addition, using its binary expansion, computes its multiple of in table queries.
For example, in , the order is 24, and the scalar for is . It kills the component and maps uniformly onto its even residues . No element of either component needs to be identified in advance.
5.4 The algorithm
We now have all three ingredients: Lemma 5.4 produces uniform samples, Lemma 5.3 makes a short list sufficient, and Proposition 5.2 processes that list. Lemma 5.1 then recovers the missing factors using only integers. See Algorithm 1.
If , return the trivial type. Otherwise factor and let be the number of distinct prime divisors. We can factor using the randomized algorithm of Lenstra and Pomerance [7], whose expected running time is ; stopping it after twelve times an upper bound on this expectation gives a running time of with failure probability at most .
For each , with the exact power of dividing , perform the following steps.
- Set
Draw independent uniform labels . For each one, compute as in Lemma 5.4. Let be this list of image elements.
-
Apply Proposition 5.2 to . It computes a basis of the subgroup and the orders of its nonidentity basis elements.
-
Form the list , and append
copies of 1. Sort this list in nonincreasing order and use it as the p-primary type. If , report failure.
Return the collection of lists, one for each prime. For an empty basis, the sum in the last step is zero. An explicit failure or an incorrect list counts as an unsuccessful run.
Algorithm 1 Computing the isomorphism type of a finite Abelian group
Require: A finite Abelian group G of known order n > 1, with access to group addition and uniform sampling.
Ensure: A collection of primary exponent lists, or FAILURE.
1: Factor , where is the set of distinct prime divisors of n.
2:
3:
4: for each do
5:
6: an empty list
7: for do
8: Choose a uniform random label , independently of previous choices.
9:
10: Append y to .
11: end for
12: Use Proposition 5.2 to compute a basis of .
13: Let be the orders of its nonidentity basis elements.
14:
15:
16: Append copies of 1 to .
17: Sort in nonincreasing order.
18: Insert into .
19: end for
20: return
In the Algorithm, for an empty basis, we take and the sum defining to be zero. Each returned list specifies the exponents of the cyclic groups in the proposed -primary decomposition.
5.5 Correctness and running time
Proof of Theorem 1.2. We first show that all sampled subgroups equal their intended images with high probability. We then bound the cost on every run, including runs on which some image is not generated.
Correctness. Put . By Lemma 5.1, . Lemmas 5.4 and 5.3 give
A union bound over the primes shows that all images are generated with probability at least 5/6. On this event, the basis orders returned by Proposition 5.2 describe each whole image. By Lemma 5.1, and specifically (5), the reconstructed primary types are correct. By Theorem 2.1, their collection is the type of .
For two groups of equal order, run this procedure on each and compare the lists. The chance that either type is incorrect is at most 1/3, again by a union bound. When both are correct, their comparison decides isomorphism by Theorem 2.1.
Cost of the group computations. Since and , the total number of samples is , which is polynomial in . Lemma 5.4 bounds the cost of forming each image sample. Even on an unsuccessful run, is a subgroup of . Equation (1) therefore gives . By Proposition 5.2, the total basis-subroutine cost is at most
Every summand is at most , and there are at most of them. Thus this cost is . When , its summand is one. Reconstruction and sorting of the integer lists take polynomial logarithmic time.
Factoring and elementary oracle operations. We can factor using the randomized algorithm of Lenstra and Pomerance [7] that runs in time or by Costa and Harvey [4] deterministic algorithm that runs in time , which is sufficient here for factoring the known order . If the identity is not supplied, compute for any input label , using the fact that every element order divides . If an imported routine needs an inverse, compute by repeated doubling. These simulations add only logarithmic factors to the cost. Together, the three cost estimates prove Theorem 1.2.
6 Decision lower bounds and explicit isomorphisms
6.1 The matching fourth-root decision lower bound
Theorem 1.1 cannot give a decision lower bound on elementary Abelian 2-groups: every promised input of order has the same type. To make decision hard, we need two different types of the same order. We use the pair from Bshouty [1]. This result is included for completeness and to make its relation to the new upper bound explicit.
The groups will be products of factors of orders four and two. They satisfy the same formal identity , but their images under doubling have different sizes. For order 16, the pair is and ; their doubled images have sizes four and two. Detecting the difference requires an unexpected equality among expressions.
Proposition 6.1 (Bshouty's decision lower bound). For , let the hidden group be chosen with equal prior probability from
Conditional on this choice, give the algorithm a uniform random relabeling with a fixed identity label. Distinguishing the two cases with average success probability at least 2/3 requires queries.
Proof. We use the same symbolic simulation for both groups and compare each actual execution with this simulation. The simulation does not depend on which group was chosen. Thus, any advantage in distinguishing the groups must come from an unexpected equality between the evaluations of distinct formal expressions.
A common symbolic simulation. First fix the algorithm's random coins. Use the symbolic simulation from Section 3, with coefficients in . The two groups have the same order, and multiplying any element of either group by four gives zero. The simulation therefore has the same distribution in both cases: its answers depend only on formal sums and random choices of labels, without using the values assigned to the formal symbols.
A decision algorithm outputs a bit rather than a group label. Thus, by (2), an algorithm performing at most group additions registers at most distinct formal expressions, including the expression 0 for the identity. Assume first that .
Collision probabilities. Fix the complete symbolic transcript. The formal expressions are now fixed, while the elements assigned to the formal symbols remain independent and uniform in the chosen group.
Consider the difference of two distinct formal expressions. If some coefficient is odd, multiplication by that coefficient is a bijection on . The corresponding multiple of an independent uniform element is therefore uniform in . Adding the other terms preserves uniformity, so the two expressions have the same evaluation with probability .
Otherwise, all coefficients are even, and at least one coefficient is two. Doubling a uniform element of gives a uniform element of , because every element of has the same number of preimages under doubling. The other terms also belong to . Their sum with the independent uniform term is therefore uniform in , so the collision probability is . Here, , and . In either coefficient case, a pair collides with probability at most in and at most in .
There are at most pairs of distinct registered expressions. Applying the union bound and then averaging over the symbolic transcript, as in Lemma 4.1, bounds the probability of Bad in each group by
Success when the two groups are equally likely. Choose uniformly. Since the symbolic simulation is independent of , the bit it outputs equals with probability exactly .
For each fixed j, Lemma 3.2 compares the actual execution on a uniformly random labeling of with the symbolic simulation. Outside Bad, their outputs agree. Therefore, if the actual execution outputs j, either the simulation also outputs j or Bad occurs. The actual success probability can consequently exceed the simulated success probability by at most .
Averaging over the two choices of j gives
where we used . This bound holds for every fixed choice of the algorithm's random coins. Averaging over those coins therefore gives the same bound for randomized algorithms.
An algorithm that succeeds with probability at least on every input also succeeds with probability at least under this random choice of group and labeling. Hence,
which implies .
Finally, if , then , which is stronger than the required lower bound.
The two groups in Proposition 6.1 are not isomorphic: an isomorphism would map their doubled images bijectively, but those images have different sizes. Hence distinguishing them is a special case of isomorphism decision.
Corollary 6.2. Two finite Abelian groups of known order n can be tested for isomorphism with probability at least 2/3 in time. Every randomized algorithm with this success guarantee requires group additions in the worst case along the orders . Thus, the time bound is optimal up to factors polynomial in .
Proof. The upper bound is Theorem 1.2. For the lower bound, compare the unknown group in Proposition 6.1 with a canonical copy of , represented by coordinates modulo four. Its table answers can be computed without querying the unknown input. An isomorphism tester would therefore solve the distinction in Proposition 6.1 with no greater number of unknown-table queries.
6.2 What follows for explicit isomorphisms
Deciding whether two groups are isomorphic does not require producing a map between their elements. We now consider an algorithm that constructs an isomorphism . For each , let denote the vector with a 1 in position and zeros elsewhere. The elements form a basis of . Therefore, constructing the map and obtaining the actual labels of these images together require enough group additions to construct a basis.
Corollary 6.3 (Constructing and evaluating an isomorphism). Suppose a randomized algorithm, given a group , outputs a description of an isomorphism with probability at least 2/3 on every relabeling. Count all group additions used to construct this description and to obtain the actual labels of . Their total worst-case number is , where .
If these labels can be obtained from the description without further group additions, then constructing the description alone requires group additions in the worst case.
Proof. Run the algorithm and evaluate its output on . Whenever the algorithm produces a correct isomorphism, the resulting labels form a basis of . This procedure therefore constructs a basis with probability at least 2/3 on every relabeling. Theorem 1.1 implies that it requires group additions in the worst case.
If an algorithm instead supplies a map , obtaining a basis by this argument requires finding elements such that . These elements form a basis, but finding them may require additional group additions. Those additions must also be counted. Thus, the lower bound applies to constructing the map and obtaining the basis labels together; it does not necessarily apply to constructing the description of the map alone.
References
[1] Nader H. Bshouty. Sublinear time algorithms for abelian group isomorphism and basis construction, 2025.
[2] Johannes Buchmann and Arthur Schmidt. Computing the structure of a finite abelian group. Mathematics of Computation, 74(252):2017–2026, 2005.
[3] Lijie Chen and Bin Fu. Linear and sublinear time algorithms for the basis of abelian groups. Theoretical Computer Science, 412(32):4110–4122, 2011. Earlier version: ECCC TR07-052, Revision 2, 2008.
[4] Edgar Costa and David Harvey. Faster deterministic integer factorization, 2012.
[5] George Karagiorgos and Dimitris Poulakis. Linear time algorithms for the basis of abelian groups. In Computing and Combinatorics, volume 6842 of Lecture Notes in Computer Science, pages 456–466. Springer, 2011.
[6] Telikepalli Kavitha. Linear time algorithms for abelian group isomorphism and related problems. Journal of Computer and System Sciences, 73(6):986–996, 2007.
[7] Jr. Lenstra, Hendrik W. and Carl Pomerance. A rigorous time bound for factoring integers. Journal of the American Mathematical Society, 5(3):483–516, 1992.
[8] Victor Shoup. Lower bounds for discrete logarithms and related problems. In Advances in Cryptology—EUROCRYPT '97, volume 1233 of Lecture Notes in Computer Science, pages 256–266. Springer, 1997. Revised version available at https://www.shoup.net/papers/dlbounds1.pdf.
[9] Victor Shoup. A Computational Introduction to Number Theory and Algebra. Cambridge University Press, 2 edition, 2008.
[10] Andrew V. Sutherland. Structure computation and discrete logarithms in finite abelian p-groups. Mathematics of Computation, 80(273):477–500, 2011. Algorithm and proposition numbering follows arXiv:0809.3413v3.
[11] Edlyn Teske. The Pohlig–Hellman method generalized for group structure computation. Journal of Symbolic Computation, 27(6):521–534, 1999.
[12] N. Vikas. An algorithm for abelian p-group isomorphism and an algorithm for abelian group isomorphism. Journal of Computer and System Sciences, 53(1):1–9, 1996.
A The Discrete-Logarithm Cost
Write and let its exponent be . The discrete-logarithm cost is
Here we explain why the running time includes the term . The approach uses a meet-in-the-middle search: as in the two-sum problem, they construct two lists and seek one element from each whose sum equals the target element. First, suppose that every basis element has order . Given an element , we want to find coefficients such that . There are possible coefficient tuples. Suppose first that is even. Form a list of all elements and a second list of all elements , letting the coefficients in each list range independently over . Store the coefficients together with each element. Each list has entries. An element appearing in both lists gives
so the stored coefficients give the desired expression for . Sorting the lists by element labels allows us to find a match in time. This is the baby-step giant-step method.
When is odd, we also split one coefficient into two parts. Specifically, with , every coefficient can be written as , where , . Assigning one part to each list keeps both list sizes .
Suppose has order and we want to find the coefficient in . We determine one base- digit at a time. Multiplying by gives , where is the first digit. Since has order , we can find by the meet-in-the-middle method above. We then subtract from and use the next lower power of to recover the next digit. Repeating this process determines . For several basis elements, the same idea reduces the computation to problems in which all basis elements have order .
Now to construct a basis from a generating set we do the following: For a finite Abelian p-group K, Sutherland's algorithm [10, Algorithm 4] constructs a basis from the generating set S one element at a time. It first chooses an element of largest order as the first basis element. Suppose the basis constructed so far is . For each remaining generator g, a modified discrete-logarithm computation finds coefficients and replaces g by . These coefficients are chosen so that h is either zero or independent of the current basis: the cyclic subgroup generated by h intersects the subgroup generated by only at zero. The algorithm discards zero elements, adds a remaining element of largest order to the basis, and repeats these reductions. Subtracting combinations of the chosen basis elements preserves the subgroup generated by the entire list. Therefore, when all remaining elements have become zero, the chosen elements are independent and generate K, so they form a basis.