// Numbas version: finer_feedback_settings {"name": "set4", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "b", "c", "ans1", "ans2", "a1", "b1", "c1", "ans3", "ans4", "a2", "b2", "c2", "a3", "b3", "c3", "g"], "name": "set4", "tags": ["enumerate", "predicates", "sets"], "advice": "", "rulesets": {}, "parts": [{"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": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{ans1}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{ans2}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{ans3}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{ans4}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"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": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{set(-c2+1..c2-1)}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{set(g*ceil((-c3+1)/g)..(c3-1)#g)}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "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).

", "variable_groups": [], "variablesTest": {"maxRuns": "200", "condition": "gcd(a2,b2)=1 and gcd(a3,b3)<>1"}, "preamble": {"css": "", "js": ""}, "variables": {"a": {"definition": "random(2..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(3..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(2..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "g": {"definition": "gcd(a3,b3)", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "ans1": {"definition": "set(a*ceil((c-b)/a)-c..a*floor((c+b)/a)-c#a)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "ans2": {"definition": "ans1 and set(1..b)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}, "ans3": {"definition": "set(ceil((c1-b1)/a1)..floor((c1+b1)/a1))", "templateType": "anything", "group": "Ungrouped variables", "name": "ans3", "description": ""}, "ans4": {"definition": "ans3 and set(1..floor((c1+b1)/a1))", "templateType": "anything", "group": "Ungrouped variables", "name": "ans4", "description": ""}, "a1": {"definition": "random(2..6 except a)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "a3": {"definition": "random(2..15)", "templateType": "anything", "group": "Ungrouped variables", "name": "a3", "description": ""}, "a2": {"definition": "random(2..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "a2", "description": ""}, "b1": {"definition": "random(6..10 except b)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "b2": {"definition": "random(2..12)", "templateType": "anything", "group": "Ungrouped variables", "name": "b2", "description": ""}, "b3": {"definition": "random(2..12)", "templateType": "anything", "group": "Ungrouped variables", "name": "b3", "description": ""}, "c3": {"definition": "random(6..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "c3", "description": ""}, "c2": {"definition": "random(4..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "c2", "description": ""}, "c1": {"definition": "random(3..6 except c)", "templateType": "anything", "group": "Ungrouped variables", "name": "c1", "description": ""}}, "metadata": {"notes": "", "description": "

Enumerate elements of a set given in predicate form.

\n

For example, find all elements of $A=\\{x\\in\\mathbb{Z}\\;|\\;\\;|2x-5|<4\\}$.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}