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

Introductory exercise about set equality

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

Consider the three individual elements $1, 1$ and $2$. If we consider these elements as a single unordered collection of distinct objects then we call it the set $\\left\\{1,1,2\\right\\}$. Because sets are unordered this is the same as $\\left\\{2,1,1\\right\\}$ and because we only collect distinct objects this is also the same as $\\left\\{1,2\\right\\}$.

\n

For example, let $A=\\left\\{\\var{A[0]},\\var{A[1]},\\var{A[2]},\\var{A[3]}\\right\\}, B=\\left\\{\\var{B[0]},\\var{B[1]},\\var{B[2]},\\var{B[3]},\\var{B[4]}\\right\\}$ and $C=\\left\\{\\var{C[0]},\\var{C[1]},\\var{C[2]},\\var{C[3]},\\var{C[4]},\\var{C[5]}\\right\\}$.

", "advice": "

Remember that the ordering of sets does not matter, nor do duplicate elements. We can therefore simplify the question by rewriting each of our sets with the elements in order and the duplicates removed.

\n

\n

So we have

\n

$A = \\var{Asimple}$

\n

$B = \\var {Bsimple}$

\n

$C = \\var {Csimple}$

\n

\n

(a)

\n

You can check to see if $A \\subseteq B$ by progressively checking if each element of $A$ is also in $B$. There are six questions so you will have to do this six times.

\n

\n

(b)

\n

We can easily compare our rewritten sets above to see which are equal.

\n

\n

\n

It is worth noting that for two sets $M$ and $N$, if $M \\subseteq N$ and $N \\subseteq M$ then $M=N$

\n

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"CsubsetB": {"name": "CsubsetB", "group": "Ungrouped variables", "definition": "if(set(C)=intersection(set(C),set(B)),1,0)", "description": "", "templateType": "anything", "can_override": false}, "AsubsetC": {"name": "AsubsetC", "group": "Ungrouped variables", "definition": "if(set(A)=intersection(set(A),set(C)),1,0)", "description": "", "templateType": "anything", "can_override": false}, "CA": {"name": "CA", "group": "Ungrouped variables", "definition": "if(set(C) = set(A),1,0)", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "Ungrouped variables", "definition": "repeat(random(1..4),4)", "description": "", "templateType": "anything", "can_override": false}, "CSimple": {"name": "CSimple", "group": "Ungrouped variables", "definition": "set(sort(C))", "description": "", "templateType": "anything", "can_override": false}, "AB": {"name": "AB", "group": "Ungrouped variables", "definition": "if(set(A) = set(B),1,0)", "description": "", "templateType": "anything", "can_override": false}, "BsubsetC": {"name": "BsubsetC", "group": "Ungrouped variables", "definition": "if(set(B)=intersection(set(C),set(B)),1,0)", "description": "", "templateType": "anything", "can_override": false}, "Asimple": {"name": "Asimple", "group": "Ungrouped variables", "definition": "set(sort(A))", "description": "", "templateType": "anything", "can_override": false}, "AsubsetB": {"name": "AsubsetB", "group": "Ungrouped variables", "definition": "if(set(A)=intersection(set(A),set(B)),1,0)", "description": "", "templateType": "anything", "can_override": false}, "BC": {"name": "BC", "group": "Ungrouped variables", "definition": "if(set(B) = set(C),1,0)", "description": "", "templateType": "anything", "can_override": false}, "BsubsetA": {"name": "BsubsetA", "group": "Ungrouped variables", "definition": "if(set(B)=intersection(set(A),set(B)),1,0)", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "repeat(random(1..4),5)", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "repeat(random(1..4),6)", "description": "", "templateType": "anything", "can_override": false}, "Bsimple": {"name": "Bsimple", "group": "Ungrouped variables", "definition": "set(sort(B))", "description": "", "templateType": "anything", "can_override": false}, "CsubsetA": {"name": "CsubsetA", "group": "Ungrouped variables", "definition": "if(set(C)=intersection(set(A),set(C)),1,0)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "AB + BC + CA =1 and AsubsetB + BsubsetA + AsubsetC + CsubsetA + BsubsetC + CsubsetB=4", "maxRuns": 100}, "ungrouped_variables": ["A", "B", "C", "AB", "BC", "CA", "AsubsetB", "BsubsetA", "CsubsetB", "BsubsetC", "CsubsetA", "AsubsetC", "Asimple", "Bsimple", "CSimple"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_2", "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": "

If every element of the set $A$ is also an element of the set $B$ then we say that $A$ is a subset of $B$: $A \\subseteq B$. Which sets are subsets of one another?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "checkbox", "displayColumns": 0, "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["

$A \\subseteq B$

", "

$B \\subseteq A$

", "

$C \\subseteq B$

", "

$B \\subseteq C$

", "

$C \\subseteq A$

", "

$A \\subseteq C$

"], "matrix": ["AsubsetB", "BsubsetA", "CsubsetB", "BsubsetC", "CsubsetA", "AsubsetC"], "distractors": ["", "", "", "", "", ""]}, {"type": "m_n_2", "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": "

Sets are equal if they are subsets of each other. Which sets are equal?

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "checkbox", "displayColumns": 0, "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "choices": ["

$A=B$

", "

$B=C$

", "

$C=A$

"], "matrix": ["AB", "BC", "CA"], "distractors": ["", "", ""]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}, {"name": "Alexander Corner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5328/"}]}]}], "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}, {"name": "Alexander Corner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5328/"}]}