// Numbas version: exam_results_page_options {"navigation": {"preventleave": true, "allowregen": true, "showfrontpage": true, "onleave": {"action": "none", "message": ""}, "browse": true, "reverse": true, "showresultspage": "never", "startpassword": ""}, "name": "Week 1: Basic Set Theory - V2", "duration": 0, "timing": {"timedwarning": {"action": "none", "message": ""}, "allowPause": true, "timeout": {"action": "none", "message": ""}}, "percentPass": "0", "metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "description": "

Introductory exercises about set theory designed to prepare students for their first lectures on the subject.

"}, "question_groups": [{"pickQuestions": 1, "name": "Group", "pickingStrategy": "all-ordered", "questions": [{"name": "Basic Set Theory: subsets and set equality", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}], "variables": {"B": {"group": "Ungrouped variables", "definition": "repeat(random(1..4),5)", "templateType": "anything", "description": "", "name": "B"}, "A": {"group": "Ungrouped variables", "definition": "repeat(random(1..4),4)", "templateType": "anything", "description": "", "name": "A"}, "BsubsetC": {"group": "Ungrouped variables", "definition": "if(set(B)=intersection(set(C),set(B)),1,0)", "templateType": "anything", "description": "", "name": "BsubsetC"}, "BsubsetA": {"group": "Ungrouped variables", "definition": "if(set(B)=intersection(set(A),set(B)),1,0)", "templateType": "anything", "description": "", "name": "BsubsetA"}, "AB": {"group": "Ungrouped variables", "definition": "if(set(A) = set(B),1,0)", "templateType": "anything", "description": "", "name": "AB"}, "AsubsetB": {"group": "Ungrouped variables", "definition": "if(set(A)=intersection(set(A),set(B)),1,0)", "templateType": "anything", "description": "", "name": "AsubsetB"}, "BC": {"group": "Ungrouped variables", "definition": "if(set(B) = set(C),1,0)", "templateType": "anything", "description": "", "name": "BC"}, "CsubsetB": {"group": "Ungrouped variables", "definition": "if(set(C)=intersection(set(C),set(B)),1,0)", "templateType": "anything", "description": "", "name": "CsubsetB"}, "CA": {"group": "Ungrouped variables", "definition": "if(set(C) = set(A),1,0)", "templateType": "anything", "description": "", "name": "CA"}, "CsubsetA": {"group": "Ungrouped variables", "definition": "if(set(C)=intersection(set(A),set(C)),1,0)", "templateType": "anything", "description": "", "name": "CsubsetA"}, "C": {"group": "Ungrouped variables", "definition": "repeat(random(1..4),6)", "templateType": "anything", "description": "", "name": "C"}, "AsubsetC": {"group": "Ungrouped variables", "definition": "if(set(A)=intersection(set(A),set(C)),1,0)", "templateType": "anything", "description": "", "name": "AsubsetC"}}, "preamble": {"css": "", "js": ""}, "variablesTest": {"condition": "AB + BC + CA =1 and AsubsetB + BsubsetA + AsubsetC + CsubsetA + BsubsetC + CsubsetB=4", "maxRuns": 100}, "rulesets": {}, "advice": "

You can check to see if $A \\subset 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

The second part of this question builds on the first. You just need to look at your answers and find the sets which contain each other. It is a bit like the 'less than or equal to' relation in the sense that if you have two numbers $x$ and $y$ where $x \\leq y$ and $y\\leq x$, then it must be true that $x=y$.

", "ungrouped_variables": ["A", "B", "C", "AB", "BC", "CA", "AsubsetB", "BsubsetA", "CsubsetB", "BsubsetC", "CsubsetA", "AsubsetC"], "parts": [{"minMarks": 0, "variableReplacementStrategy": "originalfirst", "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": false, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "choices": ["

$A \\subseteq B$

", "

$B \\subseteq A$

", "

$C \\subseteq B$

", "

$B \\subseteq C$

", "

$C \\subseteq A$

", "

$A \\subseteq C$

"], "warningType": "none", "type": "m_n_2", "displayType": "checkbox", "maxMarks": 0, "scripts": {}, "matrix": ["AsubsetB", "BsubsetA", "CsubsetB", "BsubsetC", "CsubsetA", "AsubsetC"], "showCorrectAnswer": true, "distractors": ["", "", "", "", "", ""], "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?

", "displayColumns": 0}, {"minMarks": 0, "variableReplacementStrategy": "originalfirst", "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": false, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "choices": ["

$A=B$

", "

$B=C$

", "

$C=A$

"], "warningType": "none", "type": "m_n_2", "displayType": "checkbox", "maxMarks": 0, "scripts": {}, "matrix": ["AB", "BC", "CA"], "showCorrectAnswer": true, "distractors": ["", "", ""], "prompt": "

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

", "displayColumns": 0}], "metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "description": "

"}, "variable_groups": [], "functions": {}, "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\\}$.

