• Aucun résultat trouvé

Blocks in Nearly Linear Time

Dans le document This page intentionally left blank (Page 111-117)

Further Low-Level Algorithms

5.5. Blocks of Imprimitivity

5.5.1. Blocks in Nearly Linear Time

The first nearly linear-time algorithm for computing blocks is given in [Beals, 1993a]. Here we reproduce a method from [Sch¨onert and Seress, 1994], copy-right c1994 Association for Computing Machinery, Inc. Reprinted by Per-mission. This method has the same worst-case estimate as Beals’s algorithm but is easier to implement and runs faster in practice. The algorithm uses some ideas and a subroutine of Beals.

Suppose thatG≤Sym() is transitive, and letαbe fixed. Forβ, let ¯βdenote the smallest block of imprimitivity containing{α, β}. Two elements β, γare calledequivalent, in notationβγ, if ¯β =γ¯. Clearly,∼is an equivalence relation on. We also introduce a binary relation,on:β ,γ if and only if ¯βγ¯. Then,is a partial order (we allow thatβ ,γandγ ,β for distinctβ, γ; this happens exactly whenβγ). Each block containingα is a union of equivalence classes. A block is minimal if it is the union of{α}

and exactly one other equivalence class. Our goal is to find a minimal block.

LetRbe a transversal forGmodGα. Forβ, letrβRbe the unique element ofRsatisfyingαrβ =β. Because the subgroups ofG containingGα are in one-to-one correspondence with the blocks of imprimitivity containing α, it is easy to see that ¯β is the orbit ofαin the groupGα,rβ, points in the orbits ofGαare equivalent, andγβ¯if and only ifrγ ∈ Gα,rβ.

Theorem 5.5.1. Suppose that a set S of generators for some transitive G ≤ Sym()is given and|| = n. Then a minimal block of imprimitivity can be computed in O(nlog3|G| +n|S|log|G|)time by a deterministic algorithm.

The algorithm runs much faster in the case when the orbits ofGαand the coset representativesrβ are already known. For example, this situation occurs when astrong generating set forGwas already computed.

Theorem 5.5.2. Suppose that the orbits of Gαare known and R is coded in a Schreier tree of depth l. Then a minimal block can be computed in O(nllogn) time by a deterministic algorithm.

We use Beals’s idea to compute ¯βas the orbit ofαinGα,rβrather than the component containing α in the graph {α, β}G, as in [Atkinson, 1975]

(cf. Exercise 5.6). Also, as in [Beals, 1993a], the algorithm consists of two phases: Construction and checking. In the case when the orbits ofGαare known, the construction phase always returns a minimal block. In the case when only arefinement of the partition ofinto orbits ofGαis known, the construction phase may return an incorrect answer. In this case, the checking phase returns an element ofGαthat collapses some sets of the known partition, and we re-turn to the construction phase. In fact, we use a small modification of Beals’s Verify Block routine for the checking phase (cf. Lemma 5.5.5).

This is an algorithm for which the claimed running times critically depend on the data structures used; in fact, the data structures we introduce are largely responsible for the nearly linear running time. Therefore, contrary to our general philosophy, we shall give a detailed description of the data structures and a pseudocode for the algorithm.

We start with our usual high-level description. The basic idea is that, while computing ¯β for someβ, we immediately abandon this computation as we encounter some γ,β for which we cannot exclude that ¯γ is aproper subset of ¯β, and then we start to compute ¯γ. Let H be asubgroup ofGα for which generators are already known. In the construction phase, we maintain a listL=(1, 2, . . . , k) of disjoint subsets of\{α}with the property that elements iniare already known to be equivalent, and1 -2- · · · -k. Also, each seti is aunion of H-orbits. Moreover, for eachi, we store a representativeλii. The listLis initialized asL=(1), where1 is an orbit ofHdifferent from{α}.

We always work in the last setkinLand try to compute ¯λk. To this end, we compute the imagesγrλk for allγk. Ifµ:=γrλkis not in{1} ∪1∪· · ·∪k

