How to determine the number of double cosets from table of marks I remember reading a while back that a lot of information about double cosets of a group can be extracted from the group's table of marks. I can't recall the source. The group is an arbitrary finite group. I'm also mainly interested in the number of double cosets of the same subgroup; so I would expect these to somehow correspond to the diagonal entries of the table of marks. Does anyone know the exact correspondence or a reference where this is discussed. (How to do this in GAP is even better).
 A: I believe that you want IntersectionsTom. The number of $H_i-H_j$-double cosets in $G$ is Sum(IntersectionsTom(tom,i,j))
The $k$th entry describes how many times the size of $H_k$ is relevant to the size of a double coset, so the sum is how many double cosets there are.
To get more detailed information, such as their sizes you could do:
doubleCosetSizes := function(tom, i, j)
  local ords, ints;
  ords := OrdersTom(tom);
  ints := IntersectionsTom(tom, i, j);
  return Concatenation( List( [1..Size(ints)],
    k -> ListWithIdenticalEntries(
      ints[k], ords[i]*ords[j]/ords[k])));
end;

Here is a test to make sure the double coset sizes are computed accurately for all pairs of subgroups:
testOnGroup := function(grp)
  local tom, ords, nrsc, i, hi, j, hj, ints, dcs, dcsFromTom;

  tom := TableOfMarks(grp);
  ords := OrdersTom(tom); # orders of the subgroups in conjugacy class of subgroups
  nrsc := Size(ords); # number of subgroup classes

  for i in [1..nrsc] do
    hi := RepresentativeTom(tom,i); # rep of the i'th conjugacy class of subgroups
    for j in [1..i] do
      hj := RepresentativeTom(tom,j);
      dcs := List( DoubleCosetRepsAndSizes(grp, hi, hj), repAndSize -> repAndSize[2]);
      ints := IntersectionsTom(tom, i, j);
      dcsFromTom := Concatenation( List( [1..Size(ints)],
        k -> ListWithIdenticalEntries(ints[k], ords[i]*ords[j]/ords[k])));
      Print("H",i,"-H",j,": ",AsSortedList(dcs)=AsSortedList(dcsFromTom)," ",dcs,"\n");
    od;
  od;
end;

testOnGroup(SymmetricGroup(5));