", "tags": [], "type": "question"}, {"name": "Basic Set Theory: set operations", "extensions": [], "custom_part_types": [], "resources": [["question-resources/384px-Venn0111.svg.png", "/srv/numbas/media/question-resources/384px-Venn0111.svg.png"], ["question-resources/384px-Venn0001.svg.png", "/srv/numbas/media/question-resources/384px-Venn0001.svg.png"], ["question-resources/384px-Venn0110.svg.png", "/srv/numbas/media/question-resources/384px-Venn0110.svg.png"], ["question-resources/240px-Venn0100.svg.png", "/srv/numbas/media/question-resources/240px-Venn0100.svg.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "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/"}], "metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "description": "

Simple exercises introducing the fundamental set operations, and NUMBAS syntax for sets.

"}, "ungrouped_variables": ["listA", "listB", "A", "B", "listN"], "variablesTest": {"maxRuns": 100, "condition": "not(listA = listB)"}, "variable_groups": [], "functions": {}, "advice": "

The union of two sets is the set of elements from either set

\n

$A \\cup B = \\left\\{ x\\, |\\, x \\in A \\text{ or } x \\in B\\right\\}$

\n
\n

The intersetction of two sets is the set of elements common to both sets

\n

$A \\cap B = \\left\\{ x\\, |\\, x \\in A \\text{ and } x \\in B\\right\\}$

\n
\n

The difference $A-B$ is the set of elements from $A$ which are not in $B$:

\n

$A - B = \\left\\{ x \\in A |\\, x \\notin B\\right\\}$

\n
\n

Similarly, the difference $B-A$ is the set of elements from $B$ which are not in $A$:

\n

$B - A = \\left\\{ x \\in B |\\, x \\notin A\\right\\}$

\n
\n

The symmetric difference $A \\Delta B$ is the union of the set differences, but it can also be expressed as the union minus the intersection

\n

$A \\Delta B = (A \\cup B) - (A \\cap B)$.

", "statement": "

Consider the sets $A = \\var{A}$ and $B = \\var{B}$. Find the union, intsersection and set differences below. Use the NUMBAS syntax set(1,2,3) for $\\left\\{1,2,3\\right\\}$.

", "parts": [{"checkingType": "absdiff", "vsetRangePoints": 5, "valuegenerators": [], "marks": 1, "customMarkingAlgorithm": "", "customName": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkVariableNames": false, "useCustomName": false, "failureRate": 1, "scripts": {"validate": {"order": "instead", "script": "try {\n var tree = Numbas.jme.compile(this.studentAnswer);\n var type = Numbas.jme.evaluate(tree,this.question.scope).type;\n \n if ('set' != type) { \n this.giveWarning(\"Your answer must be a set. Use the syntax set(1,2,3) for the set $\\\\left\\\\{1,2,3\\\\right\\\\}$\");\n return false;\n }\n \n return true;\n}\ncatch(e) {\n this.markingComment(e);\n return false;\n}"}}, "prompt": "

What is the union $A \\cup B$?

", "showFeedbackIcon": true, "checkingAccuracy": 0.001, "vsetRange": [0, 1], "unitTests": [], "showPreview": true, "type": "jme", "answer": "{union(A,B)}"}, {"checkingType": "absdiff", "vsetRangePoints": 5, "valuegenerators": [], "marks": 1, "customMarkingAlgorithm": "", "customName": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkVariableNames": false, "useCustomName": false, "failureRate": 1, "scripts": {"validate": {"order": "instead", "script": "try {\n var tree = Numbas.jme.compile(this.studentAnswer);\n var type = Numbas.jme.evaluate(tree,this.question.scope).type;\n \n if ('set' != type) { \n this.giveWarning(\"Your answer must be a set. Use the syntax set(1,2,3) for the set $\\\\left\\\\{1,2,3\\\\right\\\\}$\");\n return false;\n }\n \n return true;\n}\ncatch(e) {\n this.markingComment(e);\n return false;\n}"}}, "prompt": "

What is the intersection $A \\cap B$?

", "showFeedbackIcon": true, "checkingAccuracy": 0.001, "vsetRange": [0, 1], "unitTests": [], "showPreview": true, "type": "jme", "answer": "{intersection(A,B)}"}, {"checkingType": "absdiff", "vsetRangePoints": 5, "valuegenerators": [], "marks": 1, "customMarkingAlgorithm": "", "customName": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkVariableNames": false, "useCustomName": false, "failureRate": 1, "scripts": {"validate": {"order": "instead", "script": "try {\n var tree = Numbas.jme.compile(this.studentAnswer);\n var type = Numbas.jme.evaluate(tree,this.question.scope).type;\n \n if ('set' != type) { \n this.giveWarning(\"Your answer must be a set. Use the syntax set(1,2,3) for the set $\\\\left\\\\{1,2,3\\\\right\\\\}$\");\n return false;\n }\n \n return true;\n}\ncatch(e) {\n this.markingComment(e);\n return false;\n}"}}, "prompt": "

What is $A-B$, the set of elements from $A$ which are not in $B$?

