// Numbas version: exam_results_page_options {"questions": [], "duration": 0, "name": "Predicates and sets", "showQuestionGroupNames": false, "allQuestions": true, "percentPass": 0, "feedback": {"showanswerstate": true, "advicethreshold": 0, "showactualmark": true, "allowrevealanswer": true, "showtotalmark": true}, "shuffleQuestions": false, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Predicates", "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": {"mm2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(map(if(choices[2][6][y]=x,1,0),x,0..8),y,0..3)", "description": "", "name": "mm2"}, "logic_exp": {"templateType": "anything", "group": "Ungrouped variables", "definition": "['$\\\\neg p \\\\lor \\\\neg q$', \n '$p \\\\land q$', \n '$\\\\neg p \\\\land q$',\n '$p \\\\land \\\\neg q$',\n '$p \\\\to q$',\n '$\\\\neg p \\\\land \\\\neg q$',\n '$(p \\\\lor \\\\neg q) \\\\land p$',\n '$q \\\\to p$',\n '$\\\\neg p \\\\to q$'\n ]", "description": "", "name": "logic_exp"}, "choices": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[['It is snowing','I will go skiing',\n 'As it is not snowing I will go skiing.',\n 'It will snow if I don\\'t go skiing.',\n 'I will go skiing if it is snowing.',\n 'It is snowing and I may or may not go skiing.',\n [2,8,4,6,0,1,3,7,5]\n ],\n ['I am working at my studies', 'I am in the library',\n 'I am working at my studies in the library.',\n 'If I use the library then I am working at my studies.',\n 'If I am working at my studies then I am not in the library.',\n 'If I am in the library then I may not be working at my studies.',\n [1,7,0,6,8,2,3,4,5]\n ],\n ['It is sunny','I will carry an umbrella',\n 'If it is not sunny then I will carry an umbrella.',\n 'I carry an umbrella even if it is sunny.',\n 'If it is sunny then I may carry an umbrella.',\n 'If I carry an umbrella then the day always turns out to be sunny!',\n [8,4,6,7,0,1,2,5,3]\n \n]\n \n]", "description": "", "name": "choices"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,1,2)", "description": "", "name": "t"}, "mm1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(map(if(choices[1][6][y]=x,1,0),x,0..8),y,0..3)", "description": "", "name": "mm1"}, "mm0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(map(if(choices[0][6][y]=x,1,0),x,0..8),y,0..3)", "description": "", "name": "mm0"}}, "ungrouped_variables": ["choices", "logic_exp", "t", "mm0", "mm1", "mm2"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"displayType": "radiogroup", "minMarks": 0, "layout": {"type": "all", "expression": ""}, "choices": ["{choices[0][2]}", "{choices[0][3]}", "{choices[0][4]}", "{choices[0][5]}"], "showCorrectAnswer": true, "matrix": "mm0", "prompt": "

Let $p$ and $q$ denote respectively the propositions '{choices[0][0]}' and '{choices[0][1]}'.

", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": true, "warningType": "none", "scripts": {}, "marks": 0, "minAnswers": 0, "maxMarks": 0, "shuffleAnswers": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "answers": ["{logic_exp[0]}", "{logic_exp[1]}", "{logic_exp[2]}", "{logic_exp[3]}", "{logic_exp[4]}", "{logic_exp[5]}", "{logic_exp[6]}", "{logic_exp[7]}", "{logic_exp[8]}"]}, {"displayType": "radiogroup", "minMarks": 0, "layout": {"type": "all", "expression": ""}, "choices": ["{choices[1][2]}", "{choices[1][3]}", "{choices[1][4]}", "{choices[1][5]}"], "showCorrectAnswer": true, "matrix": "mm1", "prompt": "

Let $p$ and $q$ denote respectively the propositions '{choices[1][0]}' and '{choices[1][1]}'.

", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": true, "warningType": "none", "scripts": {}, "marks": 0, "minAnswers": 0, "maxMarks": 0, "shuffleAnswers": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "answers": ["{logic_exp[0]}", "{logic_exp[1]}", "{logic_exp[2]}", "{logic_exp[3]}", "{logic_exp[4]}", "{logic_exp[5]}", "{logic_exp[6]}", "{logic_exp[7]}", "{logic_exp[8]}"]}, {"displayType": "radiogroup", "minMarks": 0, "layout": {"type": "all", "expression": ""}, "choices": ["{choices[2][2]}", "{choices[2][3]}", "{choices[2][4]}", "{choices[2][5]}"], "showCorrectAnswer": true, "matrix": "mm2", "prompt": "

Let $p$ and $q$ denote respectively the propositions '{choices[2][0]}' and '{choices[2][1]}'.

", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": true, "warningType": "none", "scripts": {}, "marks": 0, "minAnswers": 0, "maxMarks": 0, "shuffleAnswers": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "answers": ["{logic_exp[0]}", "{logic_exp[1]}", "{logic_exp[2]}", "{logic_exp[3]}", "{logic_exp[4]}", "{logic_exp[5]}", "{logic_exp[6]}", "{logic_exp[7]}", "{logic_exp[8]}"]}], "statement": "

Choose the correct logical expression  for the following English sentences.

", "tags": [], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": ""}, {"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]]

\n

b) $B=\\{x \\in \\mathbb{Z}\\;|\\;\\var{d} \\leq x \\leq \\var{f}\\text{ and } x^2 \\lt \\var{g}\\}$.

\n

$B=\\;$[[1]]

\n

c) $C=\\{x \\in \\mathbb{Z}\\;|\\;\\var{d} \\leq x \\leq \\var{f}\\text{ and } x^2 \\gt \\var{g}\\}$.

\n

$C=\\;$[[2]]

\n

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

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

", "scripts": {}, "gaps": [{"answer": "{answer_set1}", "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": "{answer_set2}", "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": "{answer_set3}", "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": "{answer_set4}", "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", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Write the following sets in enumerated form.

\n

Note that you enter an enumerated set such as $\\{35,67,99\\}$ as set(35,67,99).

\n

", "tags": [], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "advice": ""}, {"name": "set2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

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"}, {"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:

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

", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"answer": "{set1 and set2}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "{set2 and set3}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "{set1 and (universal-set3)}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "{((universal-set1) or set3) and set2}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "{(universal-(set1 or set3)) and (universal-set2)}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "{(set1 or (universal-set2)) and set3}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}], "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

", "tags": [], "rulesets": {}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "advice": ""}, {"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]]

\n

2) $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]]

\n

3) $S=\\{x\\:| x \\in \\mathbb{Z}\\text{ and }\\;|\\var{a1}x-\\var{c1}| \\leq \\var{b1}\\}$.

\n

$S=\\;$[[2]]

\n

4) $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]]

\n

2) $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

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

", "tags": [], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "gcd(a2,b2)=1 and gcd(a3,b3)<>1", "maxRuns": "200"}, "advice": ""}], "name": "", "pickQuestions": 0}], "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Questions about logical predicates, and basic set theory concepts.

"}, "type": "exam", "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "browse": true, "showresultspage": "oncompletion", "preventleave": true, "allowregen": true, "showfrontpage": true}, "timing": {"timedwarning": {"action": "none", "message": ""}, "timeout": {"action": "none", "message": ""}, "allowPause": true}, "pickQuestions": 0, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "extensions": [], "custom_part_types": [], "resources": []}