#Function to compute Qhat(G,c), takes as input character tables t1 of stabiliser H and t of G and an integer c. Q := function(t1, t,c) local f, S, O, P, a, i, cc, z, tt, k; f := FusionConjugacyClasses(t1, t);; S := SizesConjugacyClasses(t);; O := OrdersClassRepresentatives(t);; P := []; for i in [1..Size(O)] do if IsPrime(O[i]) then Add(P, i); fi; od; z := 0; tt := SizesConjugacyClasses(t1); for i in P do a := S[i]; cc := 0; for k in [1..Size(f)] do if f[k] = i then cc := cc + tt[k]; fi; od; z := z + 1.0 * a * (cc / a)^c; od; return z; end; #Function to compute D(G,H), takes as input character tables t1 of H and t of G. D := function(t1, t) return (Size(t) / Size(t1)) * (1 - (1 - Q(t1, t,3))^(1/2)); end;