9

This is an enumeration problem in conjunction with some lottery problems.

Given an integer $N \ge 5$. Let a ticket be a set of 5 distinct integers between $1$ and $N$. Given an integer $T$ between $1$ and ${{N}\choose{5}}$. Let a system of size $T$ be a set of $T$ distinct tickets.

Given $N \ge 5$, I want to count how many distinct systems of size $T$ exist.

Two systems $S_1$ and $S_2$ are distinct if we can not find a permutation of $\{1,..,N\}$ so that the image of $S_1$ under permutation is $S_2$.

I tried some computations for small values of $N$ and $T$.

$N=7$

$T= 1, 2, 3, 4, 5, 6, 7, 8, 9$

number of distinct systems = $1, 2, 5, 10, 21, 41, 65, 97, 131, 148$

(It seems that this sequence of numbers is known as A008406 at oeis.org)

$N=8$

$T= 1, 2, 3, 4, 5, 6, 7, 8, 9$

number of distinct systems = $1, 3, 11, 52, 252, 1413, 7812, 41868, 207277$

$N=9$

$T= 1, 2, 3, 4, 5, 6, 7 $

number of distinct systems = $1, 4, 20, 155, 1596, 20528, 282246$

Is there a method to "guess" those numbers and find bigger values ?

I wonder if Polya enumeration can be used there. I currently do not know how.

Update: Taking a look at http://ac.cs.princeton.edu/home/

Let $s(T,N)$ be the number of distinct systems of size $T$ ($1 \le T \le{{N}\choose{5}}$), given $N$.

$\forall N \ge 5, s(1,N) = 1$

$\forall N \ge 10, s(2,N) = 5$

$\forall N \ge 15, s(3,N) = 44$

Fabrosi
  • 673

3 Answers3

4

This appears to be an interesting problem that can be attacked using Power Group Enumeration on sets as described in quite some detail at the following MSE link.

That link discusses the number of different subsets of a standard $52$ card deck under suit permutation. Here we have the group permuting the slots into which we distribute the cards is the symmetric group and the group permuting cards is the cardinality twenty-four induced action on the cards of all permutations of the four suits.

