Function Repository Resource:

FindFanoPlaneIsomorphism

Source Notebook

Enumerate all isomorphisms given a configuration of a Steiner triple system (2, 3, 7) on the Fano plane

Contributed by: Shenghui Yang

ResourceFunction["FindFanoPlaneIsomorphism"][{p1,p2,p3,,p7}]

generates all isomorphic permutations for a given configuration of the Steiner triple system (2, 3, 7) on the Fano plane.

ResourceFunction["FindFanoPlaneIsomorphism"][pts, "BlockTable"]

generates all isomorphisms together with their block tables as an Association.

ResourceFunction["FindFanoPlaneIsomorphism"][pts, "Diagram"]

generates all isomorphisms together with their Fano plane diagrams as an Association.

ResourceFunction["FindFanoPlaneIsomorphism"][pts, "All"]

generates all isomorphisms together with their block tables and Fano plane diagrams.

Details

The Fano plane is used as the projective plane for the Steiner triple system STS(t,k,n) = STS(2,3,7). The system Ω = STS(2,3,7) contains n = 7 elements and has a collection of subsets (or block) with k=3 elements. Every subset of Ω with exactly t = 2 items must be contained in exactly one block.
The automophism group of STS(2,3,7) is also isomorphic to PL(2, 7), the projective special linear group (2,7). The well known order of the group is 168 = 7 · (7-1) · (7-3).
The diagram shows the corresponding position of points in argument when placed on the Fano plane:

The algorithm effectively enumerates all isomorphisms by setting P1 as the free node first, then setting a constraint on P6 based on P1 and then on P2 based on {P1, P6, P5}. The rest of the system is determined through the STS requirement from the input configuration.
It is convenient for users to work with block tables and Fano plane diagrams together. The block table shows which triplets are connected on each line in the diagram. In the block table there are exactly three dots in each row and column as required of a Steiner system.

Examples

Basic Examples (3) 

Given the configuration {2,3,1,5,4,6,7}, show its Fano plane diagram:

In[1]:=
config = {2, 3, 1, 5, 4, 6, 7};
ResourceFunction["FindFanoPlaneIsomorphism"][config, "Diagram"][config]
Out[2]=

Given the configuration {2,3,1,5,4,6,7}, find all isomorphic permutations that preserves collineation:

In[3]:=
Short[iso = ResourceFunction[
   "FindFanoPlaneIsomorphism"][\!\(TraditionalForm\`{2, 3, 1, 5, 4, 6, 7}\)]]
Out[3]=

Verify the number of isomorphism generated is 168:

In[4]:=
Length[iso]
Out[4]=

Given the configuration {2,3,1,5,4,6,7}, show the Fano plane block table for it and one of its isomorphisms:

In[5]:=
config = {2, 3, 1, 5, 4, 6, 7};
isoBTAsso = ResourceFunction["FindFanoPlaneIsomorphism"][config, "BlockTable"];
GraphicsRow[{isoBTAsso[config], isoBTAsso[[2]]}]
Out[7]=

Scope (1) 

In the following, block 1 corresponds to the line through triplet {1,2,3} regardless of order. One can find the same triplet on the left side on the diagram. Block 7 has three dots for 3, 5 and 6 which corresponds to the circle (general line) in the Fano diagram and analogously for the other columns:

In[8]:=
config = {2, 3, 1, 5, 4, 6, 7};
{isoBTAsso, isoDiagAsso} = ResourceFunction["FindFanoPlaneIsomorphism"][config, "All"];
{isoBTAsso[config], isoDiagAsso[config]} // Row
Out[9]=

Properties and Relations (2) 

The visual proof below shows the existence of an isomorphic permutation of a given configuration in a trivial way. For instance {2,3,1,5,4,6,7} has the following Fano plane:

In[10]:=
config = {2, 3, 1, 5, 4, 6, 7};
isoDiagAsso = ResourceFunction["FindFanoPlaneIsomorphism"][config, "Diagram"];
isoDiagAsso[config]
Out[11]=

Rotation of the above diagram 120 degrees counterclockwise about 7 will preserve the collinearity of all points:

In[12]:=
newConfig = Permute[{2, 3, 1, 5, 4, 6, 7}, Cycles[{{1, 3, 5}, {2, 4, 6}}]]
Out[12]=

Show the corresponding Fano plane:

In[13]:=
isoDiagAsso[newConfig]
Out[13]=

The cycle structure for permutations of the isomorphic family has 6 conjugacy classes. Use FindFanoPlaneIsomorphism to verify the enumeration given on Wikipedia:

In[14]:=
config = \!\(TraditionalForm\`{2, 3, 1, 5, 4, 6, 7}\);
iso = ResourceFunction["FindFanoPlaneIsomorphism"][config];
cycles = FindPermutation[config, #] & /@ iso;
cycles // Short
Out[17]=

One of the permutations is the identity permutation:

In[18]:=
Count[cycles, Cycles[{{}}]]
Out[18]=

21 of the permutations have two 2-cycles:

In[19]:=
Count[cycles, Cycles[{a_, b_}] /; Length[a] == Length[b] == 2]
Out[19]=

Similarly, 42 of the permutations have one 2-cycle and one 4-cycle:

In[20]:=
Count[cycles, Cycles[{a_, b_}] /; MinMax[{Length[a], Length[b]}] == {2, 4}]
Out[20]=

56 of the permutations have two 3-cycles:

In[21]:=
Count[cycles, Cycles[{a_, b_}] /; Length[a] == Length[b] == 3]
Out[21]=

48 of the permutations have a 7-cycle:

In[22]:=
sevenCyc = Cases[cycles, Cycles[{a_}] /; Length[a] == 7];
sevenCyc // Length
Out[23]=

The 48 permutations are composed of two conjugacy classes: 1) A maps to B, B to C, C to D. Then D is on the same line as A and B. 2) A maps to B, B to C, C to D. Then D is on the same line as A and C. Both classes can be found directly using the reference diagram in Details & Options:

In[24]:=
(*blocks or collinear points on the reference Fano plane*)
refFanoPlane = {{1, 2, 3}, {3, 4, 5}, {5, 6, 1}, {1, 7, 4}, {2, 7, 5}, {3, 7, 6}, {2, 4, 6}};
In[25]:=
case1 = Cases[
   sevenCyc, _?(Function[{item}, MemberQ[refFanoPlane, _?(SubsetQ[#, item[[1, 1, {1, 2, 4}]]] &)]])];
In[26]:=
case2 = Cases[
   sevenCyc, _?(Function[{item}, MemberQ[refFanoPlane, _?(SubsetQ[#, item[[1, 1, {1, 3, 4}]]] &)]])];

Each class has 24 items:

In[27]:=
{Length@case1, Length@case2}
Out[27]=

Possible Issues (2) 

The input must be a permutation of {1,2,3,4,5,6,7}. Otherwise the function returns unevaluated with an error message:

In[28]:=
ResourceFunction["FindFanoPlaneIsomorphism"][{1, 2, 4}]
Out[28]=

The property must be one of "BlockTable", "Diagram" or "All". Otherwise, the function returns all isomorphisms only:

In[29]:=
ResourceFunction["FindFanoPlaneIsomorphism"][{7, 6, 5, 4, 3, 2, 1}, "random"] // Short
Out[29]=

Neat Examples (2) 

Compare two isomorphic Fano planes for a given configuration with both diagram and block table:

In[30]:=
config = {2, 3, 1, 5, 4, 6, 7};
SeedRandom[314159];
{blkTable, diagram} = ResourceFunction["FindFanoPlaneIsomorphism"][config, "All"];
isoPair = RandomChoice[blkTable // Keys, 2]
Out[31]=

The collinearities are identical for both diagrams. For instance, one can find a general line through the triplet {5,6,3} in both diagrams:

In[32]:=
GraphicsRow[diagram /@ isoPair]
Out[32]=

The two associated block tables are identical up to column swapping: {17,22,35,41,53,64,76}, where 17 compares the first column in the left table to the seventh column in the right table and so on:

In[33]:=
GraphicsRow[blkTable /@ isoPair]
Out[33]=

Build the Hoffman-Singleton graph. First we generate all even permutation of the given configuration:

In[34]:=
fpForHSG = {};
SeedRandom["FanoPlane"];
NestWhileList[Module[{temp},
    temp = RandomChoice[#];
    AppendTo[fpForHSG, temp];
    Complement[#, ResourceFunction["FindFanoPlaneIsomorphism"][temp]]
    ] &, evenPerm, Length[#] > 1 &];

There are exactly 15 non-isomorphic Fano planes:

In[35]:=
fpForHSG // Short
Out[35]=

Find 7 collinear triplets in each configuration. Generate blocks or collinear points on the reference Fano plane:

Show the collinear blocks for the first of the 15 Fano planes:

In[36]:=
fanoBlocks[{1, 6, 5, 2, 3, 7, 4}]
Out[36]=

Show the Fano plane diagram for this configuration:

In[37]:=
With[{config = {1, 6, 5, 2, 3, 7, 4}},
 ResourceFunction["FindFanoPlaneIsomorphism"][config, "Diagram"][
  config]]
Out[37]=

The Hoffman-Singleton graph has two types of connections: 1. the Fano plane to its 7 collinear triplets 2. a triplet to another disjoint triplet

In[38]:=
(*Blue*)
type1 = Table[(node \[UndirectedEdge] #) & /@ fanoBlocks[node], {node,
      fpForHSG}] // Flatten;
In[39]:=
(*Red*)
type2 = With[{blocks = Flatten[fanoBlocks /@ fpForHSG, 1] // Union}, Table[If[DisjointQ[blocks[[e1]], blocks[[e2]]], blocks[[e1]] \[UndirectedEdge] blocks[[e2]], Nothing],
     {e1, 35}, {e2, e1, 35}] // Flatten];

In total there should be 50 = 15 + 35 nodes and 175 edges:

In[40]:=
Length[type1] + Length[type2]
Out[40]=

Set up customized styles for vertices and edges:

In[41]:=
circleLayout[n_] := Table[{Cos[2 \[Pi]/n i], Sin[2 \[Pi]/n i]}, {i, n}] // N;
ef1[el_, el2_] := If[Length[el[[1]]] == 7 || Length[el2[[2]]] == 7, {Lighter[Blue, 0.3], Line[el]}, {Red, Line[el]}]

Mark the Fano planes with triangles and the collinear triplets with circles in the graph:

In[42]:=
g = Graph[type2~Join~type1,
  VertexCoordinates ->
   Thread[{{1, 2, 3}, {6, 1, 5, 2, 7, 3, 4}, {2, 5, 7}, {1, 4, 6}, {2,
       3, 7}, {1, 4, 5}, {2, 3, 6}, {1, 4, 7}, {2, 5, 6}, {1, 3, 7}, {
      2, 4, 5}, {1, 3, 6}, {2, 4, 7}, {4, 2, 7, 1, 3, 5, 6}, {1, 2, 5}, {4, 6, 5, 2, 1, 7, 3}, {3, 5, 7}, {2, 3, 1, 4, 5, 6, 7}, {3,
       4, 6}, {5, 7, 6, 1, 2, 4, 3}, {5, 6, 7}, {4, 6, 2, 7, 1, 5, 3}, {3, 4, 7}, {1, 5, 6}, {1, 6, 5, 2, 3, 7, 4}, {2, 3, 5}, {1, 6, 7}, {2, 3, 4}, {1, 5, 7}, {2, 4, 6}, {1, 3, 5}, {2, 6, 7}, {
      1, 3, 4}, {3, 2, 6, 1, 5, 7, 4}, {1, 2, 7}, {3, 4, 5}, {1, 2, 6}, {2, 4, 3, 5, 6, 1, 7}, {4, 6, 7}, {5, 3, 4, 6, 7, 1, 2}, {1,
       2, 4}, {7, 5, 2, 6, 3, 4, 1}, {4, 5, 6}, {7, 2, 4, 3, 1, 5, 6}, {3, 6, 7}, {2, 3, 4, 7, 5, 6, 1}, {4, 5, 7}, {4, 6, 2, 5, 1,
       3, 7}, {3, 5, 6}, {2, 1, 3, 6, 5, 4, 7}} -> circleLayout[50]],
  EdgeShapeFunction -> ef1,
  VertexShapeFunction -> {ele_ /; (Length[ele] == 7) -> "Triangle"}]
Out[42]=

The arrangement of nodes follows a pre-computed Hamiltonian cycle of this graph. The above diagram is isomorphic to the built-in entity:

In[43]:=
Entity["Graph", "HoffmanSingletonGraph"]["Graph"]
Out[43]=
In[44]:=
IsomorphicGraphQ[%, g]
Out[44]=

Publisher

Shenghui Yang

Requirements

Wolfram Language 13.0 (December 2021) or above

Version History

  • 1.0.0 – 01 December 2023

Source Metadata

Related Resources

Author Notes

The Fano plane and Steiner triple system are used widely with finite fields (requires version 13.3+ to implement the native algorithm together with the built in features) and coding theory.

The existence for STS(t,k,n) with large t has been proven, but no example has been found so far.

License Information