// Numbas version: exam_results_page_options {"name": "Andrew's copy of java", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"showQuestionGroupNames": false, "preamble": {"css": "", "js": ""}, "functions": {"mod_set": {"definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;iEnumerate the following sets:

\n

a) $A \\cap B=\\;$[[0]]

\n

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

\n

c) $A \\cap \\overline{C}=\\;$[[2]]

\n

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

\n

e) $\\overline{A \\cup C} \\cap \\overline{B}=\\;$[[4]]

\n

f) $(A \\cup \\overline{B}) \\cap C=\\;$[[5]]

\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).

", "variableReplacements": [], "type": "gapfill", "variableReplacementStrategy": "originalfirst"}], "rulesets": {}, "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

", "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "type": "question", "tags": ["complement", "elements", "intersection", "predicates", "set operations", "sets", "subsets", "union"], "variable_groups": [], "question_groups": [{"pickQuestions": 0, "pickingStrategy": "all-ordered", "name": "", "questions": []}], "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

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

"}, "variables": {"c": {"definition": "b+random(10..a-b)", "description": "", "templateType": "anything", "name": "c", "group": "Ungrouped variables"}, "f": {"definition": "random(2,3,5,6)", "description": "", "templateType": "anything", "name": "f", "group": "Ungrouped variables"}, "set2": {"definition": "set(d+1..a)", "description": "", "templateType": "anything", "name": "set2", "group": "Ungrouped variables"}, "d": {"definition": "random(5..c-1)", "description": "", "templateType": "anything", "name": "d", "group": "Ungrouped variables"}, "b": {"definition": "random(3..8)", "description": "", "templateType": "anything", "name": "b", "group": "Ungrouped variables"}, "universal": {"definition": "set(1..a)", "description": "", "templateType": "anything", "name": "universal", "group": "Ungrouped variables"}, "a": {"definition": "random(15..30)", "description": "", "templateType": "anything", "name": "a", "group": "Ungrouped variables"}, "set3": {"definition": "set(mod_set(1,a,f))", "description": "", "templateType": "anything", "name": "set3", "group": "Ungrouped variables"}, "set1": {"definition": "set(b..c)", "description": "", "templateType": "anything", "name": "set1", "group": "Ungrouped variables"}}, "name": "Andrew's copy of java", "advice": "", "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}]}]}], "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}]}