// 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": "set1", "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": {"r": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(8..15)", "description": "", "name": "r"}, "answer_set4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "answer_set1 and answer_set3", "description": "", "name": "answer_set4"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(8..20)", "description": "", "name": "a"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..7)", "description": "", "name": "c"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(10..25)", "description": "", "name": "f"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-25..-5)", "description": "", "name": "d"}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "r^2", "description": "", "name": "g"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a+random(12..30)", "description": "", "name": "b"}, "answer_set1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(mod_set(a,b,c))", "description": "", "name": "answer_set1"}, "answer_set2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(-r+1..r-1)and set(d..f)", "description": "", "name": "answer_set2"}, "answer_set3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(d..f) and(set(d-1..-r-1) or set(r+1..f+1))", "description": "", "name": "answer_set3"}}, "ungrouped_variables": ["a", "b", "c", "answer_set1", "d", "f", "g", "answer_set2", "r", "answer_set3", "answer_set4"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {"mod_set": {"type": "list", "language": "javascript", "definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;ia) $A=\\{x \\in \\mathbb{N}\\;|\\;\\var{a} \\leq x \\leq \\var{b}\\text{ and } x \\text{ is divisible by }\\var{c}\\}$.\n$A=\\;$[[0]]
\nb) $B=\\{x \\in \\mathbb{Z}\\;|\\;\\var{d} \\leq x \\leq \\var{f}\\text{ and } x^2 \\lt \\var{g}\\}$.
\n$B=\\;$[[1]]
\nc) $C=\\{x \\in \\mathbb{Z}\\;|\\;\\var{d} \\leq x \\leq \\var{f}\\text{ and } x^2 \\gt \\var{g}\\}$.
\n$C=\\;$[[2]]
\nd) $A \\cap C=\\;$[[3]]
\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).
Write the following sets in enumerated form.
\nNote that you enter an enumerated set such as $\\{35,67,99\\}$ as set(35,67,99)
.
Let $A=\\var{set_list}$
\n", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1..6 except[a,c])", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..6)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..6 except a)", "description": "", "templateType": "anything", "can_override": false}, "select": {"name": "select", "group": "Ungrouped variables", "definition": "shuffle(list(0..length(choices)-1))[0..8]", "description": "", "templateType": "anything", "can_override": false}, "choices": {"name": "choices", "group": "Ungrouped variables", "definition": "[\n latex(safe('\\\\var{a} \\\\in A')),\n latex(safe('\\\\var{a} \\\\subseteq A')),\n latex(safe('\\\\\\{\\\\var{a}\\\\\\} \\\\in A')),\n latex(safe('\\\\\\{\\\\var{a} \\\\\\}\\\\subseteq A')),\n latex(safe('\\\\\\{\\\\\\{\\\\var{a} \\\\\\}\\\\\\}\\\\subseteq A')),\n latex(safe('\\\\var{c} \\\\in A')),\n latex(safe('\\\\\\{\\\\var{c}\\\\\\} \\\\in A')),\n latex(safe('\\\\\\{\\\\\\{\\\\var{c} \\\\\\}\\\\\\}\\\\subseteq A')),\n latex(safe('\\\\\\{\\\\var{b}\\\\\\} \\\\in A')),\n latex(safe('\\\\\\{\\\\\\{\\\\var{b} \\\\\\}\\\\\\}\\\\subseteq A')),\n latex(safe('\\\\\\{\\\\var{a},\\\\var{c}\\\\\\}\\\\subseteq A')),\n latex(safe('\\\\\\{\\\\\\{\\\\var{c} \\\\\\},\\\\\\{\\\\var{b} \\\\\\}\\\\\\}\\\\subseteq A')),\n latex(safe('\\\\\\{\\\\var{c},\\\\var{b} \\\\\\}\\\\in A')),\n latex(safe('\\\\\\{\\\\var{a},\\\\\\{\\\\var{b},\\\\var{c}\\\\\\}\\\\\\} \\\\subseteq A'))\n]\n", "description": "", "templateType": "anything", "can_override": false}, "set_list": {"name": "set_list", "group": "Ungrouped variables", "definition": "set(shuffle([a,latex(safe('\\\\\\{\\\\var{a}\\\\\\}')),b,latex(safe('\\\\\\{\\\\var{c}\\\\\\}')),\nlatex(safe('\\\\\\{\\\\var{b},\\\\var{c}\\\\\\}'))]))", "description": "", "templateType": "anything", "can_override": false}, "mark_matrix": {"name": "mark_matrix", "group": "Ungrouped variables", "definition": "map([[1,0,1,1,1,0,1,1,0,0,0,0,1,1][y],[0,1,0,0,0,1,0,0,1,1,1,1,0,0][y]],y,select)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["set_list", "a", "b", "c", "choices", "select", "mark_matrix"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_x", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Which of the following statements about the set $A$ are true or false?
", "minMarks": 0, "maxMarks": 0, "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": true, "shuffleAnswers": false, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["$\\var{choices[select[0]]}$", "$\\var{choices[select[1]]}$", "$\\var{choices[select[2]]}$", "$\\var{choices[select[3]]}$", "$\\var{choices[select[4]]}$", "$\\var{choices[select[5]]}$", "$\\var{choices[select[6]]}$", "$\\var{choices[select[7]]}$"], "matrix": "mark_matrix", "layout": {"type": "all", "expression": ""}, "answers": ["True", "False"]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "set3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"set1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(b..c)", "description": "", "name": "set1"}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(3..8)", "description": "", "name": "b"}, "universal": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(1..a)", "description": "", "name": "universal"}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "b+random(10..a-b)", "description": "", "name": "c"}, "f": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2,3,5,6)", "description": "", "name": "f"}, "set3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(mod_set(1,a,f))", "description": "", "name": "set3"}, "d": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..c-1)", "description": "", "name": "d"}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(b+10..30)", "description": "", "name": "a"}, "set2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(d+1..a)", "description": "", "name": "set2"}}, "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "variable_groups": [], "functions": {"mod_set": {"type": "list", "language": "javascript", "definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;iEnumerate the following sets:\na) $A \\cap B=\\;$[[0]]
\nb) $B \\cap C=\\;$[[1]]
\nc) $A \\cap \\overline{C}=\\;$[[2]]
\nd) $(\\overline{A} \\cup C) \\cap B=\\;$[[3]]
\ne) $\\overline{A \\cup C} \\cap \\overline{B}=\\;$[[4]]
\nf) $(A \\cup \\overline{B}) \\cap C=\\;$[[5]]
\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).
In this question, the universal set is $\\mathcal{U}=\\{x \\in \\mathbb{N}\\; | \\;x \\leq \\var{a}\\}$.
\nLet:
\n$A=\\{x \\in \\mathbb{N}\\;|\\;\\var{b}\\leq x \\leq \\var{c}\\}$.
\n$B=\\{x \\in \\mathbb{N}\\;|\\;x \\gt \\var{d}\\}$.
\n$C=\\{ x \\in \\mathbb{N}\\;|\\; x \\text{ divisible by } \\var{f}\\}$.
\n\n", "tags": [], "rulesets": {}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "advice": ""}]}], "contributors": [{"name": "Blathnaid Sheridan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/447/"}], "extensions": [], "custom_part_types": [], "resources": []}