", "showFeedbackIcon": true, "checkingAccuracy": 0.001, "vsetRange": [0, 1], "unitTests": [], "showPreview": true, "type": "jme", "answer": "{A-B}"}, {"checkingType": "absdiff", "vsetRangePoints": 5, "valuegenerators": [], "marks": 1, "customMarkingAlgorithm": "", "customName": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkVariableNames": false, "useCustomName": false, "failureRate": 1, "scripts": {"validate": {"order": "instead", "script": "try {\n var tree = Numbas.jme.compile(this.studentAnswer);\n var type = Numbas.jme.evaluate(tree,this.question.scope).type;\n \n if ('set' != type) { \n this.giveWarning(\"Your answer must be a set. Use the syntax set(1,2,3) for the set $\\\\left\\\\{1,2,3\\\\right\\\\}$\");\n return false;\n }\n \n return true;\n}\ncatch(e) {\n this.markingComment(e);\n return false;\n}"}}, "prompt": "

What is $B-A$, the set of elements from $B$ which are not in $A$?

", "showFeedbackIcon": true, "checkingAccuracy": 0.001, "vsetRange": [0, 1], "unitTests": [], "showPreview": true, "type": "jme", "answer": "{B-A}"}, {"checkingType": "absdiff", "vsetRangePoints": 5, "valuegenerators": [], "marks": 1, "customMarkingAlgorithm": "", "customName": "", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkVariableNames": false, "useCustomName": false, "failureRate": 1, "scripts": {"validate": {"order": "instead", "script": "try {\n var tree = Numbas.jme.compile(this.studentAnswer);\n var type = Numbas.jme.evaluate(tree,this.question.scope).type;\n \n if ('set' != type) { \n this.giveWarning(\"Your answer must be a set. Use the syntax set(1,2,3) for the set $\\\\left\\\\{1,2,3\\\\right\\\\}$\");\n return false;\n }\n \n return true;\n}\ncatch(e) {\n this.markingComment(e);\n return false;\n}"}}, "prompt": "

What is union of the set differences $(A-B)\\cup(B-A)$? This is also called the symmetric difference $A\\Delta B$.

", "showFeedbackIcon": true, "checkingAccuracy": 0.001, "vsetRange": [0, 1], "unitTests": [], "showPreview": true, "type": "jme", "answer": "{union(A-B,B-A)}"}, {"customMarkingAlgorithm": "", "marks": 0, "maxMarks": "1", "customName": "", "showCorrectAnswer": true, "matrix": [["0.25", 0, 0, 0], [0, "0.25", 0, 0], [0, 0, "0.25", 0], [0, 0, 0, "0.25"]], "shuffleAnswers": true, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "minMarks": 0, "maxAnswers": 0, "showCellAnswerState": true, "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "warningType": "none", "useCustomName": false, "layout": {"expression": "", "type": "all"}, "shuffleChoices": true, "scripts": {}, "prompt": "

Match the mathematical expression with its Venn diagram, where the left circle represents the set $A$ and the right circle represents $B$.

\n

", "showFeedbackIcon": true, "choices": ["

$A\\cup B$

", "

$A \\cap B$

", "

$A \\Delta B$

", "

$A - B$

", "

", "

", "

"], "unitTests": [], "minAnswers": 0, "type": "m_n_x"}], "tags": [], "variables": {"listA": {"name": "listA", "definition": "repeat(random(5..9),4)", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "listN": {"name": "listN", "definition": "repeat(random(1..9),2)", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "listB": {"name": "listB", "definition": "repeat(random(0..4),4)", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "B": {"name": "B", "definition": "union(set(listB),set(listN))", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "A": {"name": "A", "definition": "union(set(listA),set(listN))", "templateType": "anything", "description": "", "group": "Ungrouped variables"}}, "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question"}, {"name": "Basic Set Theory: element not in a set", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "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/"}], "metadata": {"description": "

", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "parts": [{"failureRate": 1, "vsetRange": [0, 1], "customMarkingAlgorithm": "", "valuegenerators": [], "extendBaseMarkingAlgorithm": true, "type": "jme", "checkVariableNames": false, "useCustomName": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "checkingAccuracy": 0.001, "customName": "", "marks": 1, "variableReplacementStrategy": "originalfirst", "scripts": {"mark": {"order": "instead", "script": "// extract question variables\nvar variables = this.question.scope.variables;\nvar unwrap = Numbas.jme.unwrapValue;\nvar c = unwrap(variables.c);\nvar d = unwrap(variables.d);\n\n// compute its derivative\nvar tree;\ntry {\n tree = Numbas.jme.compile(this.studentAnswer);\n var ans = unwrap(Numbas.jme.evaluate(tree,this.question.scope));\n \n if (0 == ((ans - d) % c)) { \n // then ans = ck + d for some integer k\n this.setCredit(1,\"This is an element of $Y$. In fact $Y \\\\subseteq X$ so any element of $Y$ is automatically in $X$.\");\n if (ans != d) {\n this.markingComment('By the way, the easiest element to find is $' + d + '$ which is obtained when $k=0$.');\n }\n }\n}\ncatch(e) {\n this.markingComment(e);\n}\n"}}, "variableReplacements": [], "showPreview": true, "vsetRangePoints": 5, "unitTests": [], "answer": "{d}", "checkingType": "absdiff", "adaptiveMarkingPenalty": 0, "prompt": "

