// Numbas version: finer_feedback_settings {"name": "Simple permutation and combination", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["n", "m", "r"], "name": "Simple permutation and combination", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

The number of ways of arranging (permuting) a set of $n$ distinct objects is given by $n!$, (said $n$ factorial).

\n

For instance $5! = 5 \\times 4 \\times 3 \\times 2 \\times 1$.

\n

When choosing $r$ distinct objects from $n$ (where the order does not matter) the number of different ways of doing this is given by $^nC_r = \\binom{n}{ r}= \\dfrac{n!}{(n-r)! r!}$.

\n

So for instance the number of ways of choosing 3 objects from 5 will be given by $\\dfrac{5!}{3! \\times 2!} = \\dfrac{ 5 \\times 4}{2 \\times 1} = 10$.

\n

This mathcentre leaflet provides an introduction to factorial notation.

\n

", "rulesets": {}, "parts": [{"prompt": "

How many ways are there of arranging $ \\var{n} $ different books on a shelf?

", "allowFractions": false, "variableReplacements": [], "maxValue": "{n}!", "minValue": "{n}!", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"prompt": "

How many different ways are there of choosing $\\var{r}$ people from a group of $\\var{m}$ people?

", "allowFractions": false, "variableReplacements": [], "maxValue": "{m}!/({r}! * ({m}-{r})!)", "minValue": "{m}!/({r}! * ({m}-{r})!)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "extensions": [], "statement": "

Find the number of ways of doing the following.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"r": {"definition": "random(2..3)", "templateType": "anything", "group": "Ungrouped variables", "name": "r", "description": ""}, "m": {"definition": "random(4..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "n": {"definition": "random(4..7)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}}, "metadata": {"description": "

Permutation of n objects; choosing e.g. 3 from 5.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}]}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}