login

Revision History for A245228

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of nonisomorphic subsets of n cards of a standard deck of 52 cards under action of symmetric group S_4 acting on the suits.
(history; published version)
#25 by Jon E. Schoenfield at Fri Aug 12 19:31:13 EDT 2022
STATUS

editing

approved

#24 by Jon E. Schoenfield at Fri Aug 12 19:31:09 EDT 2022
LINKS

Math Mathematics Stack Exchange, <a href="http://math.stackexchange.com/questions/864116/how-to-count-different-card-combinations-with-isomorphism">Subsets of the standard deck of 52 cards under suit permutation isomorphisms</a>

STATUS

approved

editing

#23 by Michel Marcus at Sat Apr 28 07:45:55 EDT 2018
STATUS

reviewed

approved

#22 by Joerg Arndt at Sat Apr 28 06:54:21 EDT 2018
STATUS

proposed

reviewed

#21 by Michel Marcus at Fri Apr 27 00:46:16 EDT 2018
STATUS

editing

proposed

#20 by Michel Marcus at Fri Apr 27 00:46:11 EDT 2018
LINKS

Math Stack Exchange, <a href="http://math.stackexchange.com/questions/864116/how-to-count-different-card-combinations-with-isomorphism">Subsets of the standard deck of 52 cards under suit permutation isomorphisms</a>

STATUS

proposed

editing

#19 by Marko Riedel at Thu Apr 26 21:50:39 EDT 2018
STATUS

editing

proposed

#18 by Marko Riedel at Thu Apr 26 21:45:51 EDT 2018
LINKS

Marko Riedel, <a href="/A245228/a245228.maple.txt">Maple program for sequence including cycle indices.</a>

MAPLE

with(combinat);

with(numtheory);

pet_flatten_term :=

proc(varp)

local terml, d, cf, v;

terml := [];

cf := varp;

for v in indets(varp) do

d := degree(varp, v);

terml := [op(terml), seq(v, k=1..d)];

cf := cf/v^d;

od;

[cf, terml];

end;

pet_autom2cycles :=

proc(src, aut)

local numa, numsubs;

local marks, pos, cycs, cpos, clen;

numsubs := [seq(src[k]=k, k=1..nops(src))];

numa := subs(numsubs, aut);

marks := [seq(true, pos=1..nops(aut))];

cycs := []; pos := 1;

while pos <= nops(aut) do

if marks[pos] then

clen := 0; cpos := pos;

while marks[cpos] do

marks[cpos] := false;

cpos := numa[cpos];

clen := clen+1;

od;

cycs := [op(cycs), clen];

fi;

pos := pos+1;

od;

return mul(a[cycs[k]], k=1..nops(cycs));

end;

pet_cycleind_symm :=

proc(n)

local p, s;

option remember;

if n=0 then return 1; fi;

expand(1/n*add(a[l]*pet_cycleind_symm(n-l), l=1..n));

end;

pet_cycleind_cards :=

proc()

option remember;

local cind, cards, p, q, perm, pcards;

cind := 0;

cards := [seq(seq([p, q], p=1..13), q=1..4)];

for perm in permute(4) do

pcards :=

[seq([cards[q][1], perm[cards[q][2]]], q=1..52)];

cind := cind + pet_autom2cycles(cards, pcards);

od;

cind/24;

end;

q :=

proc(N)

option remember;

local idx_slots, res, a, b,

flat_a, flat_b, cycs_a, cycs_b, q,

tbl_a, tbl_b, f1, f2, f3;

if N=1 then

idx_slots := [a[1]]

else

idx_slots := pet_cycleind_symm(N);

fi;

res := 0;

for a in idx_slots do

flat_a := pet_flatten_term(a);

cycs_a := sort(flat_a[2]);

tbl_a := table();

for q in convert(cycs_a, 'multiset') do

tbl_a[op(1, q[1])] := q[2];

od;

f1 := map(q -> op(1, q), cycs_a);

f1 := mul(f1[q], q=1..nops(cycs_a));

f2 := convert(map(q -> op(1, q), cycs_a), 'multiset');

f2 := map(q -> q[2], f2);

f2 := mul(f2[q]!, q=1..nops(f2));

for b in pet_cycleind_cards() do

flat_b := pet_flatten_term(b);

cycs_b := sort(flat_b[2]);

tbl_b := table();

for q in convert(cycs_b, 'multiset') do

tbl_b[op(1, q[1])] := q[2];

od;

f3 := 1;

for q in [indices(tbl_a, 'nolist')] do

if type(tbl_b[q], integer) then

f3 := f3*binomial(tbl_b[q], tbl_a[q]);

else

f3 := 0;

fi;

od;

res := res + f3*f2*f1*flat_a[1]*flat_b[1];

od;

od;

res;

end;

STATUS

approved

editing

Discussion
Thu Apr 26
21:46
Marko Riedel: replace Maple code by simplified version
#17 by N. J. A. Sloane at Sat Jul 19 09:43:10 EDT 2014
STATUS

editing

approved

#16 by N. J. A. Sloane at Sat Jul 19 09:43:06 EDT 2014
COMMENTS

More than the usual number of terms are given in order to show the full sequence.

STATUS

approved

editing