Find an element of $Y$ which is also an element of $X$.

"}, {"failureRate": 1, "vsetRange": [0, 1], "customMarkingAlgorithm": "", "valuegenerators": [], "extendBaseMarkingAlgorithm": true, "type": "jme", "checkVariableNames": false, "useCustomName": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "checkingAccuracy": 0.001, "customName": "", "marks": 1, "variableReplacementStrategy": "originalfirst", "scripts": {"mark": {"order": "instead", "script": "// extract question variables\nvar variables = this.question.scope.variables;\nvar unwrap = Numbas.jme.unwrapValue;\nvar a = unwrap(variables.a);\nvar b = unwrap(variables.b);\nvar c = unwrap(variables.c);\nvar d = unwrap(variables.d);\n\n// compute its derivative\nvar tree;\ntry {\n tree = Numbas.jme.compile(this.studentAnswer);\n var ans = unwrap(Numbas.jme.evaluate(tree,this.question.scope));\n \n if (0 == ((ans - b) % a)) { \n // then ans = ck + d for some integer k\n this.setCredit(1,\"This is an element of $X$.\");\n }\n \n if (0 == ((ans - d) % c)) { \n // then ans = ck + d for some integer k\n this.setCredit(0,\"But it is also an element of $Y$.\");\n }\n}\ncatch(e) {\n this.markingComment(e);\n}"}}, "variableReplacements": [], "showPreview": true, "vsetRangePoints": 5, "unitTests": [], "answer": "{b}", "checkingType": "absdiff", "adaptiveMarkingPenalty": 0, "prompt": "

Find an element of $X$ which is not an element of $Y$.

"}, {"showCellAnswerState": true, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "maxMarks": 0, "useCustomName": false, "showCorrectAnswer": true, "shuffleChoices": false, "showFeedbackIcon": true, "matrix": ["1", 0], "customName": "", "marks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "scripts": {}, "variableReplacements": [], "minMarks": 0, "unitTests": [], "displayType": "radiogroup", "distractors": ["Yes. All you need to demonstrate is there is one element of $X$ which is not also in $Y$.", "This is true but irrelevant."], "type": "1_n_2", "choices": ["

$X \\nsubseteq Y$

", "

$Y \\subseteq X$

The sets $X$ and $Y$ are not equal because

"}], "variables": {"b": {"group": "Ungrouped variables", "definition": "random(6..9)", "description": "", "name": "b", "templateType": "anything"}, "u": {"group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "u", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "a", "templateType": "anything"}, "c": {"group": "Ungrouped variables", "definition": "u*a", "description": "", "name": "c", "templateType": "anything"}, "d": {"group": "Ungrouped variables", "definition": "a+b", "description": "", "name": "d", "templateType": "anything"}}, "variable_groups": [], "advice": "

The first thing to note is that $Y \\subseteq X$. To prove this, show that every $y \\in Y$ is also in $X$. Essentially you have to prove an infinite amount of stuff here (because $Y$ is infinitely large), and we can do this by considering any generic element of $Y$ and checking that it is also in $X$.

\n

Suppose $y$ is any generic element of $Y$. Then it has the shape $y = \\var{c}k + \\var{d}$ for some $k \\in \\mathbb Z$. But elements of $X$ have the shape $\\var{a}n + \\var{b}$ for some integer $n$. We can $\\var{c}k + \\var{d}$ into $\\var{a}n + \\var{b}$ as follows:

\n

\\begin{align*} y & = \\var{c} k + \\var{d} \\\\ & = \\var{a}\\times\\var{u} k + \\var{a} + \\var{b} \\\\ & = \\var{a}(\\var{u} k + 1) + \\var{b} \\\\ & = \\var{a}n + \\var{b} \\end{align*}

\n

where $n = (\\var{u}k+1) \\in \\mathbb Z$. So $y=\\var{a}n + \\var{b}$ for some integer $n$, which means that any element of $Y$ is also an element of $X$, i.e. $Y \\subseteq X$.

\n

So for this part of this question you can choose any element of $Y$. All of them will automatically be included in $X$.

\n
\n

For the second question you need to find an element of $X$ which which is not an element of $Y$. This does not require an infinite amount of work - all you need is one element of $X$ which is not in $Y$. The easiest way to proceede is to just try a few different values of $X$.

\n
\n

By definition the sets $X$ and $Y$ are equal when both $Y\\subseteq X$ and $X \\subseteq Y$ are true. We showed in part b that $X \\nsubseteq Y$. So the sets are not equal. We can be more precise and see from part a that $Y\\subseteq X$ and so $X$ is a proper subset of $Y$: $X \\subset Y$.

", "preamble": {"js": "", "css": ""}, "tags": [], "functions": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {}, "statement": "

Consider the sets $X = \\left\\{ \\var{a}n + \\var{b} | n \\in \\mathbb Z\\right\\}$ and $Y = \\left\\{ \\var{c}k + \\var{d} | k \\in \\mathbb Z\\right\\}$.

", "ungrouped_variables": ["a", "b", "u", "c", "d"]}, {"name": "Basic Set Theory: power set - TEMP REPLACEMENT", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "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/"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "

