// Numbas version: finer_feedback_settings {"name": "Union, Complement and Intersection of Sets", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "functions": {"mod_set": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;iGiven some random finite subsets of the natural numbers, perform set operations $\\cap,\\;\\cup$ and complement.

"}, "variables": {"d": {"group": "Ungrouped variables", "name": "d", "templateType": "anything", "definition": "random(5..c-1)", "description": ""}, "set2": {"group": "Ungrouped variables", "name": "set2", "templateType": "anything", "definition": "set(d+1..a)", "description": ""}, "a": {"group": "Ungrouped variables", "name": "a", "templateType": "anything", "definition": "random(12..24)", "description": ""}, "f": {"group": "Ungrouped variables", "name": "f", "templateType": "anything", "definition": "random(2,3,5,6)", "description": ""}, "set1": {"group": "Ungrouped variables", "name": "set1", "templateType": "anything", "definition": "set(b..c)", "description": ""}, "b": {"group": "Ungrouped variables", "name": "b", "templateType": "anything", "definition": "random(3..8)", "description": ""}, "universal": {"group": "Ungrouped variables", "name": "universal", "templateType": "anything", "definition": "set(1..a)", "description": ""}, "set3": {"group": "Ungrouped variables", "name": "set3", "templateType": "anything", "definition": "set(mod_set(f,a,f))", "description": ""}, "c": {"group": "Ungrouped variables", "name": "c", "templateType": "anything", "definition": "b+random(10..a-b)", "description": ""}}, "name": "Union, Complement and Intersection of Sets", "advice": "", "preamble": {"css": "", "js": ""}, "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"variableReplacementStrategy": "originalfirst", "type": "gapfill", "gaps": [{"variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "type": "jme", "showpreview": true, "variableReplacements": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "scripts": {}, "expectedvariablenames": [], "showCorrectAnswer": true, "answer": "{set1 or set3}", "checkvariablenames": false, "marks": 1, "showFeedbackIcon": true, "checkingtype": "absdiff"}, {"variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "type": "jme", "showpreview": true, "variableReplacements": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "scripts": {}, "expectedvariablenames": [], "showCorrectAnswer": true, "answer": "{(universal - set2) and set3}", "checkvariablenames": false, "marks": "2", "showFeedbackIcon": true, "checkingtype": "absdiff"}, {"variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "type": "jme", "showpreview": true, "variableReplacements": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "scripts": {}, "expectedvariablenames": [], "showCorrectAnswer": true, "answer": "{set1 or (universal-set2)}", "checkvariablenames": false, "marks": "2", "showFeedbackIcon": true, "checkingtype": "absdiff"}, {"variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "type": "jme", "showpreview": true, "variableReplacements": [], "vsetrange": [0, 1], "checkingaccuracy": 0.001, "scripts": {}, "expectedvariablenames": [], "showCorrectAnswer": true, "answer": "{(set1 and set2) or set3}", "checkvariablenames": false, "marks": "1", "showFeedbackIcon": true, "checkingtype": "absdiff"}], "prompt": "

Enumerate the following sets:

\n

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

\n

a) $A \\cup C=\\;$[[0]]

\n

b) $\\overline{B} \\cap C=\\;$[[1]]

\n

c) $A \\cup \\overline{B}=\\;$[[2]]

\n

d) $(A \\cap B) \\cup C=\\;$[[3]]

\n

\n

\n

", "marks": 0, "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true}], "tags": [], "statement": "

In this question, the universal set is  $\\mathcal{U}=\\{x \\in \\mathbb{N}\\; | \\;x \\leq \\var{a}\\}$.

\n

Let:

\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

", "variable_groups": [], "rulesets": {}, "extensions": [], "type": "question", "contributors": [{"name": "Deirdre Casey", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/681/"}], "resources": []}]}], "contributors": [{"name": "Deirdre Casey", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/681/"}]}