// Numbas version: finer_feedback_settings {"type": "question", "showQuestionGroupNames": false, "variable_groups": [], "question_groups": [{"pickQuestions": 0, "pickingStrategy": "all-ordered", "name": "", "questions": [{"name": "Combinations of one choice from each of three groups, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..10)", "description": "", "name": "b"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(15..30)", "description": "", "name": "a"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..10)", "description": "", "name": "c"}}, "ungrouped_variables": ["a", "c", "b"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "a*b*c", "minValue": "a*b*c", "correctAnswerFraction": false, "marks": 2, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Number of different ways = ?[[0]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

A restaurant has a menu with $\\var{a}$ starters, $\\var{b}$ main courses and $\\var{c}$ desserts.

\n

How many different ways are there of choosing one starter, one main course and one dessert?

", "tags": ["checked2015", "combinatorics", "counting", "MAS1701", "MAS2216", "sc"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

7/02/2013:

\n

Finished first draft. Included the sc tag.

\n

Need more information for description and tags.

\n

 

", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

The total number of possibilities is $\\var{a}\\times \\var{b}\\times \\var{c}=\\var{a*b*c}$

"}, {"name": "Number of permutations of three groups of items, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "b"}, "ans": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(a+b,a)*comb(a+b+c,c)", "description": "", "name": "ans"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "a"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "c"}}, "ungrouped_variables": ["a", "c", "b", "ans"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans", "minValue": "ans", "correctAnswerFraction": false, "marks": 2, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Number of ways = ?[[0]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

Suppose I drink $\\var{a}$ cups of water, $\\var{b}$ cups of tea, and $\\var{c}$ cups of coffee every day. How many ways can I arrange the order in which I drink them?

", "tags": ["checked2015", "combinatorics", "counting", "MAS1701", "MAS2216", "multinomial", "order", "sc", "selection"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

7/02/2013:

\n

Finished first draft. Included sc tag. Need more information for description and for other tags.

", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

The Multinomial Theorem can be used to count the number of ways.

\n

The total number of possibilities = $\\displaystyle \\frac{\\var{a+b+c}!}{\\var{a}!\\var{b}!\\var{c}!}=\\var{ans}$

"}, {"name": "Pigeonhole principle - greatest number of people with birthdays in the same month, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"ans": {"templateType": "anything", "group": "Ungrouped variables", "definition": "ceil(a/12)", "description": "", "name": "ans"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(50..500)", "description": "", "name": "a"}}, "ungrouped_variables": ["a", "ans"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "variable_groups": [], "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans", "minValue": "ans", "showCorrectAnswer": true, "marks": 2}], "type": "gapfill", "prompt": "

Largest $N=\\;$?[[0]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

Suppose there are $\\var{a}$  people at a party.  What is the largest $N$ such that there are at least $N$ people who share a birthday in the same month?

", "tags": ["checked2015", "combinatorics", "counting", "MAS1701", "MAS2216", "pigeon-hole principle"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

7/02/2013:

\n

First draft finished. Need to find out what description and tags are needed.

", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "advice": "

The generalized pigeon hole principle shows that there are at least $\\displaystyle \\frac{\\var{a}}{12}$  people who share a birthday in the same month. This gives an answer of $\\var{ans}$ .

"}, {"name": "Simple combinations, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(15..30)", "name": "b", "description": ""}, "ans": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a*c+b*d", "name": "ans", "description": ""}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..10)", "name": "d", "description": ""}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(15..30)", "name": "a", "description": ""}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..10)", "name": "c", "description": ""}}, "ungrouped_variables": ["a", "c", "b", "d", "ans"], "rulesets": {}, "showQuestionGroupNames": false, "functions": {}, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "ans", "maxValue": "ans", "marks": 2, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Number of choices = ?[[0]]

", "showCorrectAnswer": true, "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

