// Numbas version: exam_results_page_options {"name": "01. Number of ways of choosing subsets with a condition", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "01. Number of ways of choosing subsets with a condition", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

A company has $\\var{t}$ employees, $\\var{m}$ of them male and $\\var{f}$ female. We need to form a committee of $\\var{n}$ employees.

\n

", "advice": "

a)

\n

There are $\\displaystyle \\binom{\\var{t}}{\\var{n}}=\\var{ansA}$ in which to form the committee when there are no conditions on the number of male and female employees needed.

\n

b)

\n

There are $\\displaystyle \\binom{\\var{t}}{\\var{n}}$ ways to form the committee when there are no conditions on the number of male and female employees needed. There are $\\displaystyle \\binom{\\var{f}}{\\var{n}}$ ways to form a committee with no male employees in it, and there are $\\displaystyle \\binom{\\var{m}}{\\var{n}}$ ways to form a committee with no female employees in it. This gives a total of $\\displaystyle \\binom{\\var{t}}{\\var{n}}-\\displaystyle \\binom{\\var{f}}{\\var{n}}-\\displaystyle \\binom{\\var{m}}{\\var{n}}=\\var{ans1}$ ways to form a committee with at least one male and one female employee in it.

\n

c)

\n

There are $\\displaystyle \\binom{\\var{t}}{\\var{n}}$ ways to form the committee when there are no conditions on the number of male and female employees needed. There are $\\displaystyle \\binom{\\var{m}}{\\var{n}}$ ways to form a committee with no female employees in it. There are $\\displaystyle \\binom{\\var{m}}{\\var{n-1}}\\cdot {f}$ ways to form a committee with exactly one female employee in it. This gives a total of $\\displaystyle \\binom{\\var{t}}{\\var{n}}-\\displaystyle \\binom{\\var{m}}{\\var{n}}-\\displaystyle \\binom{\\var{m}}{\\var{n-1}}\\cdot \\var{f}=\\var{ans2}$ ways to form a committee with at least two one female employees in it.

\n

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"t": {"name": "t", "group": "Ungrouped variables", "definition": "m+f", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(8..12)", "description": "", "templateType": "anything", "can_override": false}, "ans1": {"name": "ans1", "group": "Ungrouped variables", "definition": "comb(t,n)-comb(m,n)-comb(f,n)", "description": "

Answer to part a)

", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(8..12)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(5..7)", "description": "", "templateType": "anything", "can_override": false}, "ans2": {"name": "ans2", "group": "Ungrouped variables", "definition": "comb(t,n)-comb(m,n)-comb(m,n-1)*f", "description": "

Answer to part b)

", "templateType": "anything", "can_override": false}, "ans3": {"name": "ans3", "group": "Ungrouped variables", "definition": "comb(t,n)*n", "description": "

Answer to part c)

", "templateType": "anything", "can_override": false}, "ansA": {"name": "ansA", "group": "Ungrouped variables", "definition": "comb(t,n)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "m", "t", "f", "ans1", "ans2", "ans3", "ansA"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

How many ways are there to form such a committee? Number of ways to form a committee is [[0]]. 

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

How many ways are there to form such a committee with the additional requirement that the committee contains at least one male and one female employee? Number of ways to form such a committee is [[0]].

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

How many ways are there to form such a committee with the requirement that the committee contains at least two female employees (no restriction on the number of male employees)? Number of ways to form such a committee is [[0]].

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ans2", "maxValue": "ans2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Martina Balagovic", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3640/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Martina Balagovic", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3640/"}]}