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

A question to test understanding of set cardinality and intersections when limited information is known about the size of certain sets.

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

On an auto-trading website there are \$\\var{C - F}\$ cars listed. Consider this as the set \$C\$. Of those \$\\var{C - F}\$ cars in \$C\$, \$\\var{toyota}\$ are Toyotas. Consider this as the set \$T\$. Similarly, there are \$\\var{shef}\$ cars listed in the Sheffield area. Call this set \$S\$.

\n

You should draw a Venn diagram to help you with this question.

", "advice": "

a) In the first part of the question we know that there are \$\\var{C - F}\$ cars listed on the website. We also know that there are \$\\var{shef}\$ cars listed in Sheffield and that \$\\var{toyota}\$ of the total cars listed are Toyotas.

\n

We can use the Inclusion-Exclusion formula to find the cardinality of the intersection: \$|S \\cap T|\$.

\n

Inclusion-Exclusion: For finite sets \$A\$ and \$B\$, the cardinality of the union is described by the formula \$|A \\cup B| = |A| + |B| - |A \\cap B|\$.

\n

Since we know that \$|S \\cup T| = \\var{C - F}\$, \$|S| = \\var{shef}\$, and \$|T| = \\var{toyota}\$, then the size of the intersection is \$|S \\cap T| = |S| + |T| - |S \\cup T| = \\var{shef} + \\var{toyota} - \\var{C - F} = \\var{shef + toyota - (C -F)}\$.

\n

\n

b) In this part there are \$\\var{F}\$ more cars listed than before. We need to know how many of the cars listed satisfy all three conditions: in Sheffield, a Toyota, and front-wheel drive. I.e., they are in the intersection \$S \\cap T \\cap F\$.

\n

The Inclusion-Exclusion formula extends to three sets: \$|A \\cup B \\cup C| = |A| + |B| + |C| - |A \\cap B| - |A \\cap C| - |B \\cap C| + |A \\cap B \\cap C|\$. This tells us that \$|S \\cap T \\cap F| = |S \\cup T \\cup F| - |S| - |T| - |F| + |S \\cap T| + |S \\cap F| + |T \\cap F| = \\var{C} - \\var{shef} - \\var{toyota} - \\var{front} + \\var{shef_toyota} + \\var{shef_front} + \\var{toyota_front} = \\var{SFT}\$.

\n

\n

c) In this part we want the size of the set \$(S \\cup F) \\setminus T\$, i.e., cars which are either in Sheffield or are front-wheel drive, but which are not Toyotas. One way of tackling this is to slowly fill in the sizes of the different regions on a Venn diagram, starting with the middle triple intersection that was worked out in part b). Since we know the size of the pairwise intersections, as well as the single sets, then we can eventually work out that this part needs three numbers to be added together.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"S": {"name": "S", "group": "Ungrouped variables", "definition": "random(0..20)", "description": "", "templateType": "anything", "can_override": false}, "F": {"name": "F", "group": "Ungrouped variables", "definition": "random(0..20)", "description": "", "templateType": "anything", "can_override": false}, "T": {"name": "T", "group": "Ungrouped variables", "definition": "random(0..20)", "description": "", "templateType": "anything", "can_override": false}, "SF": {"name": "SF", "group": "Ungrouped variables", "definition": "random(0..23)", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "S + F + T + SF + ST + TF + SFT", "description": "", "templateType": "anything", "can_override": false}, "ST": {"name": "ST", "group": "Ungrouped variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "TF": {"name": "TF", "group": "Ungrouped variables", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "SFT": {"name": "SFT", "group": "Ungrouped variables", "definition": "random(0..2)", "description": "", "templateType": "anything", "can_override": false}, "shef": {"name": "shef", "group": "Ungrouped variables", "definition": "S + SF + ST + SFT", "description": "", "templateType": "anything", "can_override": false}, "toyota": {"name": "toyota", "group": "Ungrouped variables", "definition": "T + TF + ST + SFT", "description": "", "templateType": "anything", "can_override": false}, "front": {"name": "front", "group": "Ungrouped variables", "definition": "F + SF + TF + SFT", "description": "", "templateType": "anything", "can_override": false}, "shef_toyota": {"name": "shef_toyota", "group": "Ungrouped variables", "definition": "ST + SFT", "description": "", "templateType": "anything", "can_override": false}, "shef_front": {"name": "shef_front", "group": "Ungrouped variables", "definition": "SF + SFT", "description": "", "templateType": "anything", "can_override": false}, "toyota_front": {"name": "toyota_front", "group": "Ungrouped variables", "definition": "TF + SFT", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["S", "F", "T", "SF", "C", "ST", "TF", "SFT", "shef", "toyota", "front", "shef_toyota", "shef_front", "toyota_front"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

How many cars are listed in the Sheffield area, which are also Toyotas? You can assume that all cars listed are Toyotas, in Sheffield, or both.

", "minValue": "ST + SFT", "maxValue": "ST + SFT", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "information", "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": "

An option is added to the website allowing the user to filter for front-wheel drive cars only, which prompts more users to list their cars. Call the set of front-wheel drive cars \$F\$. You now know the following information:

\n
\n
• There are now \$\\var{C}\$ cars available in total;
• \n
• There are \$\\var{toyota}\$ Toyotas;
• \n
• There are \$\\var{shef}\$ cars listed in Sheffield;
• \n
• There are \$\\var{front}\$ front-wheel drive cars listed;
• \n
• There are \$\\var{ST + SFT}\$ Toyotas listed in Sheffield;
• \n
• There are \$\\var{TF + SFT}\$ front-wheel drive Toyotas listed;
• \n
• There are \$\\var{SF + SFT}\$ front-wheel drive cars listed in Sheffield.
• \n
"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

How many front-wheel drive Toyotas are there listed in Sheffield?

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

How many cars listed in Sheffield or are front-wheel drive, but are not Toyotas?

", "minValue": "F + SF + S", "maxValue": "F + SF + S", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Alexander Corner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5328/"}]}]}], "contributors": [{"name": "Alexander Corner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5328/"}]}