There are two shops that sell jumpers. The first shop has $\\var{a}$  designs and  $\\var{c}$ colours. The second shop has  $\\var{b}$ designs and $\\var{d}$  colours. The designs in the first and second shop are all different. How many choices of jumper do I have?

", "tags": ["checked2015", "combinatorics", "MAS1701", "MAS2216", "sc"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

7/02/2013:

\n

Finished first draft. Need advice on tags and description.

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Two shops each have different numbers of jumper designs and colours. How many choices of jumper are there?

"}, "advice": "

There are  $\\var{a} \\times \\var{c}=\\var{a*c}$ ways to get a jumper from the first shop and  $\\var{b} \\times \\var{d}=\\var{b*d}$ ways to get a jumper from the second shop. Adding these two numbers together gives a total of $\\var{ans}$  possible jumpers.

"}, {"name": "Coefficient in the expansion of a multinomial, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"ans": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(n,a)*comb(n-a,b)*comb(n-a-b,c)*comb(d+f,d)", "description": "", "name": "ans"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a+b+c+d+f", "description": "", "name": "n"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "name": "c"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "name": "f"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "d"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "a"}}, "ungrouped_variables": ["a", "c", "b", "d", "f", "n", "ans"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans", "minValue": "ans", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Coefficient = ?[[0]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

What is the coefficient of $x_1^{\\var{a}}x_2^{\\var{b}}x_3^{\\var{c}}x_4^{\\var{d}}x_5^{\\var{f}}$ in the expansion of $(x_1+x_2+x_3+x_4+x_5)^{\\var{n}}$?

", "tags": ["checked2015", "coefficients in an expansion", "combinatorics", "MAS1701", "MAS2216", "multinomial coefficient", "multinomial theorem"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

7/02/2013:

\n

Finished first draft. Need a description and perhaps more tags.

", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

The Multinomial Theorem can be used to solve this question.

\n

The coefficient is: 

\n

\\[\\frac{\\var{n}!}{\\var{a}!\\var{b}!\\var{c}!\\var{d}!\\var{f}!}=\\var{ans}\\]

"}, {"name": "Number of combinations without replacement - lotto ticket, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(4..7)", "description": "", "name": "b"}, "ans": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(a,b)", "description": "", "name": "ans"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(30..50)", "description": "", "name": "a"}}, "ungrouped_variables": ["a", "b", "ans"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans", "minValue": "ans", "correctAnswerFraction": false, "marks": 2, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Number of tickets = ?[[0]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

In a lotto game a player buys a ticket and selects $\\var{b}$ numbers from a list of the numbers from $1$ to $\\var{a}$.

\n

Then $\\var{b}$ winning numbers are selected at random without replacement.

\n

How many tickets would you need to buy in order to be sure of choosing all $\\var{b}$ numbers correctly?

", "tags": ["binomial coefficients", "checked2015", "choosing without replacement", "combinations", "counting", "MAS1701", "MAS2216", "sc", "selecting"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

7/02/2013:

\n

Finished first draft. Description and tags need to be completed. Added tag sc.

", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

Each choice of $\\var{b}$ numbers results in a subset of the numbers $1$ to $\\var{a}$.

\n

The number of such possibilities is equal to the number of $\\var{b}$-subsets of $\\var{a}$ elements, so you need to buy this number of tickets to guarantee a win!

\n

\\[\\binom{\\var{a}}{\\var{b}}=\\var{ans}.\\] 

"}, {"name": "Number of multisets from a given set, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"ans": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(p+b-1,b)", "description": "", "name": "ans"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..10)", "description": "", "name": "p"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(tb<=p,p+1,tb)", "description": "", "name": "b"}, "tb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(7..15)", "description": "", "name": "tb"}}, "ungrouped_variables": ["p", "b", "tb", "ans"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans", "minValue": "ans", "correctAnswerFraction": false, "marks": 2, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Number of ways = [[0]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

A car dealership employs $\\var{p}$ salespeople. A salesperson receives £100 for each car they sell.

\n

Yesterday, the dealership sold $\\var{b}$ cars.

\n

In how many ways could this happen?

\n

(Consider two scenarios different if they result in different bonus payments).

", "tags": ["binomial coefficient", "checked2015", "combinations", "combinatorics", "counting", "MAS1701", "MAS2216", "multisets", "sc"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

7/02/2013:

\n

Finished first draft. A description and more tags needed. Included sc tag.

", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

We are not interested in the order in which the cars were sold, but in the number of cars each salesperson sold.

\n

Therefore we are interested in the number of $\\var{b}$-multisets from a set of size $\\var{p}$.

\n

So the number of possibilities is given by:

\n

\\[\\binom{\\var{p+b-1}}{\\var{b}}=\\var{ans}\\]

"}, {"name": "Number of permutations of a finite set, ", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"ans": {"templateType": "anything", "group": "Ungrouped variables", "definition": "factorial(a)", "description": "", "name": "ans"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..13)", "description": "", "name": "a"}}, "ungrouped_variables": ["a", "ans"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans", "minValue": "ans", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Number of outcomes = ?[[0]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

Suppose $\\var{a}$ people take part in a race. How many different outcomes does the race have, assuming that there are no ties? This includes all $\\var{a}$ positions.

", "tags": ["checked2015", "combinatorics", "MAS1701", "MAS2216", "number of ways of ordering a finite set", "ordering", "permutations", "sc"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

7/02/2013:

\n

Finished first draft. Need a description and perhaps more tags. Included an sc tag.

", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

There are $\\var{a}$ choices for who comes first.

\n

There are therefore $\\var{a-1}$ choices for whoever comes second and so on. 

\n

So there are $\\var{a}\\times \\var{a-1}\\times \\cdots\\times1=\\var{a}!=\\var{ans}$ ways in which the race can finish.

"}, {"name": "Number of ways of choosing subsets with a condition, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "m+f", "description": "", "name": "t"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..9)", "description": "", "name": "n"}, "ans": {"templateType": "anything", "group": "Ungrouped variables", "definition": "comb(t,n)-comb(m,n)-comb(f,n)", "description": "", "name": "ans"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(10..20)", "description": "", "name": "m"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(10..20)", "description": "", "name": "f"}}, "ungrouped_variables": ["n", "m", "t", "f", "ans"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans", "minValue": "ans", "correctAnswerFraction": false, "marks": 2, "showPrecisionHint": false}], "type": "gapfill", "prompt": "

