Sampling and Allocation Problems
In questa pagina 4
Counting problems can be modelled in two different ways: as sampling problems or as allocation problems. The choice of the model is a matter of taste; a sampling problem can often be restated as an allocation problem and vice versa. The tool underneath is the multiplication principle of Counting PrinciplesCounting finite sets rests on the addition principle for disjoint sets and the multiplication principle for staged procedures, which requires a constant number of outcomes at each stage and distinct composite outcomes.Counting Principles →.
Sampling problems
In a sampling problem there is an urn containing balls that are drawn.
- The urn contains balls. The balls can be all distinct (e.g. numbered) or distinct in groups (e.g. black and red, ).
- draws are made from the urn. They can be with replacement (after drawing the ball and recording the result the ball is returned to the urn) or without replacement (the ball is thrown away).
- Count how many distinct results of the draws are possible. This can be done in two ways:
- count dispositions: two results that differ in the order in which the balls are drawn are considered distinct;
- count combinations: all results that differ only in the order of appearance of the balls are counted as identical.
Example (academic records). Count how many academic records for the major courses of Information Engineering are possible. There are 17 major courses (12 CFU and 9 CFU) and each can be passed with a grade from 18 to 30 laude, for a total of 14 passing grades.
As a sampling problem: the urn contains 14 distinct balls numbered ; a total of 17 draws with replacement are made in sequence; count the dispositions of the 17 balls. Interpretation: the 14 balls are the possible grades of each exam; each draw is the passing grade of one exam (the first draw is e.g. Calculus 1, the second Linear Algebra, and so on in a specified order); the ball is replaced because at each exam all passing grades are possible; dispositions are counted because the order matters ( means 27 in Calculus 1 and 21 in Linear Algebra, while is a different record).
Counting: 1st draw 14 outcomes, 2nd draw 14 outcomes irrespective of the 1st, ..., 17th draw 14 outcomes irrespective of the previous draws. All results of the 17 draws produce different academic records. Constraints (A) and (B) of the multiplication principle are satisfied and the total number of academic records is .
"Sampling" is the name because the action of drawing is also called sampling.
Allocation problems
An allocation problem has:
- cells (distinct, e.g. numbered);
- tokens, which can be distinct (e.g. numbered) or identical (the notes insist: never call the tokens of an allocation problem "balls", to avoid confusion with sampling);
- allocation constraints of tokens in cells: no constraints (any cell can contain from to tokens), or insert all tokens with at most 1 per cell (each cell has either or token).
The problem is to count the number of distinct allocations given 1, 2, 3.
Example. The academic-records count as an allocation problem: cells (the grades) and distinct tokens (the courses) with no allocation constraints. By the multiplication principle: the first token can go into any of the 14 cells, the second into any of the 14 cells, ..., the 17th into any of the 14 cells, for a total of allocations, the same result as before.
Dictionary
| Sampling | Allocation |
|---|---|
| balls | cells |
| draws | tokens |
| draws with replacement | no allocation constraints |
| draws without replacement | at most one token per cell |
| count dispositions | tokens are distinct (e.g. numbered) |
| count combinations | identical tokens |
Traditional definitions
I. Dispositions with repetitions
distinct objects taken at a time (any , possibly larger than ). Sampling model: urn with distinct balls, draws with replacement (repetitions), count dispositions: Example: academic records.
II. Dispositions without repetitions
distinct objects taken at a time, . Sampling model: urn with distinct balls, draws without replacement (no repetitions), count dispositions: .
Definition. Example: cross-country race (podiums ).
IIa. Special case (permutations). Example: all orders of arrival in the cross-country race.
III. Combinations without repetitions
distinct objects taken at a time, . Sampling model: urn with distinct (numbered) balls, draws without replacement, count combinations.
The permutations of a given disposition all give rise to the same combination. For instance the permutations of the disposition , namely , count as only 1 combination. Calling the number of combinations without repetitions, where is the alternative notation (the binomial coefficient, see Binomial CoefficientsBinomial coefficients count the k-element subsets of an n-element set, satisfy the symmetry and Pascal recursion, and combined with equiprobable measures they give probabilities such as team selection, train boarding and urn draws.Binomial Coefficients →). (The page writes the last factor of the numerator as ; the correct last factor, consistent with the definition of and with the next pages, is .)
Counting as an allocation problem. distinct cells, identical tokens, insert all tokens with at most 1 per cell (). It is easier to consider the tokens first as if they were numbered: the number of possible allocations is , since there are choices for the first token, for the second, and so on (multiplication principle). Now all permutations of a given allocation give the same combination (think of erasing the numbers from the tokens, which then become all identical). The number of allocations with identical tokens is therefore , as computed before.
Other problems solved by
- Number of sequences of bits containing bits equal to 1. This is the problem of counting how many sequences of coin tosses show heads: cells (the bits), identical tokens (the bits equal to 1); in how many ways can one allocate bits 1 in cells? The solution is .
- Subsets of cardinality of a set of cardinality . Natural as a sampling problem: draw elements without replacement from the elements and count combinations: the number of subsets is . Equivalent example: the number of committees of people chosen among people.
Summary of the four counting formulas
| Model | Count |
|---|---|
| dispositions with repetitions of objects taken at a time | |
| dispositions without repetitions () | |
| permutations () | |
| combinations without repetitions () |
Probability applications of these counts are in Binomial CoefficientsBinomial coefficients count the k-element subsets of an n-element set, satisfy the symmetry and Pascal recursion, and combined with equiprobable measures they give probabilities such as team selection, train boarding and urn draws.Binomial Coefficients → and The Birthday ProblemThe probability that at least two of n children share a birthday is computed through the complementary event of all-distinct birthdays, and already n = 23 gives probability above one half.The Birthday Problem →.
Versione ripasso
- Sampling: urn with balls, draws with or without replacement; count dispositions (order matters) or combinations (order ignored).
- Allocation: distinct cells, tokens (distinct or identical; never call them balls), constraints: none, or at most one per cell.
- Dictionary: with replacement = no constraints; without replacement = at most one token per cell; dispositions = distinct tokens; combinations = identical tokens.
- Dispositions with repetitions: (academic records: ).
- Dispositions without repetitions: ; permutations .
- Combinations: the orderings of one disposition give the same combination, so
- also counts: bit sequences of length with ones; subsets of size of an -set; committees of among people.
- Typical mistakes: confusing dispositions with combinations; using when draws are without replacement.