then we definek+1as theH-orbit ofµ, abandon the computation of ¯λk, a nd start to compute ¯λk+1for arepresentativeλk+1k+1. Ifµ=γrλki for somei < kthen we see thati⊆¯λk. Hence we redefinei as the union of the previousi, i+1, . . . , k, and we start the procedure ini. Finally, if all imagesγrλk are in{α} ∪kthen we stop the construction phase.

If the orbit structure of H is the same as the orbit structure of Gα then {α} ∪k is a minimal block (cf. Lemma 5.5.3). In the general case, we call Beals’s Verify Block routine, which checks that{α} ∪kis aminimal block or not; if not, it returns apermutationgGα\H with the property that the number of orbits ofH,gis strictly less the number of orbits ofH. We update Lto achieve that each setiis the union of orbits ofH,g, and then we return to the construction phase.

The pseudocode for the algorithm is as follows:

MinimalBlock[G]

Input:Generators forG≤Sym() and for HGα;Hmay be trivial.

Output:A minimal block of imprimitivity properly containing{α}.

(Note that G is primitive if and only if the output is.)

Step 1:Initialize: Compute coset representativesrβforGmodGαas words of length at most 2 log|G|over asetTT1G,|T| ≤log|G|;1:=ωH for some arbitraryω\{α};λ1:=ω;L:=(1).

Step 2::=last element of the listL=(1, . . . , k);λ:=representative of.

Step 3: for allγdo (i) Computeµ:=γrλ. (ii) ifµ ∈ {1} ∪1∪ · · · ∪k

thenadd a new setk+1toL: letk+1:=H-orbit ofµ;λk+1:=first element ofk+1;goto Step 2.

elseifµi,i <k

then i := i ∪ · · · ∪k;λi :=representative of largest (by car-dinality) of previous i, i+1, . . . , k; remove i+1, . . . , k; goto Step 2.

Step 4:Verify that{α} ∪is ablock. If not, computegGα\H. If yes, output{α} ∪.

Step 5:H:= H,g; updateLby possibly merging some of theiand adding points from\({α} ∪1∪ · · · ∪k) to achieve that1- · · · -kand eachiis the union ofH-orbits;goto Step 2.

We postpone details of Steps 4 and 5 until later.

It is clear from the description already given that, at any moment during the execution of the algorithm, eachi is the union of H-orbits. Also, using the remarks preceding Theorem 5.5.1, it is easy to see the following facts:

Lemma 5.5.3. (a) At any moment during the execution of the algorithm, each iis a subset of a∼-equivalence class and1- · · · -k.

(b) Suppose that Step 4 of the algorithm is entered and, at that moment, is the last element ofL andλ is the representative of. ThenαH,rλ ⊆ {α} ∪αGα,rλ; in particular, if H and Gα have the same orbits then {α} ∪is a minimal block of imprimitivity.

Proof. (a) We prove the two statements in (a) simultaneously, by induction on the number of executions of the loop in Steps 2 and 3. After 0 executions of this loop (i.e., after the initialization in Step 1), both statements are obviously

true. Suppose that the statements hold for the listL=(1, . . . , k); in partic-ular,kλ¯k =αGα,rλkfor the representativeλkofk. If a new setk+1is added toLthenk+1αGα,rλk, sok+1,k. Also, sincek+1 is an orbit of HGα, all elements ofk+1are equivalent. Similarly, if a final segment (i, i+1, . . . , k) ofLis merged theniαGα,rλk, soλi,λkfor the rep-resentativeλi ofi. Butλi -ν-λkfor allνi∪ · · · ∪k; therefore all suchνare equivalent.

(b){α} ∪is the union ofH-orbits and closed for the action ofrλ; hence it containsαH,rλ. Also, since the elements ofare equivalent,⊆¯λ=αGα,rλ. For the last assertion, we note that=αH,rλdepends only on the partition ofinto orbits ofH, and not onHitself sinceis the set containingαin the join of the two partitions defined by the orbits ofHand by the orbits ofrλin

