// Numbas version: finer_feedback_settings {"name": "Blathnaid's copy of Predicates and sets", "feedback": {"allowrevealanswer": true, "showtotalmark": true, "advicethreshold": 0, "intro": "", "feedbackmessages": [], "showanswerstate": true, "showactualmark": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "allQuestions": true, "shuffleQuestions": false, "percentPass": 0, "duration": 0, "pickQuestions": 0, "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "allowregen": true, "showresultspage": "oncompletion", "preventleave": true, "browse": true, "showfrontpage": true}, "metadata": {"description": "
Questions about logical predicates, and basic set theory concepts.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "exam", "questions": [], "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": "set4-", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "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}], "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]]
\n2) $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]]
\n3) $S=\\{x\\:| x \\in \\mathbb{Z}\\text{ and }\\;|\\var{a1}x-\\var{c1}| \\leq \\var{b1}\\}$.
\n$S=\\;$[[2]]
\n4) $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]]
\n2) $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\nNote that you input sets in the form set(a,b,c,..,z)
.
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).