The power set of $\\left\\{\\var{x},\\var{y}\\right\\}$ is

\n

$\\left\\{\\left\\{\\right\\}, \\left\\{\\var{x}\\right\\},\\left\\{\\var{y}\\right\\}, \\left\\{\\var{x},\\var{y}\\right\\}\\right\\}$.

\n

You can obtain the power set by finding all the subsets of all possible sizes. Since we have a set of size two then the subsets have length at most two. These are

\n
\n
• the subset of length zero: $\\left\\{\\right\\}$
• \n
• the subsets of length one: $\\left\\{\\var{x}\\right\\},\\left\\{\\var{y}\\right\\}$
• \n
• the subset length two: $\\left\\{\\var{x},\\var{y}\\right\\}$.
• \n
\n

Note that the length zero subset is always the empty set, and the largest subset is the set itself.

", "variables": {"y": {"templateType": "anything", "definition": "random(x+1..9)", "description": "", "name": "y", "group": "Ungrouped variables"}, "x": {"templateType": "anything", "definition": "random(2..8)", "description": "", "name": "x", "group": "Ungrouped variables"}, "PB": {"templateType": "anything", "definition": "set(set(),set(x),set(y),set(x,y))", "description": "", "name": "PB", "group": "Ungrouped variables"}, "B": {"templateType": "anything", "definition": "set(x,y)", "description": "", "name": "B", "group": "Ungrouped variables"}}, "statement": "

The power set of $A$, written $P(A)$, is the set of all subsets of $A$.

", "tags": [], "ungrouped_variables": ["x", "y", "B", "PB"], "metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "description": "

"}, "rulesets": {}, "preamble": {"css": "", "js": ""}, "parts": [{"variableReplacementStrategy": "originalfirst", "steps": [{"variableReplacementStrategy": "originalfirst", "prompt": "

First we look at all the subsets containing zero elements. This is the empty set $\\left\\{\\right\\}$ and it is an element of any power set. Enter the empty set below using the NUMBAS syntax, which is set().

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

Next we look at all the subsets containing exactly one element, such as $\\simplify{{set(x)}}$. Enter this using the NUMBAS syntax set({x}).

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

What is the other subset that that contains exactly one element?

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

What is the subset that contains exactly two elements?

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

The power set is the set containg all these answers as elements. Enter your answer using the NUMBAS syntaxset(a,b,c,d)

", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "scripts": {}, "showCorrectAnswer": true, "customName": "", "useCustomName": false, "unitTests": [], "type": "information"}], "prompt": "

What is the power set of $\\simplify{{set(x,y)}}$?