Number of ways to form a committee = ?[[0]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

A company has $\\var{t}$ employees, $\\var{m}$ males and $\\var{f}$ females.

\n

How many ways are there to form a committee of $\\var{n}$ employees that contains at least one male and one female?

", "tags": ["binomial coefficient", "checked2015", "choosing", "choosing subsets", "combinations", "combinatorics", "counting", "MAS1701", "MAS2216", "sc", "selecting"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

7/02.2013:

\n

Finished first draft. Need a description and more tags. Included sc tag.

", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

There are $\\displaystyle \\binom{\\var{t}}{\\var{n}}$ in which to form the committee when there are no conditions on the number of males and females needed.

\n

There are $\\displaystyle \\binom{\\var{f}}{\\var{n}}$ ways to form a committee with no males in it.

\n

There are $\\displaystyle \\binom{\\var{m}}{\\var{n}}$ ways to form a committee with no females in it.

\n

This give a total of $\\displaystyle \\binom{\\var{t}}{\\var{n}}-\\displaystyle \\binom{\\var{f}}{\\var{n}}-\\displaystyle \\binom{\\var{m}}{\\var{n}}=\\var{ans}$ ways to form the committee with at least one male and one female in it.

"}]}], "name": "Maria's copy of Enumeration and Combinatorics", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Questions used in a university course titled \"Enumeration and Combinatorics\""}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}