the partition lattice of.

Next we describe the data structures used in the algorithm. We also give some further details of Steps 4 and 5 and prove the claimed bounds on the running time.

The coset representativesrβare stored in the usual Schreier tree data structure.

The sets 1, . . . , k are stored as linked lists. We maintain four lists of length k, named firstL, lastL, lengthL, a nd testL, and two lists of lengthn, named nextLand reprL. firstL[i] a nd lastL[i] contain the first and last ele-ments ofi, respectively;lengthL[i] is the cardinality ofi.reprL[ν], if de-fined, contains the indexi such thatνi. The listnextLcontains the links:

nextL[ν], if defined, is the successor ofνin the seti, forνLi(note that the setiis stored as a list in the computer, so it makes sense to talk about the suc-cessor ofν). The representativeλiofiwill always be the first element ofi. testL[i] gives the latest elementνofifor whichνrλi was already computed.

The orbits ofHare also stored in linked lists. We definefirstH,lastH,nextH, andreprHanalogously to the appropriate items forL.

The implementation of Step 3 is quite straightforward; therefore we re-mark only on one subcase. Supposeµ =γrλ was computed for someγ and, using the listreprL, we found thatµi for somei <k. The smallest index jsuch that|j| ≥ |j|for all j∈[i,k] can be determined from the list lengthL. Then we link the setsi, . . . , ksuch that the elements ofj come first; in this way, we can maintain the property that the coset representativerλ belonging to the first elementλof the new block was already applied to an initial segment of this new block, and the last element of this initial segment is given as testL[j].

We use the same “biggest comes first” linking strategy in Step 5. Suppose that Step 4 returned somegGα\Hsuch thatgcollapses some orbits of H;

our goal is to make the necessary merges of the setsi and orbits of H to maintain the properties described in Lemma 5.5.3(a).

Step 5:

(i) Order the entries oflengthLin decreasing order:

|j1| ≥ |j2| ≥ · · · ≥ |jk|.

(ii) fori =1 tokdo

iffirstL[ji] is bound (i.e., defined) then forallνji do

µ:=νg;

ifµ ∈ {α} ∪1∪ · · · ∪k

thenlink theH-orbit ofµtoji

elseifµl,l = ji

thenlink alls withfirstL[s] bound ands betweenl and ji toji; unbindfirstL[s].

(iii) Left-justify bound entries offirstL(i.e., write the entries offirstLthat are still defined in asequence); updatelastL,reprL,testL,lengthL,nextL.

(iv) Compute orbits of (new)H; updatefirstH,lastH,reprH,nextH.

At the end of Step 5, the sets inLare closed for the action ofg.

The following lemma plays a crucial role in estimating the running time.

Lemma 5.5.4. For eachν, the representativeλi of the setiL con-tainingνchanges at mostlogn times during the algorithm.

Proof. The representative may change only wheniis merged into alarger set in Step 3 or Step 5. At these occasions, since the representative of the new set is defined as the representative of thelargestoriginal setjthat was merged,

|| ≥ 2|i|for all setsi whose representative was changed. Clearly, such doubling of size can occur only at most logntimes.

Step 4 is handled by the following lemma. Recall that the input is a set \{α} such that all elements ofare known to be equivalent and a representativeλ. The set{α} ∪is closed for the action ofrλ.

Lemma 5.5.5. (a) In O(nl+n|S|)time, it can be decided whether{α} ∪is a block of imprimitivity.

(b) If{α} ∪is not a block of imprimitivity then some gGα\H can be constructed in O(nlog2|G| +n|S1|)time, where S1is the known generating set of H .

Proof. (a) Let:= {α}∪. We try to partitioninto disjointG-images of. Suppose that the disjoint sets=1, 2, . . . , j−1are already constructed;

