// Numbas version: exam_results_page_options {"name": "Counting 1: permutation and combination", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Counting 1: permutation and combination", "tags": [], "metadata": {"description": "

Introduction to counting with permutations and combinations

", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "statement": "

How many ways can you choose $r$ distinct objects from $n$ possible objects?

\n

The answer depends upon whether the order of selection is important.

\n\n

The NUMBAS syntax for $P(n,r)$ and $C(n,r)$ is perm(n,r) and comb(n,r).

", "advice": "

For part a, choosing $\\var{r}$ from $\\var{n}$ distinct objects when order matters can be done in $P(\\var{n},\\var{r}) = \\var{perm(n,r)}$ ways.

\n

For part b, choosing $\\var{r2}$ from $\\var{n}$ distinct objects when order does not matter can be done in $C(\\var{n},\\var{r2}) = \\var{comb(n,r2)}$ ways.

", "rulesets": {}, "extensions": [], "variables": {"r2": {"name": "r2", "group": "Ungrouped variables", "definition": "r", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(1..9 except a1)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(5..9)", "description": "", "templateType": "anything"}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "random(1..9 except [a1,a2])", "description": "", "templateType": "anything"}, "r": {"name": "r", "group": "Ungrouped variables", "definition": "random(2..(n-1))", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a1", "a2", "a3", "n", "r", "r2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

You have $\\var{n}$ disctinct Discrete Mathematics textbooks, but you can only display $\\var{r}$ in a row on your bookshelf. How many ways can you arrange your Discrete Mathematics textbooks?

", "stepsPenalty": 0, "steps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Does the order of books on your bookshelf matter?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

Yes

", "

No

"], "matrix": ["0.5", 0], "distractors": ["Good, you have a well-ordered shelf.", "No, go home and arrange your books properly."]}, {"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

If order matters, then the answer is $P(\\var{n},\\var{r})$. 

\n

If the order does not matter, then the answer is $C(\\var{n},\\var{r})$.

"}], "answer": "{perm(n,r)}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

You want to keep your valuable Discrete Mathematics textbooks close at all times. But it's time for class and you only have room for $\\var{r2}$ Discrete Mathematics books in your backpack. How many ways can you pack your backpack?

", "stepsPenalty": 0, "steps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Does the order in which you place books into your backpack change which books you take to UNSW?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

Yes

", "

No

"], "matrix": [0, "0.5"], "distractors": ["Perhaps you should get a better backpack.", "The order does not matter in this scenario."]}, {"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

If order matters, then the answer is $P(\\var{n},\\var{r2})$. 

\n

If the order does not matter, then the answer is $C(\\var{n},\\var{r2})$.

"}], "answer": "{comb(n,r2)}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}], "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Sean Gardiner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2443/"}]}]}], "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Sean Gardiner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2443/"}]}