// Numbas version: exam_results_page_options {"name": "Counting Problem 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Counting Problem 1", "tags": [], "metadata": {"description": "x boys and two girls arranged on a bench", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "
\n

Note: In this question please give full answers, do not round your results.

\n

A group of {boys} boys and {girls} girls sit on a bench. Determine the number of possible arrangements, given that

\n
\n
\n

\n
\n
", "advice": "

In part (a) you can work out the total number of arrangements $ \\var{(b+g)}!$ and subtract the arrangements which involve the girls sitting together $ 2! \\times \\var{b+1}!$

\n

$ \\var{(b+g)}! - 2 \\times \\var{b+1}! = \\var{ans_a}$

\n

In part (b) you can imagine placing two boys at either end and then you have $ \\var{b} $ places left to fill with anyone.

\n

$ \\var{b} \\times \\var{b-1} \\times \\var{b}!= \\var{ans_b}$

\n

In part (c) you can combine the logic from the previous two steps

\n

$ \\var{b} \\times \\var{b-1} \\times (\\var{b}! -2 \\times \\var{b - 1}! )= \\var{ans_c}$

\n

", "rulesets": {}, "extensions": [], "variables": {"words": {"name": "words", "group": "Ungrouped variables", "definition": "[ \"zero\", \"one\", \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\", \"nine\", \"ten\" ]", "description": "

to convert number to words

", "templateType": "list of strings"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(7 .. 10#1)", "description": "

number of boys

", "templateType": "randrange"}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "2", "description": "

number of girls

", "templateType": "number"}, "boys": {"name": "boys", "group": "Ungrouped variables", "definition": "words[b]", "description": "

number of boys

", "templateType": "anything"}, "girls": {"name": "girls", "group": "Ungrouped variables", "definition": "words[g]", "description": "

number of girls

", "templateType": "anything"}, "ans_a": {"name": "ans_a", "group": "Ungrouped variables", "definition": "(b+g)!-(2*(b+1)!)", "description": "

answer to part (a)

", "templateType": "anything"}, "ans_b": {"name": "ans_b", "group": "Ungrouped variables", "definition": "b*(b-1)*(b!)", "description": "

answer to part (b)

", "templateType": "anything"}, "ans_c": {"name": "ans_c", "group": "Ungrouped variables", "definition": "b*(b-1)*(b! - 2*((b-1)!))", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["words", "b", "g", "boys", "girls", "ans_a", "ans_b", "ans_c"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

the girls do not sit together.

", "minValue": "ans_a", "maxValue": "ans_a", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en", "eu", "plain-eu"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

the girls do not sit on either end.

", "minValue": "ans_b", "maxValue": "ans_b", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

the girls do not sit on either end and do not sit together.

", "minValue": "ans_c", "maxValue": "ans_c", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en", "eu", "plain-eu"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Johnathan Gregg", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4974/"}]}]}], "contributors": [{"name": "Johnathan Gregg", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4974/"}]}