", "showFeedbackIcon": true, "choices": ["$\\simplify{{set(set(),set(x),set(y),set(x,y))}}$", "$\\simplify{{set()}}, \\simplify{{set(x)}}, \\simplify{{set(y)}}, \\simplify{{set(x,y)}}$", "$\\simplify{{set(set(x),set(y),set(x,y))}}$", "$\\simplify{{set(x)}}, \\simplify{{set(y)}}, \\simplify{{set(x,y)}}$", "$\\simplify{{set(set(x),set(y))}}$", "$\\simplify{{set(x)}}, \\simplify{{set(y)}}$", "$\\simplify{{set(x,y,set(x,y))}}$", "$\\simplify{{x}}, \\simplify{{y}}, \\simplify{{set(x,y)}}$", "$\\simplify{{set(x,y)}}$", "$\\simplify{{set(set(x,y))}}$", "$\\simplify{{set(set(),x,y,set(x,y))}}$", "$\\simplify{{set()}},\\simplify{{x}},\\simplify{{y}},\\simplify{{set(x,y)}}$"], "shuffleChoices": true, "scripts": {}, "matrix": ["1", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "stepsPenalty": 0, "minMarks": 0, "marks": 0, "customMarkingAlgorithm": "", "variableReplacements": [], "showCellAnswerState": true, "extendBaseMarkingAlgorithm": true, "useCustomName": false, "distractors": ["", "", "", "", "", "", "", "", "", "", "", ""], "displayType": "radiogroup", "showCorrectAnswer": true, "customName": "", "maxMarks": 0, "displayColumns": "1", "unitTests": [], "type": "1_n_2"}], "functions": {}, "variable_groups": [], "type": "question"}, {"name": "Basic Set Theory: fun and games with the power set", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "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/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"css": "", "js": ""}, "rulesets": {}, "variable_groups": [], "metadata": {"description": "

Slightly harder introductory exercises about the power set.

", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "ungrouped_variables": ["n"], "variables": {"n": {"name": "n", "description": "", "group": "Ungrouped variables", "definition": "random(0..2)", "templateType": "anything"}}, "parts": [{"failureRate": 1, "customMarkingAlgorithm": "", "unitTests": [], "type": "jme", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "stepsPenalty": 0, "prompt": "

$P(A)$ contains at least the elements $\\left\\{\\right\\}$ and $A$. The case where $\\left\\{\\right\\} = A$ is particularly interesting. What is $P(\\left\\{\\right\\})$?

", "checkVariableNames": false, "steps": [{"failureRate": 1, "customMarkingAlgorithm": "", "unitTests": [], "type": "jme", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "prompt": "

What is $\\left|\\left\\{\\right\\}\\right|$?

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

Hence, what is $\\left|P(\\left\\{\\right\\})\\right|$?

", "checkVariableNames": false, "customName": "", "showPreview": true, "useCustomName": false, "valuegenerators": [], "showFeedbackIcon": true, "vsetRangePoints": 5, "variableReplacements": [], "checkingType": "absdiff", "marks": 1, "scripts": {}, "showCorrectAnswer": true, "vsetRange": [0, 1], "answer": "1"}, {"useCustomName": false, "customMarkingAlgorithm": "", "unitTests": [], "showFeedbackIcon": true, "type": "information", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "prompt": "

Hence $P(\\left\\{\\right\\})$ is a set that only contains one element. But it must at least contain the element $\\left\\{\\right\\}$. Ponder this for a moment and then answer the question below, and remember that the NUMBAS syntax for $\\left\\{\\right\\}$ is set().

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

If $\\left|S\\right|=\\var{n}$ then what is $\\left|P(P(P(S)))\\right|$?

", "checkVariableNames": false, "steps": [{"failureRate": 1, "customMarkingAlgorithm": "", "unitTests": [], "type": "jme", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "prompt": "

Using the handy fact, $\\left|P(S)\\right| = 2^{\\var{n}}$.

\n

Using this handy fact again, we deduce that $\\left|P(P(S))\\right| = 2^{\\left|P(S)\\right|}$, which is

", "checkVariableNames": false, "customName": "", "showPreview": true, "useCustomName": false, "valuegenerators": [], "showFeedbackIcon": true, "vsetRangePoints": 5, "variableReplacements": [], "checkingType": "absdiff", "marks": 1, "scripts": {}, "showCorrectAnswer": true, "vsetRange": [0, 1], "answer": "2^2^{n}"}, {"useCustomName": false, "customMarkingAlgorithm": "", "unitTests": [], "showFeedbackIcon": true, "type": "information", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "prompt": "

Use the handy fact yet again to determine $\\left|P(P(P(S)))\\right|$.

", "scripts": {}, "showCorrectAnswer": true, "customName": ""}], "customName": "", "showPreview": true, "useCustomName": false, "valuegenerators": [], "showFeedbackIcon": true, "vsetRangePoints": 5, "variableReplacements": [], "checkingType": "absdiff", "marks": 1, "scripts": {}, "showCorrectAnswer": true, "vsetRange": [0, 1], "answer": "2^2^2^{n}"}], "functions": {}, "statement": "

We use the notation $\\left|A\\right| = n$ to mean that $A$ contains $n$ elements. This is often called the cardinality of the set. Here is a handy fact about the number of elements in a power set.

\n

If $\\left|A\\right| = n$ then $\\left|P(A)\\right| =2^n$.

\n

Using this fact, answer the following questions regarding the power set.

Since $P(\\left\\{\\right\\}) = 2^{\\left|\\left\\{\\right\\}\\right|} = 2^0 = 1$ we know that $P(\\left\\{\\right\\})$ is a one-element set which contains $\\left\\{\\right\\}$. There is only one possible answer

\n

$\\left\\{\\left\\{\\right\\}\\right\\}$.

\n
\n

We construct the answer gradually. Since $\\left|S\\right| = \\var{n}$

\n
\n
• $\\left|P(S)\\right| = 2^\\var{n}$
• \n
• $\\left|P(P(S))\\right| = 2^{\\left|P(S)\\right|} = 2^{2^\\var{n}}$
• \n
• $\\left|P(P(P(S)))\\right| = 2^{\\left|P(P(S))\\right|} = 2^{2^{2^\\var{n}}}$.
• \n
\n

\n

", "type": "question"}, {"name": "Basic Set Theory: cartesian product", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "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/"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "

Recall the two facts about cardinality of the cross product and power set

\n

$\\left|A\\times B\\right| = \\left|A\\right| \\times \\left|B\\right|,\\quad \\text{and} \\quad \\left|P(A)\\right| = 2^{\\left|A\\right|}$.

\n

Using these facts it is possible to determine:

\n
\n
• $\\left|A\\times B\\right| = \\var{a} \\times \\var{b}$.
• \n
• $\\left|P(A\\times B)\\right| = 2^{(\\var{a} \\times \\var{b})}$.
• \n
• $\\left|P(A)\\times P(B))\\right| = 2^{\\var{a}} \\times 2^{\\var{b}}$.
• \n
\n

", "variables": {"a": {"templateType": "anything", "definition": "random(3..8)", "description": "", "name": "a", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "definition": "random(3..8 except a)", "description": "", "name": "b", "group": "Ungrouped variables"}}, "statement": "

The Cartesian Product of two sets $A$ and $B$ is the set of all pairs $(a,b)$ where $a \\in A$ and $b \\in B$. Or, in the language of set theory:

\n

$A \\times B = \\left\\{(a,b) | a \\in A, b \\in B\\right\\}$.

\n

Consider the sets $A$ and $B$ where $\\left|A\\right| = \\var{a}$ and $\\left|B\\right| = \\var{b}$. The cardinality of $A\\times B$ is

