1) The number of all (p,q) shuffles is
Binomial[p+q,p]
since when you chose the first p elements, the whole thing (and its order) is given.
2)The actual shuffles are given by: (See JM's comment below*)
With[{x = Range@#1}, {#, Complement[x, #]} & /@ Subsets[x, {#2}]] &[p + q, p]
Example:
p = 3; q = 2;
With[{x = Range@#1}, {#, Complement[x, #]} & /@ Subsets[x, {#2}]] &[p + q, p]
(*
->
{{{1, 2, 3}, {4, 5}}, {{1, 2, 4}, {3, 5}}, {{1, 2, 5}, {3, 4}}, {{1, 3, 4}, {2, 5}},
{{1, 3, 5}, {2, 4}}, {{1, 4, 5}, {2, 3}}, {{2, 3, 4}, {1, 5}}, {{2, 3, 5}, {1, 4}},
{{2, 4, 5}, {1, 3}}, {{3, 4, 5}, {1, 2}}}
3) The sign of each permutation (for the above shuffles) is given by:
Signature/@ With[{x=Range@#1}, Join[#, Complement[x, #]] & /@ Subsets[x, {#2}]] &[p+q,p]
Example:
p = 3; q = 2;
Signature/@ With[{x=Range@#1}, Join[#, Complement[x, #]] & /@ Subsets[x, {#2}]] &[p+q,p]
(*
-> {1, -1, 1, 1, -1, 1, -1, 1, -1, 1}
*)
With[{p = 4, q = 5}, Union[Join[Sort[Take[#, p]], Sort[Take[#, -q]]] & /@ Permutations[Range[p + q]]]]
$\endgroup$