// Numbas version: exam_results_page_options {"name": "set4-", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"ans2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "ans1 and set(1..b)", "name": "ans2", "description": ""}, "ans3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(ceil((c1-b1)/a1)..floor((c1+b1)/a1))", "name": "ans3", "description": ""}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "name": "a", "description": ""}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..8)", "name": "c", "description": ""}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(6..10 except b)", "name": "b1", "description": ""}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6 except a)", "name": "a1", "description": ""}, "b2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..12)", "name": "b2", "description": ""}, "b3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..12)", "name": "b3", "description": ""}, "ans4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "ans3 and set(1..floor((c1+b1)/a1))", "name": "ans4", "description": ""}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(4..10)", "name": "c2", "description": ""}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..6 except c)", "name": "c1", "description": ""}, "a3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..15)", "name": "a3", "description": ""}, "ans1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(a*ceil((c-b)/a)-c..a*floor((c+b)/a)-c#a)", "name": "ans1", "description": ""}, "c3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(6..10)", "name": "c3", "description": ""}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..10)", "name": "b", "description": ""}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "gcd(a3,b3)", "name": "g", "description": ""}, "a2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "name": "a2", "description": ""}}, "ungrouped_variables": ["a", "b", "c", "ans1", "ans2", "a1", "b1", "c1", "ans3", "ans4", "a2", "b2", "c2", "a3", "b3", "c3", "g"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "set4-", "showQuestionGroupNames": false, "functions": {}, "parts": [{"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{ans1}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "{ans2}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "{ans3}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "{ans4}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "prompt": "

1) $S=\\{y\\;|\\;y \\in \\mathbb{Z}, y=\\var{a}x-\\var{c},\\;x \\in \\mathbb{Z}\\text{ and } |y| \\leq \\var{b}\\}$

\n

$S\\;$=[[0]]

\n

2) $S=\\{y\\;|\\;y \\in \\mathbb{N}, y=\\var{a}x-\\var{c},\\;x \\in \\mathbb{Z}\\text{ and } |y| \\leq \\var{b}\\}$

\n

$S\\;$=[[1]]

\n

3) $S=\\{x\\:| x \\in \\mathbb{Z}\\text{ and }\\;|\\var{a1}x-\\var{c1}| \\leq \\var{b1}\\}$.

\n

$S=\\;$[[2]]

\n

4) $S=\\{x\\:| x \\in \\mathbb{N}\\text{ and }\\;|\\var{a1}x-\\var{c1}| \\leq \\var{b1}\\}$.

\n

$S=\\;$[[3]]

", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{set(-c2+1..c2-1)}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "{set(g*ceil((-c3+1)/g)..(c3-1)#g)}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "prompt": "

1) $S=\\{\\var{a2}a+\\var{b2}b\\;|\\;a,\\;b \\in \\mathbb{Z},\\;|\\var{a2}a+\\var{b2}b\\,|\\lt \\var{c2}\\}$.

\n

$S=\\;$[[0]]

\n

2) $S=\\{\\var{a3}a+\\var{b3}b\\;|\\;a,\\;b \\in \\mathbb{Z},\\;|\\var{a3}a+\\var{b3}b\\,|\\lt \\var{c3}\\}$.

\n

$S=\\;$[[1]]

\n

", "variableReplacements": [], "marks": 0}], "statement": "

Enumerate each of the following sets.

\n

\n

Note that you input sets in the form set(a,b,c,..,z) .

\n

For example set(1,2,3)gives the set $\\{1,2,3\\}$.

\n

The empty set is input as set().

\n

Also some labour saving tips:

\n

If 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).

\n

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).

", "tags": [], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "gcd(a2,b2)=1 and gcd(a3,b3)<>1", "maxRuns": "200"}, "advice": "", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}