// Numbas version: exam_results_page_options {"name": "Simon's copy of Simon's copy of Basic Set Theory: element not in a set", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "rulesets": {}, "advice": "

A useful thing to note is that $Y \\subseteq X$. We can prove this by taking a generic element of $Y$ and proving that it also belongs to $X$.

\n

If $y \\in Y$ then $y$ has the shape $y = \\var{c}k + \\var{d}$ for some $k \\in \\mathbb Z$. We need to show that it also has the shape $\\var{a}n + \\var{b}$ for some integer $n$ and so belongs to $X$ as well.

\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$. Because $y$ has the required shape, $y=\\var{a}n + \\var{b}$ for some integer $n$, it is also an element of $X$. So $y \\in X$.

\n

\n

(a)

\n

So for this part of this question you can choose any element of $Y$. All of them will automatically be included in $X$. There are infinitely many possible answers!

\n

\n

For example we can choose $k=1 \\in \\mathbb Z$. Then $y = \\var{c} \\times 1 + \\var{d} = \\var{c+d} \\in Y$. Since $X \\subseteq Y$ then $\\var{c+d} \\in X$ as well.

\n

\n

\n

If we wanted to check that $\\var{c+d} \\in X$, we simply have to show that $\\var{c+d} = \\var{a}n + \\var{b}$, where $n$ is an integer.

\n

Well we can solve this to give $n= \\frac{\\var{c+d}-\\var{b}}{\\var{a}} =\\var{(c+d-b)/a}$ which is an integer as required.

\n

\n

\n
\n

(b)

\n

For the second question you just need to find an element of $X$ which which is not an element of $Y$. The easiest way to procede is to just keep trying different values of $n \\in \\mathbb Z$, calculate $\\var{a}n + \\var{b}$, and then check whether this value $\\in Y$.

\n

There are infinitely many possible answers!

\n

\n

e.g. We could try $n=0$ which gives $x=\\var{a}n + \\var{b}=\\var{a} \\times 0 + \\var{b} = \\var{b} \\in X$

\n

\n

Now to check whether $\\var{b} \\in Y$, we write  $\\var{b}=\\var{c}k + \\var{d}$, which we can solve to give $k = \\frac{\\var{b}-\\var{d}}{\\var{c}}=\\var{(b-d)/c}$ which is not an integer.

\n

Hence $\\var{b} \\notin Y$ as required.

\n

\n
\n

(c)

\n

By definition the sets $X$ and $Y$ are equal when both $Y\\subseteq X$ and $X \\subseteq Y$ are true.

\n

We showed in the first question that the relation $Y\\subseteq X$ is true.

\n

However we showed in the second question that $X \\nsubseteq Y$, which means that the sets cannot be equal.

\n

Since the sets are not equal, instead we could say that $X$ is a proper subset of $Y$: $X \\subset Y$.

", "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\\}$.

", "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["a", "b", "c", "d", "u"], "metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "description": "

"}, "extensions": [], "variables": {"a": {"templateType": "anything", "name": "a", "definition": "random(2..5)", "group": "Ungrouped variables", "description": ""}, "b": {"templateType": "anything", "name": "b", "definition": "random(6..9)", "group": "Ungrouped variables", "description": ""}, "c": {"templateType": "anything", "name": "c", "definition": "u*a", "group": "Ungrouped variables", "description": ""}, "u": {"templateType": "anything", "name": "u", "definition": "random(2..5)", "group": "Ungrouped variables", "description": ""}, "d": {"templateType": "anything", "name": "d", "definition": "a+b", "group": "Ungrouped variables", "description": ""}}, "functions": {}, "variable_groups": [], "parts": [{"showCorrectAnswer": true, "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"}}, "checkingAccuracy": 0.001, "prompt": "

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

", "expectedVariableNames": [], "failureRate": 1, "answer": "{d}", "showPreview": true, "variableReplacements": [], "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "vsetRangePoints": 5, "vsetRange": [0, 1], "showFeedbackIcon": true, "checkVariableNames": false, "marks": 1, "type": "jme", "unitTests": [], "checkingType": "absdiff"}, {"showCorrectAnswer": true, "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}"}}, "checkingAccuracy": 0.001, "prompt": "

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

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

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

", "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."], "maxMarks": 0, "matrix": ["1", 0], "displayColumns": 0, "minMarks": 0, "shuffleChoices": false, "variableReplacements": [], "displayType": "radiogroup", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "showCellAnswerState": true, "marks": 0, "type": "1_n_2", "unitTests": [], "choices": ["

$X \\nsubseteq Y$

", "

$Y \\subseteq X$

"]}], "name": "Simon's copy of Simon's copy of Basic Set Theory: element not in a set", "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "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/"}]}]}], "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/"}]}