// Numbas version: exam_results_page_options {"name": "Lois's copy of Union, complement, intersection v2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Lois's copy of Union, complement, intersection v2", "tags": [], "metadata": {"description": "

Given some random finite subsets of the natural numbers, perform set operations $\\cap,\\;\\cup$ and complement.

", "licence": "Creative Commons Attribution 4.0 International"}, "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

", "advice": "", "rulesets": {}, "extensions": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(12..24)", "description": "", "templateType": "anything"}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(2,3,5,6)", "description": "", "templateType": "anything"}, "set2": {"name": "set2", "group": "Ungrouped variables", "definition": "set(d+1..a)", "description": "", "templateType": "anything"}, "set1": {"name": "set1", "group": "Ungrouped variables", "definition": "set(b..c)", "description": "", "templateType": "anything"}, "universal": {"name": "universal", "group": "Ungrouped variables", "definition": "set(1..a)", "description": "", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "a-5", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(3..8)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "a-2\n", "description": "", "templateType": "anything"}, "set3": {"name": "set3", "group": "Ungrouped variables", "definition": "set(mod_set(f,a,f))", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "variable_groups": [], "functions": {"mod_set": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "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:

\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

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{set1 or set3}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{(universal - set2) and set3}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{set1 or (universal-set2)}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{(set1 and set2) or set3}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}]}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}