// Numbas version: finer_feedback_settings {"name": "Luis's copy of Set builder notation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "
Enumerate each of the following sets.
\nNote that you input sets in the form set(a,b,c,d)
.
For example set(1,2,3)
gives the set $\\{1,2,3\\}$.
The empty set is input as set()
.
Also some labour saving tips:
\nIf you want to input all integers between $a$ and $b$ inclusive then instead of writing all the elements you can input this as set(a..b)
.
If you want to input all integers between $a$ and $b$ inclusive in steps of $c$ then this is input as set(a..b#c)
. So all odd integers from $-3$ to $28$ are input as set(-3..28#2).
Notation set(a..b)
and set(a,b,c)
cannot be mixed. For example set(a..b,c)
will not be processed as expected.
Enumerate the elements in some sets defined using set builder notation.
", "notes": "", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "parts": [{"type": "gapfill", "prompt": "$S_1=\\{y\\;|\\;y \\in \\mathbb{Z}, y=\\var{a}x-\\var{c},\\;x \\in \\mathbb{Z}\\text{ and } |y| \\leq \\var{b}\\}$
\n$S_1 = \\;$[[0]]
", "scripts": {}, "gaps": [{"variableReplacements": [], "checkvariablenames": false, "vsetrangepoints": 5, "expectedvariablenames": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrange": [0, 1], "scripts": {}, "answer": "{ans1}", "showCorrectAnswer": true, "checkingtype": "absdiff"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "marks": 0}, {"type": "gapfill", "prompt": "$S_2=\\{y\\;|\\;y \\in \\mathbb{N}, y=\\var{a}x-\\var{c},\\;x \\in \\mathbb{Z}\\text{ and } |y| \\leq \\var{b}\\}$
\n$S_2 = \\;$[[0]]
", "scripts": {}, "gaps": [{"variableReplacements": [], "checkvariablenames": false, "vsetrangepoints": 5, "expectedvariablenames": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrange": [0, 1], "scripts": {}, "answer": "{ans2}", "showCorrectAnswer": true, "checkingtype": "absdiff"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "marks": 0}, {"type": "gapfill", "prompt": "$S_3=\\{x\\;|\\; x \\in \\mathbb{Z}\\text{ and }\\;|\\;\\var{a1}x-\\var{c1}\\;| \\leq \\var{b1}\\}$.
\n$S_3=\\;$[[0]]
", "scripts": {}, "gaps": [{"variableReplacements": [], "checkvariablenames": false, "vsetrangepoints": 5, "expectedvariablenames": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrange": [0, 1], "scripts": {}, "answer": "{ans3}", "showCorrectAnswer": true, "checkingtype": "absdiff"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "marks": 0}, {"type": "gapfill", "prompt": "$S_4=\\{x\\;|\\; x \\in \\mathbb{N}\\text{ and }\\;|\\;\\var{a1}x-\\var{c1}\\;|\\; \\leq \\var{b1}\\}$.
\n$S_4=\\;$[[0]]
", "scripts": {}, "gaps": [{"variableReplacements": [], "checkvariablenames": false, "vsetrangepoints": 5, "expectedvariablenames": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrange": [0, 1], "scripts": {}, "answer": "{ans4}", "showCorrectAnswer": true, "checkingtype": "absdiff"}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "marks": 0}], "rulesets": {}, "advice": "We can construct this set by reading the conditions, from left to right.
\nFirst of all, every elemnt of $S_1$ is in $\\mathbb{Z}$, the set of integers. This is the set $\\{\\dots,-3,-2,1,0,1,2,3,\\dots\\}$.
\nNext, it must be possible to write $y$ in the form $\\simplify[]{{a}x-{c}}$, where $x$ is an integer. This is the set $\\{\\dots,\\var{-2*a-c},\\var{-1*a-c},\\var{-c},\\var{a-c},\\var{2*a-c},\\var{3*a-c},\\dots\\}$.
\nFinally, the set only includes the numbers listed above which lie between $-\\var{b}$ and $+\\var{b}$, i.e. $\\var{ans1}$.
\nThis set is the same as the one above, except $y$ is drawn from $\\mathbb{N}$, the natural numbers. That means that only values greater than or equal to $1$ are included.
\n$x$ is drawn from the set of integers $\\mathbb{Z} = \\{\\dots,-2,-1,0,1,2,\\dots\\}$.
\nIf $\\left\\lvert \\simplify[]{{a1}x-{c1}} \\right\\rvert \\leq \\var{b1}$, then
\n\\begin{align}
\\var{a1}x &\\geq \\var{-b1} + \\var{c1} = \\var{-b1+c1} \\\\
&\\text{and} \\\\
\\var{a1}x &\\leq \\var{b1}+\\var{c1} = \\var{b1+c1}
\\end{align}
Equivalently,
\n\\begin{align}
x &\\geq \\simplify{{-b1+c1}/{a1}} \\\\
&\\text{and} \\\\
x &\\leq \\simplify{{b1+c1}/{a1}}
\\end{align}
So $S_3 = \\var{ans3}$.
\nThis set is the same as the one above, except $x$ is drawn from the set of natural numbers $\\mathbb{N} = \\{1,2,3,\\dots\\}$, so only values greater than or equal to $1$ are included.
", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}