GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
% This file was created automatically from startsets.msk.1% DO NOT EDIT!2\Chapter{General concepts}34In this chapter, we first give a definition of relative difference5sets and outline a part of the theory. Then we have a quick look at6the way difference sets are represented in {\RDS}.78After that, some basic methods for the generation of difference sets9are explained.1011If you already read chapter "RDS:A basic example" and want to know12what "StartsetsInCoset" really does, you may want to read this13chapter.14The most important method here is15"PermutationRepForDiffsetCalculations" as this is the function all16searches start with. The main high-level function for difference set17generation in this chapter is "ExtendedStartsets".181920%%%%%%%%%%%%%%%%%%%%21\Section{Introduction}2223%\Input{rds}2425Let $G$ be a finite group and $N\subseteq G$. The set $R\subseteq G$26with $|R|=k$ is called a ``relative difference set of order27$k-\lambda$ relative to the forbidden set $N$'' if the following28properties hold:2930\beginlist%ordered{(a)}31\item{(a)} The multiset $\{ a.b^{-1}\colon a,b\in R\}$ contains32every nontrivial ($\neq 1$) element of $G-N$ exactly $\lambda$33times.34\item{(b)} $\{ a.b^{-1}\colon a,b\in R\}$ does not contain35any non-trivial element of $N$.36\endlist3738Relative difference sets with $N=1$ are called (ordinary) difference39sets. As a special case, difference sets with $N=1$ and $\lambda=1$40correspond to projective planes of order $k-1$. Here the blocks are41the translates of $R$ and the points are the elements of $G$.4243In group ring notation a relative difference set satisfies44$$45RR^{-1}=k+\lambda(G-N).46$$4748The set $D\subseteq G$ is called *partial relative difference set*49with forbidden set $N$, if50$$51DD^{-1}=\kappa+\sum_{g\in G-N}v_gg52$$5354holds for some $1\leq\kappa\leq k$ and $0\leq v_g \leq \lambda$ for55all $g\in G-N$. If $D$ is a relative difference set then ,obviously,56$D$ is also a partial relative difference set.5758Two relative difference sets $D,D'\subseteq G$ are called *strongly59equivalent* if they have the same forbidden set $N\subseteq G$ and if60there is $g\in G$ and an automorphism $\alpha$ of $G$ such that61$D'g^{-1}=D^\alpha$. The same term is applied to partial relative62difference sets.6364Let $D\subseteq G$ be a difference set, then the incidence structure65with points $G$ and blocks $\{Dg\;|\;g\in G\}$ is called the66*development* of $D$. In short: ${\rm dev} D$. Obviously, $G$ acts on67${\rm dev}D$ by multiplication from the right.6869If $D$ is a difference set, then $D^{-1}$ is also a difference set.70And ${\rm dev} D^{-1}$ is the dual of ${\rm dev} D$. So a group71admitting an operation some structure defined by a difference set does72also admit an operation on the dual structure. We may therefore change73the notion of equivalence and take $\phi$ to be an automorphism or an74anti-automorphism. Forbidden sets are closed under inversion, so this75gives a ``weak'' sort of strong equivalence.7677787980%%%%%%%%%%%%%%%%%%%%81\Section{How partial difference sets are represented}8283Let $G$ be a group. We define an enumeration $\{g_1,\dots,g_n\}=G$ and84represent $D\subseteq G$ as a list of integers (where, of course, $i$85represents $g_i$ for all $1\leq i\leq n$). So the automorphism group86of $G$ is represented as a permutation group of degree $n$. One of87the operations performed most often by methods in {\RDS} is88the calculation of quotients in $G$. So we calculate a look-up89table for this.9091This pre-calculation is done by the operation92"PermutationRepForDiffsetCalculations". So before you start generating93difference set, call this function and work with the data structure94returned by it.9596For an exhaustive search, the ordering of $G$ is very important. To97avoid generating duplicate partial difference sets, we would like to98represent partial difference sets by *sets*, i.e. ordered lists. But99in fact, {\RDS} does *not* assume that partial difference100sets are sets. The operations "ExtendedStartSets" and "AllDiffsets"101assume that the last element of partial difference set is its102maximum. But they don't test it. So if you start from scratch, these103methods generate difference sets which are really sets. Whereas the104`NoSort' versions disregard the ordering of $G$ and will produce105duplicates.106107The reason for this seemingly strange behaviour is the following:108Assume that we have a normal subgroup $U\leq G$ and know that every109difference set $D\subseteq G$ contains exactly $n_i$ elements from the110$i^{\rm th}$ coset modulo $U$. Then it is natural to generate111difference sets by first searching all partial difference sets of112length $n_1$ containing entirely of elements of the first coset modulo113$U$ and then proceed with the other cosets.114115This method of difference set generation is normally not compatible116with the ordering of $G$. This is why partial difference sets are not117required to be *sets*. See chapter "RDS:An Example Program" for an118example.119120121%%%%%%%%%%%%%%%%%%%%122\Section{Basic functions for startset generation}123124Defining an enumeration of the a group $G$, every relative difference125set may be represented by a list of integers. Indexing $G$ in this way126has the advantage of the automorphism group of $G$ being a permutation127group acting on the index set for $G$. As relative difference sets are128normally calculated in small groups, it is possible to store a129complete multiplication table of the group in terms of the130enumeration.131132If not stated otherwise, partial difference sets are always considered133to be lists of integers. Note that it is not required for a partial134difference set to be a set.135136\>PermutationRepForDiffsetCalculations( <group> ) O137\>PermutationRepForDiffsetCalculations( <group>, <autgrp> ) O138139For a group <group>, `PermutationRepForDiffsetCalculations(<group>)'140returns a record containing:141\beginlist142\item{1.} the group <.G>=<group>.143\item{2.} the sorted list <.Glist>=`Set(<group>)',144\item{3.} the automorphism group <.A> of <group>,145\item{4.} the group <.Aac>, which is the permutation action of <A> on the indices of <.Glist>,146\item{5.} <.Ahom>=`ActionHomomorphism(<.A>,<.Glist>)',147\item{6.} the group <.Ai> of anti-automorphisms of <.group> acting on the indices of <Glist>,148\item{7.} the multiplication table <.diffTable> of <.group> in a special form.149\endlist150151<.diffTable> is a matrix of integers defined such that152`<.difftable>[i][j]' is the position of `<Glist>[i](<Glist>[j])^{-1})'153in <Glist> with `<Glist>[1]=One(<group>)'.154155`PermutationRepForDiffsetCalculations' runs into an error if156`Set(<group>)[1]' is not equal to `One(<group>)'.157158If <autgrp> is given, `PermutationRepForDiffsetCalculations' will not calculate the159automorphism group of <group> but will take <autgrp> instead without any test.160161162163If `Set(<group>)[1]' is not equal to `One(<group>)', then164"PermutationRepForDiffsetCalculations" returns an error message.165In this case, calculating a permutation representation helps:166167\beginexample168gap> G:=SL(2,3);169SL(2,3)170gap> Gdata:=PermutationRepForDiffsetCalculations(G);171Error, smallest element of group is not the identity. Try `IsomorphismPermGrou\172p' called from173<function>( <arguments> ) called from read-eval-loop174Entering break read-eval-print loop ...175you can 'quit;' to quit to outer loop, or176you can 'return;' to continue177brk> quit;178gap> G:=Image(IsomorphismPermGroup(G));179Group([ (2,3,5)(6,7,8), (1,2,4,7)(3,6,8,5) ])180gap> Gdata:=PermutationRepForDiffsetCalculations(G);181\endexample182183\>IsDiffset( <diffset>, [<forbidden>], <Gdata>, [<lambda>] ) O184\>IsDiffset( <diffset>, [<forbidden>], <group>, [<lambda>] ) O185186This function tests if <diffset> is a relative difference set with187forbidden set <forbidden> and parameter <lambda> in the group <group>.188If <Gdata> is the record calculated by "PermutationRepForDiffsetCalculations",189<diffset> and <forbidden> have to be lists of integers. If a group190<group> is given, <diffset> and <forbidden> must consist of elements191of this group.192193If <forbidden> is not given, it is assumed to be trivial. If <lambda>194is not given, it is set to $1$. Note that $1$ (`One(<group>)', repectively)195*must not* be element of <diffset>.196197198199\beginexample200gap> a:=(1,2,3,4,5,6,7);201(1,2,3,4,5,6,7)202gap> IsDiffset([a,a^3],Group(a));203true204gap> IsDiffset([a,a^3],Group(a),2);205false206gap> IsDiffset([a,a^2,a^4],Group(a),2);207true208gap> Gdata:=PermutationRepForDiffsetCalculations(Group(a));;209gap> IsDiffset([2,4],Gdata);210true211\endexample212213\>IsPartialDiffset( <diffset>, [<forbidden>], <Gdata>, [<lambda>] ) O214\>IsPartialDiffset( <diffset>, [<forbidden>], <group>, [<lambda>] ) O215216This function tests if <diffset> is a partial relative difference set with217forbidden set <forbidden> and parameter <lambda> in the group <group>.218If <Gdata> is the record calculated by "PermutationRepForDiffsetCalculations",219<diffset> and <forbidden> have to be lists of integers. If a group220<group> is given, <diffset> and <forbidden> must consist of elements221of this group.222223If <forbidden> is not given, it is assumed to be trivial. If <lambda>224is not given, it is set to $1$. Note that $1$ (`One(<group>)', repectively)225*must not* be element of <diffset>.226227228\beginexample229gap> a:=(1,2,3,4,5,6,7);230(1,2,3,4,5,6,7)231gap> IsPartialDiffset([a],Group(a));232true233gap> IsPartialDiffset([a,a^4],Group(a));234false235gap> IsPartialDiffset([a,a^4],Group(a),2);236true237\endexample238239A partial difference set may be converted from a list of group240elements to a list of integers using241\>GroupList2PermList( <list>, <Gdata> ) O242243converts a list of group elements to integers according to the244enumeration given in Gdata.Glist.245Here <Gdata> is a record containing .diffTable as returned by246"PermutationRepForDiffsetCalculations".247248249250The inverse operation is251performed by252\>PermList2GroupList( <list>, <Gdata> ) O253254converts a list of integers into group elements according to the255enumeration given in Gdata.Glist.256Here <Gdata> is a record containing .diffTable as returned by257"PermutationRepForDiffsetCalculations".258259260261262\beginexample263gap> G:=DihedralGroup(6);264<pc group of size 6 with 2 generators>265gap> N:=NormalSubgroups(G)[2];266Group([ f2 ])267gap> dat:=PermutationRepForDiffsetCalculations(G);268rec( G := <pc group of size 6 with 2 generators>,269Glist := [ <identity> of ..., f1, f2, f1*f2, f2^2, f1*f2^2 ],270A := <group of size 6 with 2 generators>,271Aac := Group([ (3,5)(4,6), (2,4,6) ]),272Ahom := <action homomorphism>,273Ai := Group([ (3,5), (3,5)(4,6), (2,4,6) ]),274diffTable := [ [ 1, 2, 5, 4, 3, 6 ], [ 2, 1, 6, 3, 4, 5 ],275[ 3, 6, 1, 2, 5, 4 ], [ 4, 5, 2, 1, 6, 3 ],276[ 5, 4, 3, 6, 1, 2 ], [ 6, 3, 4, 5, 2, 1 ] ] )277gap> Nperm:=GroupList2PermList(Set(N),dat);278[ 1, 3, 5 ]279\endexample280281In the following functions the record <Gdata> has to contain a matrix282<.diffTable> as returned by "PermutationRepForDiffsetCalculations".283284\>NewPresentables( <list>, <newel>, <table> ) O285\>NewPresentables( <list>, <newel>, <Gdata> ) O286\>NewPresentables( <list>, <newlist>, <Gdata> ) O287\>NewPresentables( <list>, <newlist>, <table> ) O288289`NewPresentables( <list>,<newel>,<Gdata> )' takes a record <Gdata> as290returned by `PermutationRepForDiffsetCalculations(<group>)'.291For `NewPresentables( <list>,<newel>,<table> )', <table> has to be the292multiplication table in the form of293`NewPresentables( <list>,<newel>,<Gdata.diffTable>)'294295The method returns the unordered list of quotients $d_1<newel>^{-1}$ with296$d_1\in <list>\cup\{1\}$ (in permutation representation).297298When used with a list <newlist>, a list of quotients $d_1d_2^{-1}$ with299$d_1\in <list>\cup\{1\}$ and $d_2\in <newlist>$ is returned.300301302\>AllPresentables( <list>, <table> ) O303\>AllPresentables( <list>, <Gdata> ) O304305Let <list> be a list of integers representing elements of a group defined306by <Gdata> (or <table>).307`AllPresentables( <list>,<table>)' returns an unordered list of308quotients $ab^{-1}$ for all group elements $a,b$ represented by integers309in <list>. If $1\in <list>$, an error is issued.310The multiplication table <table> has to be of the form as returned by311"PermutationRepForDiffsetCalculations". And <Gdata> is a record as312calculated by "PermutationRepForDiffsetCalculations".313314315%316\beginexample317gap> G:=CyclicGroup(7);;dat:=PermutationRepForDiffsetCalculations(G);;318gap> AllPresentables([2,3],dat);319[ 2, 3, 7, 2, 7, 6 ]320gap> NewPresentables([2,3],4,dat);321[ 4, 5, 6, 3, 7, 2 ]322gap> AllPresentables([1,2,3],dat);323Error...324\endexample325%326\>RemainingCompletions( <diffset>, <completions>[, <forbidden>], <Gdata>[, <lambda>] ) O327\>RemainingCompletionsNoSort( <diffset>, <completions>[, <forbidden>], <table>[, <lambda>] ) O328329For a partial difference set <diffset>,330`RemainingCompletions(<diffset>,<completions>,<Gdata>)' returns a331subset of the *set* <completions>, such that each of its elements may be332added to <diffset> without it loosing the property to be a partial333difference set.334Only elements greater than the last element of <diffset> are returned.335336For partial *relative* difference sets, <forbidden> is the forbidden set.337338`RemainingCompletionsNoSort' does also return elements from <completions> which339are smaller than `<diffset>[Size(<diffset>)]'.340341342\beginexample343gap> G:=CyclicGroup(7);344<pc group of size 7 with 1 generators>345gap> dat:=PermutationRepForDiffsetCalculations(G);;346gap> RemainingCompletionsNoSort([4],[1..7],dat);347[ 2, 3 ]348gap> RemainingCompletionsNoSort([4],[1..7],dat,2);349[ 2, 3, 6, 7 ]350gap> RemainingCompletions([4],[1..7],dat);351[ ]352gap> RemainingCompletions([4],[1..7],dat,2);353[ 6, 7 ]354\endexample355356\>ExtendedStartsets( <startsets>, <completions>, [<forbiddenset>][, <aim>], <Gdata>[, <lambda>] ) O357\>ExtendedStartsetsNoSort( <startsets>, <completions>, [<forbiddenset>][, <aim>], <Gdata>[, <lambda>] ) O358359For a set of partial (relative) difference sets <startsets>, the set of360all extensions by one element from <completions> is returned.361Here an ``extension'' of a partial diffence set $S$ is a list which has362one element more than $S$ and contains $S$.363364Here <completions> is a set of elements wich may be appended to the lists in365<startsets> to generate new partial difference sets. For relative difference366sets, the forbidden set <forbiddenset> must be given.367And the integer <aim> gives the desired total length, i.e. the number368of elements of <completions> that have to be added to each startset369plus its length. Note that the elements of <startset> are always extended370by *one* element (if they can be extended). <aim> does only tell how371many elements from <completions> you want to add. A partial difference372set is only be extended, if there are enough admissible elements in373<completions>, so if for some $S\in<startsets>$, we have less than374$<aim>-`Size'(S)$ elements in <completions> which can be added to $S$,375no extension of $S$ is returned.376377If <lambda> is not passed as a parameter, it is assumed to be $1$.378379Note that `ExtendedStartsets' does use "RemainingCompletions" while380`ExtendedStartsetsNoSort' uses "RemainingCompletionsNoSort".381Note that the partial difference sets generated with `ExtendedStartsetsNoSort'382are *not* sets (i.e. not sorted). This may result in doing work383twice. But it can also be useful, especially when generating difference sets384``coset by coset''.385386387388\beginexample389gap> G:=CyclicGroup(7);;dat:=PermutationRepForDiffsetCalculations(G);;390gap> startsets:=[[2],[4],[6]];;391gap> ExtendedStartsets(startsets,[1..7],dat);392[ [ 2, 4 ], [ 2, 6 ] ]393gap> ExtendedStartsets(startsets,[1..7],3,dat);394[ [ 2, 4 ] ]395gap> ExtendedStartsets(startsets,[1..7],dat,2);396[ [ 2, 3 ], [ 2, 4 ], [ 2, 5 ], [ 2, 6 ], [ 4, 6 ], [ 4, 7 ], [ 6, 7 ] ]397gap> ExtendedStartsetsNoSort(startsets,[1..7],dat);398[ [ 2, 4 ], [ 2, 6 ], [ 4, 2 ], [ 4, 3 ], [ 6, 2 ], [ 6, 5 ] ]399\endexample400401%%%%%%%%%%%%%%%%%%%%402\Section{Brute force methods}403404The following methods can be used to find (partial) difference sets by405brute force. More examples are contained in chapter "RDS:AllDiffsets and OneDiffset"406407\>AllDiffsets( [<partial>], <group>, [<lambda>] ) O408\>AllDiffsets( <partial>, [<aim>], <forbidden>, <group>, [<lambda>] ) O409\>AllDiffsets( [<partial>], <Gdata>, [<lambda>] ) O410\>AllDiffsets( <partial>, [<aim>], <forbidden>, <Gdata>, [<lambda>] ) O411\>AllDiffsets( <partial>, <completions>, <aim>, <forbidden>, <Gdata>, <lambda> ) O412413Let <partial> be a list of elements of the group <group> which form a414partial relative difference set with parameter <lambda> and forbidden415set <forbidden> (which is also a set of group elements). That means that416the every non-trivial element in the list of quotients in elements of417<partial> occurs at most <lambda> times and no element of <forbidden>418is in this set.419Then `AllDiffsets' returns the list of all partial relative difference420sets of length <aim> with parameter <lambda> and forbidden set <forbidden>421which contain <partial>. Only those partial relative difference sets will422be constructed, which start with <partial> and continue with elements423larger than the last element in <partial>.424425To calculate *all* difference sets which contain <partial> as a subset,426you can use "AllDiffsetsNoSort".427428Note that a difference set is also assumed to429contain the identity element, but this does not occur in the returned430lists. So a returned difference set contains <aim> elements but actually431represents a set of length <aim>+1, as it still is a partial relative432difference set when the identity element is added.433If <partial> is not given or the empty set, all difference set in the434group <group> are calculated. If <lambda> is not given, it is set to 1.435Without <forbidden>, ordinary difference sets are calculated.436If <aim> is not given, it is set to the size of a full relative437difference set with forbidden set <forbidden> and parameter <lambda>.438439Instead of using a group <group>, you can also use the data record440<Gdata> returned by "PermutationRepForDiffsetCalculations".441In this case, <partial> and <forbidden> must be lists of integers.442In the last form, <completions> must be a list of integers and443`AllDiffsets' does only extend <partial> by elements from <completions>.444445446\>AllDiffsetsNoSort( <partial>, <group> ) O447\>AllDiffsetsNoSort( <partial>, <Gdata> ) O448\>AllDiffsetsNoSort( <partial>, [<completions>], <aim>, [<forbidden>], <group>, [<lambda>] ) O449\>AllDiffsetsNoSort( <partial>, [<completions>], <aim>, [<forbidden>], <Gdata>, [<lambda>] ) O450451This calculates all partial relative difference sets which contain the partial452relative difference set <partial>. The returned value is a set of lists.453Each of the returned lists starts with the list <partial>.454If <partial> is not a partial relative difference set, the empty list is455returned.456457Note that despite the name, `AllDiffsetsNoSort' does not calculate all458difference sets as unordered lists. It just calculates all difference459sets which contain <partial> as a subset.460461As it does not only append larger elements to <partial>, `AllDiffsetsNoSort'462works for all groups.463464465466If called with <group> rather than <Gdata>, "AllDiffsets" and467"AllDiffsetsNoSort" call "PermutationRepForDiffsetCalculations". They468then work with sets of integers as difference sets and convert the469result back into group notation.470471As "PermutationRepForDiffsetCalculations" refuses to work if the472smallest element of the group is not 1, this does not always work. So473a permutation representation for <group> is calculated in this474case. However, this is only done for the `NoSort' version and if475<partial> is empty. Here is an example:476477\beginexample478gap> m:=[479> [0,1,0,0,0,0,0],480> [0,0,1,0,0,0,0],481> [0,0,0,1,0,0,0],482> [0,0,0,0,1,0,0],483> [0,0,0,0,0,1,0],484> [0,0,0,0,0,0,1],485> [1,0,0,0,0,0,0]];;486gap> G:=Group(m);487<matrix group with 1 generators>488gap> Order(G);4897490gap> Size(AllDiffsets(G));4916492gap> AllDiffsets([m],G);493Error, smallest element of group is not the identity.494[...]495gap> Size(AllDiffsetsNoSort([m],G));4962497\endexample498499The reason for this is the fact that "AllDiffsets" generates500difference sets from <partial> by appending only elements which are501larger than the last element of <partial>. In a permutation502representation, the ordering will be different from the original one,503so {\GAP} refuses to calculate the permutation representation and issues504an error.505506"AllDiffsetsNoSort" first appends one element regardless of ordering507and then only larger ones.508509\>OneDiffset( [<partial>], <group>, [<lambda>] ) O510\>OneDiffset( <partial>, [<aim>], <forbidden>, <group>, [<lambda>] ) O511\>OneDiffset( [<partial>], <Gdata>, [<lambda>] ) O512\>OneDiffset( <partial>, [<aim>], <forbidden>, <Gdata>, [<lambda>] ) O513\>OneDiffset( <partial>, <completions>, <aim>, <forbidden>, <Gdata>, <lambda> ) O514515This function works exactly like "AllDiffsets", but stops once a516(partial) relative difference set is found.517This (partial) relative difference set is then returned. If no set518with the requested property exists, the empty list is returned.519520If `OneDiffset' is called using <Gdata> and lists of integers as521<partial> and <forbidden>, then the returned difference set is522the lexicographically smallest one starting with <partial>.523If the <group>-form is used and <partial> is not empty, `OneDiffset'524does only work, if the smallest element of <group> is the identity.525This is not the case for matrix groups in general.526527528\>OneDiffsetNoSort( <partial>, <group> ) O529\>OneDiffsetNoSort( <partial>, <Gdata> ) O530\>OneDiffsetNoSort( <partial>, [<completions>], <aim>, [<forbidden>], <group>, [<lambda>] ) O531\>OneDiffsetNoSort( <partial>, [<completions>], <aim>, [<forbidden>], <Gdata>, [<lambda>] ) O532533This works exactly as "AllDiffsetsNoSort" does, but stops once a set534with the desired properties is found and returns it.535If no difference set exists, the empty list is returned.536537538%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%539%%540%E END startsets.msk541%%542543544