we pickβj\(1∪ · · · ∪j1) and computerβj. Ifrβj\(1∪ · · · ∪ j−1) then we definej :=rβj; otherwise, we have∅rβirβj rβj for somei < j, which proves thatis not ablock. Since therβj are stored as words of length at mostl, this part of the algorithm runs inO(nl) time.

If the partition ofintoG-images ofsucceeds then we check that each generator ofGrespects this partition. This can be done inO(n|S|) time.

(b) Ifis not a block then we claim that:=αH,rλis not ablock either.

By Lemma5.5.3,. If=then obviouslyis not ablock. If thenλ\{α}\{α} ⊆ ¯λ, sois not ablock.

We repeat the algorithm described in part (a) withplaying the role of. This means that we try to partitionintoG-images ofand, if the partition succeeds, compute the action of the generators ofGon the sets in the partition. Since is not ablock, we shall encounterh1,h2Gsuch that∅ =h1h2h1. (Ifh1,h2 are found during the partition phase then h1 = rβi,h2 = rβj for some coset representatives; if they are found at the checking of the action of generators thenh1=rβis,h2=rβjfor somesS.) Definingg1:=h1h−12 , we have∅ =g1. We multiply outg1as a permutation. As in part (a), the time requirement so far isO(nl+n|S|).

After that, we use the algorithm in the proof of Lemma 4.4.2 to build a Schreier tree (S,T) of depth at most 2 log|H,rλ|, coding a transversal forH,rλmod H,rλα. This Schreier tree computation takes O(nlog2|G| + |S1|n) time.

Letβ, γsuch thatβg1=γ, and letwβ, wγbe the corresponding coset rep-resentatives from (S,T). In particular,wβ=wγ=. Theng:=wβg1w−1γGα and g =. Thus gH and αH,g αH; otherwise we would have αH,g,rλ=αH,rλ=, acontradiction.

Lemma 5.5.6.

(a) In O(nlog2|G| +n|S|)time, coset representatives rβas words of length l for some l ≤2 log|G|can be computed.

(b) The total amount of time spent in Step 3 is O(nllogn).

(c) The time spent in Step 4 is O(nlog3|G| +n|S|log|G|).

(d) The time spent in Step 5 is O(nlognlog|G|).

Proof. (a) This is proven by Lemma 4.4.2. Recall that, although a Schreier tree codes inverses of coset representatives, the setSof labels in the Schreier tree (S,T) constructed in Lemma4.4.2 is closed for inverses. Hence, after (S,T) is constructed, the coset representatives themselves can also be written as words inS.

(b) By (a), computing an imageγrλ takesO(l) time. By Lemma5.5.4, for each fixedγ, γrλ for someλis computed at most logn times; hence the total cost of these computations isO(nllogn). UpdatingreprLand the linking of lists costO(nlogn).

(c) Step 4 is entered at most log|Gα| times, since H increases between consecutive calls.

(d) Step 5 is entered always after a call of Step 4, that is, at most log|Gα| times. At one call, orderinglengthLcostsO(nlogn) whereas the linking and

updating of lists runs inO(n) time.

Lemma 5.5.6 immediately implies Theorem 5.5.1. Theorem 5.5.2 is obtained by combining Lemma 5.5.6(b) and Lemma 5.5.3(b). We also remark that within the time bounds claimed in Theorems 5.5.1 and 5.5.2,allminimal blocks con-tainingαcan be constructed.

Our running time estimate is overly pessimistic. It is dominated by the appli-cations of Lemma 4.4.2, which, in practice, are much faster than our worst-case estimate. Also, if the orbit structure ofGαis not known, afew (five in theGAP implementation) random Schreier generators may be computed to approximate Gα, and this seems to be enough: The construction phase may return a correct block of imprimitivity even in the case when the orbit structure ofHis not the same as the orbit structure ofGα, and in practice it is extremely rare that the output of the construction phase is incorrect.

Dans le document This page intentionally left blank (Page 111-117)