-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented essential dependency check. (#26)
* Added function to find permutation groups. * Attempt to add idempotents no 1. * Co-authored-by: Thomas Gao <thomasgaozx@users.noreply.github.com> * Extracting idempotents as transformations. * Almost done essential dependency. * It works now. * cleanup. * more cleanup. * Removed extra file. * Added headers and test. --------- Co-authored-by: Thomas Gao <z72gao@edu.uwaterloo.ca> Co-authored-by: Srijan01 <khatrisrijan99@gmail.com>
- Loading branch information
1 parent
52c2080
commit ef0341c
Showing
6 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
############################################################################# | ||
## | ||
## lowerbound.gd SgpDec package | ||
## | ||
## Copyright (C) 2023 | ||
## | ||
## Thomas Gao, Chrystopher L. Nehaniv | ||
## | ||
## Checks essential dependency for Rhodes–Tilson complexity lower bound. | ||
## | ||
|
||
DeclareGlobalFunction("IdempotentsForSubset"); | ||
DeclareGlobalFunction("CheckEssentialDependency"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
############################################################################# | ||
## | ||
## lowerbound.gd SgpDec package | ||
## | ||
## Copyright (C) 2023 | ||
## | ||
## Thomas Gao, Chrystopher L. Nehaniv | ||
## | ||
## Checks essential dependency for Rhodes–Tilson complexity lower bound. | ||
## | ||
|
||
InstallGlobalFunction(IdempotentsForSubset, | ||
function(S, sk, set) | ||
local e, IdempotentSet, ssize; | ||
ssize := Size(BaseSet(sk)); | ||
IdempotentSet := []; | ||
for e in Idempotents(S) do | ||
# check whether the image of e is set | ||
if OnFiniteSet(BaseSet(sk), e) = set then | ||
Add(IdempotentSet, e); | ||
fi; | ||
od; | ||
return IdempotentSet; | ||
end); | ||
|
||
InstallGlobalFunction(CheckEssentialDependency, function(S, sk, d1, d2) | ||
# d1 is lower than d2 so larger set | ||
local G1, CalX2, CalI2, skJ, J, x1, x2, e1, Xt, JGroup; | ||
|
||
for x1 in Concatenation(SubductionClassesOnDepth(sk, d1)) do | ||
for x2 in Concatenation(SubductionClassesOnDepth(sk, d2)) do | ||
if IsSubsetBlist(x1, x2) then | ||
|
||
for e1 in IdempotentsForSubset(S, sk, x1) do | ||
G1 := SchutzenbergerGroup(HClass(S, e1)); | ||
|
||
CalX2 := Enumerate(Orb(G1, x2, OnFiniteSet, rec(schreier := true, orbitgraph := true))); | ||
CalI2 := []; #Cal_I2 = all idempotents with images that are members of CalX2; | ||
for Xt in CalX2 do | ||
CalI2 := Concatenation(CalI2, IdempotentsForSubset(S, sk, Xt)); | ||
od; | ||
|
||
if IsEmpty(CalI2) then | ||
continue; | ||
fi; | ||
|
||
J := Semigroup(CalI2); | ||
skJ := Skeleton(J); | ||
|
||
if ContainsSet( skJ, x2 ) then | ||
JGroup := PermutatorGroup(skJ, x2); | ||
|
||
if Size(JGroup) > 1 then # the stricter test is PermutatorGroup(sk, x2) = JGroup | ||
Assert( 1, PermutatorGroup(sk, x2) = JGroup, | ||
Concatenation("PermutatorGroup(sk, x2) <> JGroup\nx2 = ", | ||
TrueValuePositionsBlistString(x2), "\nx1 = ", | ||
TrueValuePositionsBlistString(x1), "\n") ); | ||
return JGroup; | ||
fi; | ||
fi; | ||
od; | ||
|
||
fi; | ||
od; | ||
od; | ||
return Group(()); | ||
end); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# testing lowerbound | ||
gap> START_TEST("Sgpdec package: lowerbound.tst"); | ||
gap> LoadPackage("sgpdec", false);; | ||
gap> SgpDecFiniteSetDisplayOn();; | ||
gap> S := FullTransformationSemigroup(4);; | ||
gap> sk := Skeleton(S);; | ||
gap> CheckEssentialDependency(S, sk, 1,2); | ||
Group([ (2,3), (1,2), (1,3) ]) | ||
gap> CheckEssentialDependency(S, sk, 2,3); | ||
Group([ (1,2) ]) | ||
gap> SgpDecFiniteSetDisplayOff();; | ||
|
||
# | ||
gap> STOP_TEST( "Sgpdec package: lowerbound.tst", 10000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters