Skip to main content
Modified “correct” to “alternative”
Source Link
JimB
  • 42.9k
  • 3
  • 51
  • 108

I'm going to argue that the count of 155 is the correctalternative number of unique 4-person ensembles such that at least 2 persons can sing and at least 2 persons can dance.

Definition of ensemble

In short, the methods resulting in 199 ensembles have duplicates. For example, the ensemble {{4,7},{6,10}} is also included in the 199 as {{4,6},{7,10}}. Those two form an identical ensemble {4,6,7,10} and therefore should be counted only once. (Yes, this ignores the assignment of who is dancing and who is singing.)

To borrow heavily from @SimonWoods:

singerpairs = Subsets[Range[1, 8], {2}]
dancerpairs = Subsets[Range[6, 10], {2}]

ensembles = Select[Union @@@ Tuples[{singerpairs, dancerpairs}], Length[#] == 4 &];
Length @ %
(* 199 *)

But now the duplicates need to be removed:

ensembles = Sort[#] & /@ ensemble // DeleteDuplicates;
Length @ %
(* 155 *)

If listing ensembles is of interest and the total number of ensembles is manageable, then code variations of the above with the deleting of the duplicates is reasonable. If the number of ensembles is very large and only the total number of ensembles is needed, then a bit of thinking is needed to write down a formula for the total count.

Here there is just a small number of possible selections from each group (only sing, sing and dance, and only dance) that need enumerating:

counts = {{2, 2, 0}, {2, 1, 1}, {2, 0, 2}, {1, 3, 0}, {1, 2, 1}, {1, 1, 2}, {0, 3, 1}, {0, 2, 2}}
TableForm[counts, TableHeadings -> {None, {"Only\nsing", "Sing &\ndance", "Only\ndance"}},
  TableAlignments -> Center]

Table of possible counts from each group

Then applying the sum of the products of 3 binomial coefficients is needed:

Binomial[5, #[[1]]] Binomial[3, #[[2]]] Binomial[2, #[[3]]] & /@ counts // Total
(* 155 *)

I'm going to argue that the count of 155 is the correct number of unique 4-person ensembles such that at least 2 persons can sing and at least 2 persons can dance.

Definition of ensemble

In short, the methods resulting in 199 ensembles have duplicates. For example, the ensemble {{4,7},{6,10}} is also included in the 199 as {{4,6},{7,10}}. Those two form an identical ensemble {4,6,7,10} and therefore should be counted only once.

To borrow heavily from @SimonWoods:

singerpairs = Subsets[Range[1, 8], {2}]
dancerpairs = Subsets[Range[6, 10], {2}]

ensembles = Select[Union @@@ Tuples[{singerpairs, dancerpairs}], Length[#] == 4 &];
Length @ %
(* 199 *)

But now the duplicates need to be removed:

ensembles = Sort[#] & /@ ensemble // DeleteDuplicates;
Length @ %
(* 155 *)

If listing ensembles is of interest and the total number of ensembles is manageable, then code variations of the above with the deleting of the duplicates is reasonable. If the number of ensembles is very large and only the total number of ensembles is needed, then a bit of thinking is needed to write down a formula for the total count.

Here there is just a small number of possible selections from each group (only sing, sing and dance, and only dance) that need enumerating:

counts = {{2, 2, 0}, {2, 1, 1}, {2, 0, 2}, {1, 3, 0}, {1, 2, 1}, {1, 1, 2}, {0, 3, 1}, {0, 2, 2}}
TableForm[counts, TableHeadings -> {None, {"Only\nsing", "Sing &\ndance", "Only\ndance"}},
  TableAlignments -> Center]

Table of possible counts from each group

Then applying the sum of the products of 3 binomial coefficients is needed:

Binomial[5, #[[1]]] Binomial[3, #[[2]]] Binomial[2, #[[3]]] & /@ counts // Total
(* 155 *)

I'm going to argue that the count of 155 is alternative number of unique 4-person ensembles such that at least 2 persons can sing and at least 2 persons can dance.

Definition of ensemble

In short, the methods resulting in 199 ensembles have duplicates. For example, the ensemble {{4,7},{6,10}} is also included in the 199 as {{4,6},{7,10}}. Those two form an identical ensemble {4,6,7,10} and therefore should be counted only once. (Yes, this ignores the assignment of who is dancing and who is singing.)

To borrow heavily from @SimonWoods:

singerpairs = Subsets[Range[1, 8], {2}]
dancerpairs = Subsets[Range[6, 10], {2}]

ensembles = Select[Union @@@ Tuples[{singerpairs, dancerpairs}], Length[#] == 4 &];
Length @ %
(* 199 *)

But now the duplicates need to be removed:

ensembles = Sort[#] & /@ ensemble // DeleteDuplicates;
Length @ %
(* 155 *)

If listing ensembles is of interest and the total number of ensembles is manageable, then code variations of the above with the deleting of the duplicates is reasonable. If the number of ensembles is very large and only the total number of ensembles is needed, then a bit of thinking is needed to write down a formula for the total count.

Here there is just a small number of possible selections from each group (only sing, sing and dance, and only dance) that need enumerating:

counts = {{2, 2, 0}, {2, 1, 1}, {2, 0, 2}, {1, 3, 0}, {1, 2, 1}, {1, 1, 2}, {0, 3, 1}, {0, 2, 2}}
TableForm[counts, TableHeadings -> {None, {"Only\nsing", "Sing &\ndance", "Only\ndance"}},
  TableAlignments -> Center]

Table of possible counts from each group

Then applying the sum of the products of 3 binomial coefficients is needed:

Binomial[5, #[[1]]] Binomial[3, #[[2]]] Binomial[2, #[[3]]] & /@ counts // Total
(* 155 *)
Source Link
JimB
  • 42.9k
  • 3
  • 51
  • 108

I'm going to argue that the count of 155 is the correct number of unique 4-person ensembles such that at least 2 persons can sing and at least 2 persons can dance.

Definition of ensemble

In short, the methods resulting in 199 ensembles have duplicates. For example, the ensemble {{4,7},{6,10}} is also included in the 199 as {{4,6},{7,10}}. Those two form an identical ensemble {4,6,7,10} and therefore should be counted only once.

To borrow heavily from @SimonWoods:

singerpairs = Subsets[Range[1, 8], {2}]
dancerpairs = Subsets[Range[6, 10], {2}]

ensembles = Select[Union @@@ Tuples[{singerpairs, dancerpairs}], Length[#] == 4 &];
Length @ %
(* 199 *)

But now the duplicates need to be removed:

ensembles = Sort[#] & /@ ensemble // DeleteDuplicates;
Length @ %
(* 155 *)

If listing ensembles is of interest and the total number of ensembles is manageable, then code variations of the above with the deleting of the duplicates is reasonable. If the number of ensembles is very large and only the total number of ensembles is needed, then a bit of thinking is needed to write down a formula for the total count.

Here there is just a small number of possible selections from each group (only sing, sing and dance, and only dance) that need enumerating:

counts = {{2, 2, 0}, {2, 1, 1}, {2, 0, 2}, {1, 3, 0}, {1, 2, 1}, {1, 1, 2}, {0, 3, 1}, {0, 2, 2}}
TableForm[counts, TableHeadings -> {None, {"Only\nsing", "Sing &\ndance", "Only\ndance"}},
  TableAlignments -> Center]

Table of possible counts from each group

Then applying the sum of the products of 3 binomial coefficients is needed:

Binomial[5, #[[1]]] Binomial[3, #[[2]]] Binomial[2, #[[3]]] & /@ counts // Total
(* 155 *)