The lottery ticket problem proposed here follows exactly the same model, only now we are distributing tickets into the slots being permuted by the symmetric group and the group acting on the tickets is the induced action of the symmetric group $S_N.$ The number of terms in the cycle indices $Z(S_N)$ and $Z(S_T)$ is given by the [partition function](https://oeis.org/A000041) and we get an algorithm that is of [asymptotically lower order](https://en.wikipedia.org/wiki/Partition_%28number_theory%29#Approximation_formulas) than the naive $N!\times T!.$

The only non-trivial issue that is not already featured in the solution to the distributions of cards is how to compute the cycle index of the induced action of $S_N$ on the ${N\choose Q}$ tickets of $Q$ elements. This can be done quite effectively by computing a representative of the permutation shape from the cycle index of the symmetric group, letting it act on the tickets, and factoring the result into cycles for a contribution to the desired cycle index.

Setting $Q=5$ as in the question we obtain for $N=7$ the sequence $$1, 2, 5, 10, 21, 41, 65, 97, 131, 148, 148, 131,\ldots$$ for $N=8$ the sequence $$1, 3, 11, 52, 252, 1413, 7812, 41868, 207277, 936130, 3826031,\\ 14162479,\ldots$$ for $N=9$ the sequence $$1, 4, 20, 155, 1596, 20528, 282246, 3791710, 47414089, 542507784,\\ 5659823776,53953771138,\ldots$$ and finally for $N=10$ the sequence $$1, 5, 28, 324, 5750, 142148, 3937487, 108469019, 2804300907,\\ 66692193996,1452745413957, 29041307854703,\ldots.$$

To illustrate the good complexity of this algorithm here is the sequence for $N=13:$ $$1, 5, 42, 813, 34871, 2777978, 304948971, 37734074019,\\ 4719535940546, 566299855228261, 63733180893169422,\\ 6674324951638852138,\ldots$$

Finally we obtain for $N$ variable with $Q=5$ and $T=3$ the sequence $$0, 0, 0, 0, 0, 1, 5, 11, 20, 28, 35, 39, 42, 43,\\ 44, 44, 44, 44,\ldots$$

The Maple code to compute these was as follows:

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 := Array([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 l; 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_flat2rep := proc(f) local p, q, res, t, len;

q := 1; res := [];

for t in f do
    len := op(1, t);
    res := [op(res), seq(p, p=q+1..q+len-1), q];
    q := q+len;
od;

res;

end;

pet_cycleind_tickets := proc(N, Q) option remember; local cind, tickets, q, term, rep, subsl, ptickets, idx, flat;

if N=1 then
   idx := [a[1]]
else
   idx := pet_cycleind_symm(N);
fi;

cind := 0;

tickets := convert(choose({seq(q, q=1..N)}, Q), `list`);

for term in idx do
    flat := pet_flatten_term(term);
    rep := pet_flat2rep(flat[2]);

    subsl := [seq(q=rep[q], q=1..N)];

    ptickets := subs(subsl, tickets);

    cind := cind +
    flat[1]*pet_autom2cycles(tickets, ptickets);
od;

cind;

end;

X := proc(N, Q, T) option remember; local idx_slots, idx_cols, res, term_a, term_b, v_a, inst_a, inst_b, len_a, p;

if N = 0 then return 1 fi;

if T = 1 then
    idx_slots := [a[1]];
else
    idx_slots := pet_cycleind_symm(T);
fi;

idx_cols := pet_cycleind_tickets(N, Q);

res := 0;

for term_a in idx_slots do
    for term_b in idx_cols do
        p := 1;

        for v_a in indets(term_a) do
            len_a := op(1, v_a);
            inst_a := degree(term_a, v_a);
            inst_b := degree(term_b, v_a);

            if inst_b >= inst_a then
                p := p*binomial(inst_b, inst_a)
                *inst_a!*len_a^inst_a;
            else
                p := 0;
                break;
            fi;
        od;

        res := res +
        lcoeff(term_a)*lcoeff(term_b)*p;
    od;
od;

res;

end;

Addendum Fri Aug 14 2015. The sequence for $Q=5$ and $N=20$ is $$1, 5, 44, 966, 53484, 7023375, 1756229468, 710218125299, \\ 411620592905173, 308212635851733551, 271743509344779773214,\ldots$$

Addendum Sat Aug 15 2015. The sequence for $Q=5$ and $N=22$ is $$1, 5, 44, 966, 53529, 7041834, 1773511264, 734330857318, \\ 452455270344141, 383969184978128899, 416614280701828877344, \\ 536531456518633409220043, 766723127226754935510254929,\ldots$$

Addendum Wed Aug 19 2015. The sequence for $Q=5$ and $N=24$ is $$1, 5, 44, 966, 53534, 7043732, 1775444689, 737776095236, \\ 460462767067281, 405308264117856150, 477303563740811267063, \\ 712445246443357547546003, 1271053814158420923816386794,\ldots$$

Marko Riedel
  • 61,317
0

There are $\binom{N}{5}$ possible tickets, you are asking how many $T$-subsets of those there are, i.e., the number of systems is:

$$ \binom{\binom{N}{5}}{T} $$

(somehow I'm feeling I'm just being stupid here... can't be that easy?)

vonbrand
  • 27,812
  • 1
    You appear to have missed the part where the OP says "Two systems are distinct if .." – Marko Riedel Aug 14 '15 at 22:00
  • @MarkoRiedel, "are unique up to permutation" is just sets in my book... – vonbrand Aug 14 '15 at 22:06
  • These lottery tickets are indeed sets. The permutation however acts on the $N$ values from which they are drawn. E.g. the ticket ${1,2,3,4,5}$ drawn from $N=10$ could be transformed into the ticket ${6,7,8,9,10}$ by a permutation of the $N$ values that exchanges the upper and lower five values (permutation not unique). – Marko Riedel Aug 14 '15 at 22:11
  • The permutation acts simultaneously on all tickets in a system of size $T,$ which is indeed a set of tickets. – Marko Riedel Aug 14 '15 at 22:26
0

This kind of constructions have a name in species theory, which is "functorial/functional composition" and they made Rota from MIT to be very enthusiastic on the future of the Species Theory. Whatever the name is, it comes down to count fixed points. I will exemplify with a very small example. The example setup is like this:

  • we take four vertices
  • we build six new "tickets" A, B,...,F (edges over the four vertices)
  • we use the new six tickets to label cycles of lenght 6

There are 120 distinct labelled cycles of lenght 6. The action of $S_6$ is transitive on these labels i.e. we have a only one block of trasitivity. The table of the action contains 120 fixed points and each labelled cycle can be transported on any other labeled cycle by the mean of a permutations in $S_6$

But if we consider only 24 permutations in $S_6$ induced by $S_4$, the unique block will split in 7 blocks of transitivity : 120 = 24+24+24+24+8+8+8.

As above in the answer we have to check the effect of a 4-permutation on a 6-permutation.

1 x (1,1,1,1) induces (1,1,1,1,1,1) that has 120 fixed points

6 x (1,1,2) induces (1,1,2,2) that fixes nothing

3 x (2,2) induces 3 x (1,1,2,2) that fixes nothing

8 x (1,3) induces 8 x (3,3) and one (3,3) fixes six cycles, for a total of 48 fixed points

6 x (4) induces 6 x (2,4) that fixes nothing

for a total of 120 + 48 = 168 fixed points induced by 24 permutations, that means there are 7 blocks of transitivity.

The obtained cycle index reveals itself to be $$4x^6 + 3 {x^6 + 2c^2 \over 3 } $$ where trained eye may spot a sum of seven molecular species

$$ 4.X^6 + 3.Cyc_3(X.X) $$

which is a still a species on 6 labels and not on 4 labels (this is bad news).

While other operations with species are related to the wreath product, cartesian product or the action on a subset, this one is about taking a subgroup of $S_6$

===========

However, there is also good news.

Over time, the operations with cycle indices revealed to be cycle-wise. Deep behind the machinery of combinatorial structures there is an underlying "gear algebra".

Boyku
  • 712
  • 3
  • 10