3

So I’m making a program where:

I enter a subset $S$ of a group.

I add $S^{-1}$ (all the inverses in $S$) to $S$

I take $ab^{-1}$ with $a,b$ spanning $S$ and if this produces a new element, I add it to $S$.

If no new elements are produced, the algorithm terminates.

If new elements are produced, the process is repeated.

I implemented this into Java and while it works, it is not very efficient.

In general, is there a way to make this more efficient or is this it? (Not a way to make the code run faster but a more concise way to carry this out)

user62783
  • 349
  • 1
    Do you mean "I add to the subset all the inverses"? (Having trouble following your first sentence.) – 311411 Jan 02 '22 at 01:34
  • 1
    @311411 my bad, I see how that could be confusing, I took all the inverses in S and added them to S. Should’ve used parenthesis instead of a comma. In fact, I don’t even believe that step is necessary since I’m taking ab^-1 so all inverses will be present regardless. Guess that’s my first step – user62783 Jan 02 '22 at 02:07
  • want to link the explicit algo in java? odds are there are also some improvements to be made there. one thing i’m thinking is caching and reducing the number of calculations. Try performing the whole calculation by hand, which parts did you calculate that you perhaps didn’t need, or had previously computed, eliminate those – mdave16 Jan 02 '22 at 05:13
  • also is G fixed, or is G also a parameter? – mdave16 Jan 02 '22 at 05:14
  • What is the goal? Find a subgroup generated by $S$? – markvs Jan 03 '22 at 04:38
  • Does this answer your question? The linked algorithm seems to avoid a lot of unnecessary computations. – Pierre-Guy Plamondon Jan 05 '22 at 11:37

0 Answers0