\n

$\\left|A\\times B\\right| = \\left|A\\right| \\times \\left|B\\right|$

\n

Answer the following questions using the NUMBAS synax * for multiplication and ^ for exponent. For example 3*2^9 is the syntax for $3 \\times 2^9$.

", "tags": [], "ungrouped_variables": ["a", "b"], "metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "description": "

Introduces the cartesian product, along with some simple questions about cardinality.

"}, "rulesets": {}, "preamble": {"css": "", "js": ""}, "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "

Evaluate $\\left|A\\times B\\right|$.

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

Evaluate $\\left|P(A \\times B)\\right|$

", "showFeedbackIcon": true, "scripts": {}, "answer": "2^{a*b}", "vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "vsetRange": [0, 1], "marks": 1, "customMarkingAlgorithm": "", "variableReplacements": [], "failureRate": 1, "extendBaseMarkingAlgorithm": true, "useCustomName": false, "showPreview": true, "valuegenerators": [], "showCorrectAnswer": true, "customName": "", "type": "jme", "unitTests": [], "checkVariableNames": false}, {"variableReplacementStrategy": "originalfirst", "prompt": "

Evaluate $\\left|P(A) \\times P(B)\\right|$

", "showFeedbackIcon": true, "scripts": {}, "answer": "2^{a}*2^{b}", "vsetRangePoints": 5, "checkingType": "absdiff", "checkingAccuracy": 0.001, "vsetRange": [0, 1], "marks": 1, "customMarkingAlgorithm": "", "variableReplacements": [], "failureRate": 1, "extendBaseMarkingAlgorithm": true, "useCustomName": false, "showPreview": true, "valuegenerators": [], "showCorrectAnswer": true, "customName": "", "type": "jme", "unitTests": [], "checkVariableNames": false}], "functions": {}, "variable_groups": [], "type": "question"}, {"name": "Functions: definition of a function", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "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/"}], "statement": "

For two sets $A,B$ the Cartesian product is

\n

$A \\times B = \\left\\{(a,b) | a \\in A, b \\in B\\right\\}.$

\n

A function $f$ from $A$ to $B$, written $f : A \\mapsto B$, is a subset of $A\\times B$ subject to the condition that for all $a\\in A$ there is exactly one $b\\in B$ such that $(a,b) \\in f$.

\n

In other words, for every $a$ the function must determine a unique output $b$. Since $a$ determines $b$ we usually indicate this with the function notation $f(a) = b$.

\n

For example, consider the sets $A = \\left\\{\\var{a0},\\var{a1},\\var{b1},\\var{a2}\\right\\}$ and $B=\\left\\{\\var{b0},\\var{b1},\\var{b2}\\right\\}$ and $f : A \\mapsto B$ defined by

\n

$f = \\left\\{ (\\var{a0},\\var{b0}),(\\var{a1},\\var{b1}),(\\var{a2},\\var{b0}),(\\var{a0},\\var{b1})\\right\\}$.

\n

", "ungrouped_variables": ["a0", "a1", "a2", "b0", "b1", "b2"], "metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "description": "

Intorduces students to the definition of a function $f:A\\mapsto B$ as a subset of the Cartesian product $A\\times B$.

"}, "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {}, "functions": {}, "preamble": {"css": "", "js": ""}, "advice": "

This question exhibits the different ways to show that $f$ is not a function.

\n
\n

Part a introduces the notion of a function as a subset of the Cartesian product, and is designed to get you used to the syntax.

\n

For part b, there are two values of $\\var{b0},\\var{b1} \\in B$ which are equal to $f(\\var{a0})$. This means that $f(\\var{a0})$ is not uniquely determined, and so $f$ can not be a function.

\n

For part c, we see that $\\var{b1} \\in A$ but there is no function value for $f(\\var{b1})$. This means that $f(a)$ is not uniquely determined for every $a \\in A$ and so $f$ can not be a function.

", "tags": [], "parts": [{"variableReplacementStrategy": "originalfirst", "minMarks": 0, "type": "m_n_2", "variableReplacements": [], "warningType": "none", "scripts": {}, "minAnswers": 0, "maxMarks": 0, "showCellAnswerState": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "customName": "", "shuffleChoices": true, "matrix": ["1", "-1", "1", "-1", "1", "-1"], "showFeedbackIcon": true, "displayType": "checkbox", "showCorrectAnswer": true, "prompt": "

Which of the following are true?

", "marks": 0, "displayColumns": 0, "unitTests": [], "maxAnswers": 0, "customMarkingAlgorithm": "", "distractors": ["", "According to the relation $(\\var{a0}, \\var{b0}) \\in f$, but you answered $(\\var{b0}, \\var{a0})$ which is not in $f$.", "", "According to the relation $f(\\var{a2})=\\var{b0}$, but you answered $f(\\var{b0}) = \\var{a2}$.", "", "You chose $f(\\var{a2}) = \\var{b1}$ but $(\\var{a2}, \\var{b1}) \\notin f$."], "choices": ["

$(\\var{a0}, \\var{b0}) \\in f$

", "

$(\\var{b0}, \\var{a0}) \\in f$

", "

$f(\\var{a2}) = \\var{b0}$

", "

$f(\\var{b0}) = \\var{a2}$

", "

$(\\var{a1}, \\var{b1}) \\in f$

", "

$f(\\var{a2}) = \\var{b1}$

"]}, {"variableReplacementStrategy": "originalfirst", "minMarks": 0, "type": "m_n_2", "variableReplacements": [], "warningType": "none", "scripts": {}, "minAnswers": 0, "maxMarks": 0, "showCellAnswerState": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "customName": "", "shuffleChoices": true, "matrix": ["0.5", "0.5", "-0.5", "-0.5", "-0.5"], "showFeedbackIcon": true, "displayType": "checkbox", "showCorrectAnswer": true, "prompt": "

For $f$ to be a function there must be exactly one $b$ value for every $a$ value such that $f(a) = b$. This means that there are two ways that $f$ can fail to be a function: either there are too many possible values of $b$, or too few.

\n

In this example $f$ is not a function because there is more than one value of $b$ such that $f(\\var{a0}) = b$. These are

", "marks": 0, "displayColumns": 0, "unitTests": [], "maxAnswers": 0, "customMarkingAlgorithm": "", "distractors": ["", "", "", "", ""], "choices": ["

$\\var{b0}$

", "

$\\var{b1}$

", "

$\\var{a0}$

", "

$\\var{a1}$

", "

$\\var{a2}$

"]}, {"variableReplacementStrategy": "originalfirst", "vsetRangePoints": 5, "checkVariableNames": false, "failureRate": 1, "type": "jme", "variableReplacements": [], "scripts": {"mark": {"script": "// extract question variables\nvar variables = this.question.scope.variables;\nvar unwrap = Numbas.jme.unwrapValue;\nvar a0 = unwrap(variables.a0);\nvar a1 = unwrap(variables.a1);\nvar a2 = unwrap(variables.a2);\n\nvar b0 = unwrap(variables.b0);\nvar b1 = unwrap(variables.b1);\nvar b2 = unwrap(variables.b2);\n\nvar tree;\ntry {\n tree = Numbas.jme.compile(this.studentAnswer);\n var ans = unwrap(Numbas.jme.evaluate(tree,this.question.scope));\n \n switch (ans) {\n case a0:\n this.setCredit(0,\"$f(\" + a0 + \")$ is defined to be $\" + b0 + \"$ and $\" + b1 + \"$.\");\n break;\n case a1:\n this.setCredit(0,\"$f(\" + a1 + \")$ is defined to be $\" + b1 + \"$.\");\n break;\n case a2:\n this.setCredit(0,\"$f(\" + a2 + \")$ is defined to be $\" + b0 + \"$.\");\n break;\n case b1: \n this.setCredit(1,\"You correctly identified that $f(\" + b1 + \")$ is undefined.\");\n break;\n default:\n this.setCredit(0,\"Your answer $\" + ans + \"$ is not an element of the domain $A$.\");\n break;\n }\n}\ncatch(e) {\n this.markingComment(e);\n}", "order": "instead"}}, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "customName": "", "vsetRange": [0, 1], "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Here is a different reason why $f$ is not a function -  becase there is one value of $a\\in A$ such that $f(a)$ is not defined. This is

", "marks": "1", "showPreview": true, "valuegenerators": [], "unitTests": [], "checkingAccuracy": 0.001, "customMarkingAlgorithm": "", "answer": "{b1}", "checkingType": "absdiff"}], "variables": {"a0": {"name": "a0", "group": "Ungrouped variables", "definition": "random(0..9)", "templateType": "anything", "description": ""}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(0..9 except [a0,a1,a2,b0,b1])", "templateType": "anything", "description": ""}, "b0": {"name": "b0", "group": "Ungrouped variables", "definition": "random(0..9 except [a0,a1,a2])", "templateType": "anything", "description": ""}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(0..9 except a0)", "templateType": "anything", "description": ""}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(0..9 except [a0,a1])", "templateType": "anything", "description": ""}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(0..9 except [a0,a1,a2,b0])", "templateType": "anything", "description": ""}}, "type": "question"}]}], "feedback": {"intro": "", "advicethreshold": 0, "feedbackmessages": [], "showactualmark": true, "allowrevealanswer": true, "showanswerstate": true, "showtotalmark": true}, "showQuestionGroupNames": false, "showstudentname": true, "type": "exam", "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Joshua Capel", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1479/"}, {"name": "Sean Gardiner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2443/"}], "extensions": [], "custom_part_types": [], "resources": [["question-resources/384px-Venn0111.svg.png", "/srv/numbas/media/question-resources/384px-Venn0111.svg.png"], ["question-resources/384px-Venn0001.svg.png", "/srv/numbas/media/question-resources/384px-Venn0001.svg.png"], ["question-resources/384px-Venn0110.svg.png", "/srv/numbas/media/question-resources/384px-Venn0110.svg.png"], ["question-resources/240px-Venn0100.svg.png", "/srv/numbas/media/question-resources/240px-Venn0100.svg.png"]]}