// Numbas version: finer_feedback_settings {"questions": [], "duration": 0, "name": "Set Theory II", "showQuestionGroupNames": false, "allQuestions": true, "percentPass": 0, "feedback": {"showanswerstate": true, "advicethreshold": 0, "showactualmark": true, "allowrevealanswer": true, "showtotalmark": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "shuffleQuestions": false, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Andrew's copy of set3", "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": {"set1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(b..c)", "name": "set1", "description": ""}, "universal": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(1..a)", "name": "universal", "description": ""}, "d": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..c-1)", "name": "d", "description": ""}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "b+random(10..a-b)", "name": "c", "description": ""}, "f": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2,3,5,6)", "name": "f", "description": ""}, "set3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(mod_set(1,a,f))", "name": "set3", "description": ""}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(3..8)", "name": "b", "description": ""}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(15..30)", "name": "a", "description": ""}, "set2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(d+1..a)", "name": "set2", "description": ""}}, "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "rulesets": {}, "showQuestionGroupNames": false, "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 set explicitly - your answer may not include set arithmetic operations.

", "strings": ["or", "and", "union", "intersect"], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

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

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{set2 and set3}", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Enumerate the set explicitly - your answer may not include set arithmetic operations.

", "strings": ["or ", "intersect", "and ", "union "], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$B \\cap C=\\;$[[0]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{set1 and (universal-set3)}", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Enumerate the set explicitly - your answer may not include set arithmetic operations.

", "strings": ["or", "and", "union", "intersect"], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$A \\cap C^c=\\;$[[0]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{((universal-set1) or set3) and set2}", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Enumerate the set explicitly - your answer may not include set arithmetic operations.

", "strings": ["or", "and", "union", "intersect"], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$(A^c \\cup C) \\cap B=\\;$[[0]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{(universal-(set1 or set3)) and (universal-set2)}", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Enumerate the set explicitly - your answer may not include set arithmetic operations.

", "strings": ["or", "and", "union", "intersect"], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$(A \\cup C)^c \\cap B^c=\\;$[[0]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{(set1 or (universal-set2)) and set3}", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Enumerate the set explicitly - your answer may not include set arithmetic operations.

", "strings": ["or", "and", "union", "intersect"], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$(A \\cup B^c) \\cap C=\\;$[[0]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "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

Enumerate the following sets.

\n

Note that you input sets in the form set(a,b,c,d) .

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

\n

Notation set(a..b) and set(a,b,c) cannot be mixed. For example set(a..b,c) will not be processed as expected.

", "tags": [], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "advice": ""}, {"name": "Least upper bound and greatest lower bound of sets", "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": {"s1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "name": "s1", "description": ""}, "a1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "-random(1..9)", "name": "a1", "description": ""}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..9)", "name": "a", "description": ""}, "c6": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..6)", "name": "c6", "description": ""}, "b4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "r5^2*a4", "name": "b4", "description": ""}, "lub3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(s1>0,a2+b2,a2)", "name": "lub3", "description": ""}, "s2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "name": "s2", "description": ""}, "perhaps2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(s1>0,'Yes','No')", "name": "perhaps2", "description": ""}, "a7": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(10..20)", "name": "a7", "description": ""}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..9)", "name": "b", "description": ""}, "a8": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(7..20)", "name": "a8", "description": ""}, "a5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "name": "a5", "description": ""}, "b6": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-5..5)", "name": "b6", "description": ""}, "a6": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..5)", "name": "a6", "description": ""}, "perhaps1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(s1<0,'Yes','No')", "name": "perhaps1", "description": ""}, "sg": {"group": "Ungrouped variables", "templateType": "anything", "definition": "0", "name": "sg", "description": ""}, "a2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "s2*random(1..9)", "name": "a2", "description": ""}, "s9": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(b6<0,1,-1)", "name": "s9", "description": ""}, "something": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(s1=-1,'positive','negative')", "name": "something", "description": ""}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "name": "c", "description": ""}, "d": {"group": "Ungrouped variables", "templateType": "anything", "definition": "s*random(1..9)", "name": "d", "description": ""}, "m": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..5)", "name": "m", "description": ""}, "b7": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "name": "b7", "description": ""}, "b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "name": "b1", "description": ""}, "b2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "name": "b2", "description": ""}, "b5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "s1*random(1..9)", "name": "b5", "description": ""}, "ans4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "2*a4*r5", "name": "ans4", "description": ""}, "mo": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(s1=1,'de','in')", "name": "mo", "description": ""}, "r": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..6)", "name": "r", "description": ""}, "a4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..9)", "name": "a4", "description": ""}, "s": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "name": "s", "description": ""}, "b8": {"group": "Ungrouped variables", "templateType": "anything", "definition": "a8-random(1..5)", "name": "b8", "description": ""}, "r5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2,3,4,5)", "name": "r5", "description": ""}, "glb3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(s1>0,a2,a2-b2)", "name": "glb3", "description": ""}, "glb7": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround((sqrt(1+a7)-sqrt(1+b7)),2)", "name": "glb7", "description": ""}, "glb6": {"group": "Ungrouped variables", "templateType": "anything", "definition": "(a6*b6^2-2*a6*b6^2+4*a6^2*c6)/(4*a6^2)", "name": "glb6", "description": ""}}, "ungrouped_variables": ["ans4", "b4", "b5", "b6", "b7", "b1", "b2", "b8", "s9", "s2", "s1", "glb7", "glb6", "glb3", "a1", "a2", "a5", "a4", "a7", "a6", "a8", "c6", "a", "r5", "c", "b", "lub3", "d", "mo", "m", "s", "r", "perhaps1", "perhaps2", "sg", "something"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "showQuestionGroupNames": false, "functions": {}, "parts": [{"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{a1}/{b1}", "vsetrange": [0, 1], "scripts": {}, "answersimplification": "std", "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Enter as a fraction or integer, not as a decimal.

", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"answer": "{a}/{b}", "vsetrange": [0, 1], "scripts": {}, "answersimplification": "std", "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Enter as a fraction or integer, not as a decimal.

", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": ["0.5", 0], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": [0, "0.5"], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "marks": 0}], "type": "gapfill", "prompt": "

\\[S = \\left\\{\\simplify[std]{({a}n^2+{a1})/({b}n^2+{b1})}\\;\\;|\\;\\;n \\in \\mathbb{Z} \\right\\}\\]

\n

Greatest lower bound = [[0]] (Enter as a fraction or integer, not a decimal.)

\n

Least upper bound = [[1]] (Enter as a fraction or integer, not a decimal.)

\n

Does the glb lie in the set? [[2]]

\n

Does the lub lie in the set? [[3]]

\n

 

\n

 

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "-infinity", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": [0, "0.5"], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}, {"answer": "{d}/{c}", "vsetrange": [0, 1], "scripts": {}, "answersimplification": "std", "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Enter as a fraction or integer, not as a decimal.

", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": [0, "0.5"], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}], "type": "gapfill", "prompt": "

\\[S = \\left\\{ x \\in \\mathbb{R}\\;|\\;\\simplify[std]{{c}x^{2m+1} < {d}x^{2m}} \\right\\}\\]

\n

Greatest lower bound = [[0]]

\n

Does this lie in the set? [[1]]

\n

Least upper bound = [[2]]  (Enter as a fraction or integer, not a decimal.)

\n

Does this lie in the set? [[3]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{glb3}", "vsetrange": [0, 1], "scripts": {}, "answersimplification": "std", "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Enter as a fraction or integer, not as a decimal.

", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

{perhaps1}

", "

{perhaps2}

"], "showCorrectAnswer": true, "matrix": ["0.5", 0], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}, {"answer": "{lub3}", "vsetrange": [0, 1], "scripts": {}, "answersimplification": "std", "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "

Enter as a fraction or integer, not as a decimal.

", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "checkvariablenames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": "if(s1>0,[0.5,0],[0,0.5])", "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "maxMarks": 0, "type": "1_n_2", "minMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}], "type": "gapfill", "prompt": "

\\[S = \\left\\{\\simplify[std]{{a2}+{s1}*{b2}/n^{r}}\\;\\;|\\;\\;n \\in \\mathbb{N} \\right\\}\\]

\n

Greatest lower bound = [[0]] (Enter as a fraction or integer, not a decimal.)

\n

Does this lie in the set? [[1]]

\n

Least upper bound = [[2]] (Enter as a fraction or integer, not a decimal.)

\n

Does this lie in the set? [[3]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{ans4}", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": ["0.5", 0], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}, {"answer": "infinity", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": [0, "0.5"], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}], "type": "gapfill", "prompt": "

\\[S = \\left\\{\\simplify[std]{{a4}x+{b4}/x}\\;\\;|\\;\\;x \\in \\mathbb{R},\\;\\;x \\gt 0 \\right\\}\\]

\n

Greatest lower bound = [[0]]

\n

Does this lie in the set? [[1]]

\n

Least upper bound = [[2]] $\\;\\;\\;\\;$

\n

Does this lie in the set? [[3]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "-infinity", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": [0, "0.5"], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}, {"answer": "infinity", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": [0, "0.5"], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}], "type": "gapfill", "prompt": "

\\[S = \\left\\{\\simplify[std]{{a5}x^2+{b5}/x^3}\\;\\;|\\;\\;x \\in \\mathbb{R},\\;\\;x \\neq 0 \\right\\}\\]

\n

Greatest lower bound = [[0]]

\n

Does this lie in the set? [[1]]

\n

Least upper bound = [[2]] $\\;\\;\\;\\;$

\n

Does this lie in the set? [[3]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{glb6}", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": ["0.5", 0], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}, {"answer": "infinity", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "vsetrangepoints": 5}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": [0, "0.5"], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}], "type": "gapfill", "prompt": "

\\[S = \\left\\{\\simplify[std]{{a6}x^2+{b6}x+{c6}}\\;\\;|\\;\\;x \\in \\mathbb{R}\\right\\}\\]

\n

Greatest lower bound = [[0]] (enter as a fraction or integer, not a decimal)

\n

Does this lie in the set? [[1]]

\n

Least upper bound = [[2]] $\\;\\;\\;\\;$

\n

Does this lie in the set? [[3]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "{glb7-0.01}", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "maxValue": "{glb7+0.01}"}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": ["0.5", 0], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "{(a7-b7)/2}", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "maxValue": "{(a7-b7)/2}"}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": [0, "0.5"], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}], "type": "gapfill", "prompt": "

\\[S = \\left\\{\\sqrt{\\simplify[std]{n^2+{a7}n}}-\\sqrt{\\simplify[std]{n^2+{b7}n}}\\;\\;|\\;\\;n \\in \\mathbb{N}\\right\\}\\]

\n

Greatest lower bound = [[0]] (to 2 decimal places)

\n

Does this lie in the set? [[1]]

\n

Least upper bound = [[2]] (to one decimal place.)

\n

Does this lie in the set? [[3]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "{a8}", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "maxValue": "{a8}"}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": [0, "0.5"], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "{a8+b8}", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "maxValue": "{a8+b8}"}, {"displayType": "radiogroup", "choices": ["

Yes

", "

No

"], "showCorrectAnswer": true, "matrix": ["0.5", 0], "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "displayColumns": 2, "marks": 0}], "type": "gapfill", "prompt": "

\\[S = \\left\\{\\left(\\var{a8}^n+\\var{b8}^n\\right)^{1/n}\\;\\;|\\;\\;n \\in \\mathbb{N}\\right\\}\\]

\n

Greatest lower bound = [[0]] 

\n

Does this lie in the set? [[1]]

\n

Least upper bound = [[2]] 

\n

Does this lie in the set? [[3]]

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

For each of the following sets $S$ , state the least upper bound (lub) and the greatest lower bound (glb), where appropriate.

\n

Enter the lub as infinity i.e. type in the word infinity, if the set is not bounded above.

\n

Enter the glb as -infinity i.e. type in the word -infinity, if the set is not bounded below.

\n

$\\mathbb{N}$ denotes the set of natural numbers, $\\mathbb{Z}$ the set of integers and $\\mathbb{R}$ the set of real numbers.

\n

Also state if the lub or glb belong to the set.

\n

There are $8$ parts to this question, so you may need to scroll down to answer all parts.

", "tags": ["bounded above", "bounded below", "bounded set", "bounds", "checked2015", "glb", "greatest lower bound", "least upper bound", "limit", "limits", "lower bound", "lub", "MAS1701", "MAs1701", "max value", "maximum value", "min value", "minimum value", "not bounded", "sets", "upper bound"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

23/11/2015:

\n

Adjusted marks available from 32 -> 16

\n

\n

4/07/2012:

\n

Added tags. Corrected tags.

\n

Corrected mistake in answer to first part (minus sign missing).

\n

5/07/2012:

\n

There is an issue with the MCQs - this has been reported on Github.

\n

Also an issue with recognising infinity as an answer - also reported on Github.

\n

Changed to Match Text Pattern, but Correct Answer not properly displayed for $\\pm \\infty$

\n

Also an issue with reordering gaps in a gapfill - wishlist item on Github

\n

Advice display tidied up.

\n

21/07/2012:

\n

Error in part c first MCQ. Corrected.

\n

Instructions about using fractions and integers included.

\n

Added description.

\n

Have used Matching Expressions question typefor identifying $\\pm \\infty$ as answers.

\n

27/7/2012:

\n

Added tags.

\n

Edited grammar in Advice section.

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Eight questions on finding least upper bounds and greatest lower bounds of various sets.

"}, "advice": "

a)
\\[\\begin{eqnarray*} \\simplify[std]{({a}n^2+{a1})/({b}n^2+{b1})}&=& \\simplify[std]{(({a} / {b}) * ({b} * n ^ 2 + {b1}) + {a1} -({a * b1} / {b})) / ({b} * n ^ 2 + {b1})}\\\\ &=& \\simplify[std]{{a} / {b} -({( -a1) * b + a * b1} / ({b} * ({b} * n ^ 2 + {b1})))}\\\\ \\end{eqnarray*} \\]
Note that 1) the values for positive and negative values of $n$ are the same and 2) as $n$ increases this expression increases.

\n

The greatest lower bound occurs when $n=0$ and the value is $\\displaystyle \\simplify[std]{{a1}/{b1}}$.

\n

As $n$ increases, the value of the expression approaches as close as we like to $\\displaystyle \\simplify[std]{{a}/{b}}$ , but is always less than $\\displaystyle \\simplify[std]{{a}/{b}}$.

\n

Hence the least upper bound is $\\simplify[std]{{a}/{b}}$.

\n

b)
\\[\\begin{eqnarray*} \\simplify[std]{{c} * x ^ {2 * m + 1}}&\\lt&\\simplify[std]{ {d} * x ^ {2 * m}} \\Leftrightarrow\\\\ \\simplify[std]{x ^ {2 * m} * ({c} * x -{d})} &\\lt& 0 \\Leftrightarrow\\\\ \\simplify[std]{{c}x-{d}} &\\lt& 0 \\textrm{ as }x^{\\var{2*m}} \\geq 0 \\end{eqnarray*} \\]

\n

Hence this set is the same as the set
\\[\\left \\{x \\in \\mathbb{R}\\;\\;:\\;\\;x \\lt \\simplify[std]{{d}/{c}}\\right\\}\\]
This set does not have a greatest lower bound so you enter -infinity.

\n

It does have a least upper bound and this is $\\simplify[std]{{d}/{c}}$

\n

c)
\\[S = \\left\\{\\simplify[std]{{a2}+{s1}*{b2}/n^{r}}\\;\\;:\\;\\;n \\in \\mathbb{N} \\right\\}\\]
Let $\\displaystyle a_n=\\simplify[std]{{a2}+{s1}*{b2}/n^{r}}$

\n

As $n$ increases we see that $a_n$ {mo}creases and converges to the limit $\\var{a2}$.

\n

Hence greatest lower bound = $\\var{glb3}$ and least upper bound = $\\var{lub3}$

\n

d)
\\[S = \\left\\{\\simplify[std]{{a4}x+{b4}/x}\\;\\;:\\;\\;x \\in \\mathbb{R},\\;\\;x \\gt 0 \\right\\}\\]

\n

It is clear that this set does not have a least upper bound, so we enter infinity for this value.

\n

However it does have a lower bound as we have $\\displaystyle \\var{a4}x+\\frac{\\var{b4}}{x} \\gt 0,\\;\\;\\forall x \\gt 0 $.

\n

To find the greatest lower bound we find the minimum value of $\\displaystyle g(x)=\\var{a4}x+\\frac{\\var{b4}}{x},\\;\\;x \\gt 0 $.

\n

Now $\\displaystyle g'(x)=\\var{a4}-\\frac{\\var{b4}}{x^2}$ and $g'(x)=0$ when $\\displaystyle x=\\sqrt{\\frac{\\var{b4}}{\\var{a4}}} = \\var{r5}$.

\n

(We take the positive square root as $x \\gt 0$).

\n

It is not hard to see that this gives a minimum value for $g(x)$ and $g(\\var{r5})=\\var{ans4}$.

\n

Hence the greatest lower bound is $\\var{ans4}$ as $g(x) \\geq \\var{ans4},\\;\\;\\forall x \\gt 0$.

\n

e)

\n

\\[S = \\left\\{\\simplify[std]{{a5}x^2+{b5}/x^3}\\;\\;:\\;\\;x \\in \\mathbb{R},\\;\\;x \\neq 0 \\right\\}\\]

\n

This set does not have an upper bound as $\\var{a5}x^2 \\longrightarrow \\infty\\textrm{ as }x\\longrightarrow \\infty$.

\n

Also it does not have a lower bound as if $x\\longrightarrow \\var{sg}$ through {something} values of $x$ then $ \\displaystyle\\simplify[std]{{b5}/x^3}\\longrightarrow -\\infty$.

\n

f)
\\[S = \\left\\{\\simplify[std]{{a6}x^2+{b6}x+{c6}}\\;\\;:\\;\\;x \\in \\mathbb{R}\\right\\}\\]

\n

Since this is a quadratic with positive coefficient of the $x^2$ term it has a minimum value at $\\displaystyle x=\\simplify[std]{{-b6}/{2*a6}}$.

\n

It follows that the minimum value and hence the glb is $\\var{glb6}$ on substituting into the quadratic.

\n

As it is a quadratic with positive coefficient of the $x^2$ term it tends to $\\infty$ as $x \\longrightarrow \\infty$ or $-\\infty$.

\n

g)
\\[S = \\left\\{\\sqrt{\\simplify[std]{n^2+{a7}n}}-\\sqrt{\\simplify[std]{n^2+{b7}n}}\\;\\;:\\;\\;n \\in \\mathbb{N}\\right\\}\\]

\n

We have:
\\[\\begin{eqnarray*} \\sqrt{\\simplify[std]{n^2+{a7}n}}-\\sqrt{\\simplify[std]{n^2+{b7}n}}&=&\\simplify[std]{({a7 -b7} * n) / (sqrt(n ^ 2 + {a7} * n) + sqrt(n ^ 2 + {b7} * n))}\\\\ &=&\\simplify[std]{{a7 -b7} / (sqrt(1 + {a7} / n) + sqrt(1 + {b7} / n))}\\\\ &\\lt&\\simplify[std]{{a7 -b7} / 2} \\end{eqnarray*} \\]
From the above, we see that $\\sqrt{\\simplify[std]{n^2+{a7}n}}-\\sqrt{\\simplify[std]{n^2+{b7}n}}$ is increasing as $n$ increases, hence the minimum value is at $n=1$ and this is the glb.

\n

Hence glb = $\\sqrt{\\simplify[std]{1+{a7}}}-\\sqrt{\\simplify[std]{1+{b7}}}=\\var{glb7}$ to 2 decimal places.

\n

Now as $n$ increases the terms approach $\\displaystyle \\simplify[std]{{a7 -b7} / 2}$, but never equal this value, hence the lub is $\\displaystyle \\simplify[std]{{a7 -b7} / 2}$.

\n

h)
Since $\\var{a8}$ and $\\var{b8}$ are positive it is true that $(\\var{a8}+\\var{b8})^n \\geq \\var{a8}^n+\\var{b8}^n$.

\n

(Use the binomial expansion to show this.)

\n

Hence on taking the nth roots of both sides we have $\\var{a8}+\\var{b8}=\\var{a8+b8} \\geq ( \\var{a8}^n+\\var{b8}^n)^{1/n}$.

\n

So we see that $\\var{a8+b8}$ is an upper bound for the set and it is the lub as we get this value for $n=1$.

\n

Now $\\displaystyle \\lim_{n \\to \\infty}\\left(\\var{a8}^n+\\var{b8}^n\\right)^{1/n}=\\var{a8}$ and as $\\var{a8} \\lt \\left(\\var{a8}^n+\\var{b8}^n\\right)^{1/n},\\;\\;\\forall n$ we see that $\\var{a8}$ is the glb, but does not belong to the set.

"}, {"name": "Set builder notation", "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/"}], "variablesTest": {"condition": "gcd(a2,b2)=1 and gcd(a3,b3)<>1", "maxRuns": "200"}, "variables": {"a1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..6 except a)", "name": "a1", "description": ""}, "ans2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "ans1 and set(1..b)", "name": "ans2", "description": ""}, "ans3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(ceil((c1-b1)/a1)..floor((c1+b1)/a1))", "name": "ans3", "description": ""}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..6)", "name": "a", "description": ""}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(3..8)", "name": "c", "description": ""}, "b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(6..10 except b)", "name": "b1", "description": ""}, "ans1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(a*ceil((c-b)/a)-c..a*floor((c+b)/a)-c#a)", "name": "ans1", "description": ""}, "b2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..12)", "name": "b2", "description": ""}, "b3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..12)", "name": "b3", "description": ""}, "ans4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "ans3 and set(1..floor((c1+b1)/a1))", "name": "ans4", "description": ""}, "c2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(4..10)", "name": "c2", "description": ""}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(3..6 except c)", "name": "c1", "description": ""}, "a3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..15)", "name": "a3", "description": ""}, "c3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(6..10)", "name": "c3", "description": ""}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..10)", "name": "b", "description": ""}, "g": {"group": "Ungrouped variables", "templateType": "anything", "definition": "gcd(a3,b3)", "name": "g", "description": ""}, "a2": {"group": "Ungrouped variables", "templateType": "anything", "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}], "functions": {}, "variable_groups": [], "showQuestionGroupNames": false, "parts": [{"prompt": "

$S_1=\\{y\\;|\\;y \\in \\mathbb{Z}, y=\\var{a}x-\\var{c},\\;x \\in \\mathbb{Z}\\text{ and } |y| \\leq \\var{b}\\}$

\n

$S_1 = \\;$[[0]]

", "scripts": {}, "gaps": [{"answer": "{ans1}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"prompt": "

$S_2=\\{y\\;|\\;y \\in \\mathbb{N}, y=\\var{a}x-\\var{c},\\;x \\in \\mathbb{Z}\\text{ and } |y| \\leq \\var{b}\\}$

\n

$S_2 = \\;$[[0]]

", "scripts": {}, "gaps": [{"answer": "{ans2}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"prompt": "

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

\n

$S_3=\\;$[[0]]

", "scripts": {}, "gaps": [{"answer": "{ans3}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"prompt": "

$S_4=\\{x\\;|\\; x \\in \\mathbb{N}\\text{ and }\\;|\\;\\var{a1}x-\\var{c1}\\;|\\; \\leq \\var{b1}\\}$.

\n

$S_4=\\;$[[0]]

", "scripts": {}, "gaps": [{"answer": "{ans4}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "statement": "

Enumerate each of the following sets.

\n

Note that you input sets in the form set(a,b,c,d) .

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

\n

Notation set(a..b) and set(a,b,c) cannot be mixed. For example set(a..b,c) will not be processed as expected.

", "tags": [], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Enumerate the elements in some sets defined using set builder notation.

"}, "advice": "

a)

\n

We can construct this set by reading the conditions, from left to right.

\n

First of all, every elemnt of $S_1$ is in $\\mathbb{Z}$, the set of integers. This is the set $\\{\\dots,-3,-2,1,0,1,2,3,\\dots\\}$.

\n

Next, it must be possible to write $y$ in the form $\\simplify[]{{a}x-{c}}$, where $x$ is an integer. This is the set $\\{\\dots,\\var{-2*a-c},\\var{-1*a-c},\\var{-c},\\var{a-c},\\var{2*a-c},\\var{3*a-c},\\dots\\}$.

\n

Finally, the set only includes the numbers listed above which lie between $-\\var{b}$ and $+\\var{b}$, i.e. $\\var{ans1}$.

\n

b)

\n

This set is the same as the one above, except $y$ is drawn from $\\mathbb{N}$, the natural numbers. That means that only values greater than or equal to $1$ are included.

\n

c)

\n

$x$ is drawn from the set of integers $\\mathbb{Z} = \\{\\dots,-2,-1,0,1,2,\\dots\\}$.

\n

If $\\left\\lvert \\simplify[]{{a1}x-{c1}} \\right\\rvert \\leq \\var{b1}$, then

\n

\\begin{align}
\\var{a1}x &\\geq \\var{-b1} + \\var{c1} = \\var{-b1+c1} \\\\
&\\text{and} \\\\
\\var{a1}x &\\leq \\var{b1}+\\var{c1} = \\var{b1+c1}
\\end{align}

\n

Equivalently,

\n

\\begin{align}
x &\\geq \\simplify{{-b1+c1}/{a1}} \\\\
&\\text{and} \\\\
x &\\leq \\simplify{{b1+c1}/{a1}}
\\end{align}

\n

\n

So $S_3 = \\var{ans3}$.

\n

d)

\n

This set is the same as the one above, except $x$ is drawn from the set of natural numbers $\\mathbb{N} = \\{1,2,3,\\dots\\}$, so only values greater than or equal to $1$ are included.

"}, {"name": "set5 - Cartesian Products", "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/"}], "variable_groups": [{"variables": ["a", "b"], "name": "Random numbers"}, {"variables": ["list1", "list2", "list4", "list5", "list9", "list10", "list_extra"], "name": "Lists"}], "variables": {"set10": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(list10)", "name": "set10", "description": ""}, "b": {"group": "Random numbers", "templateType": "anything", "definition": "5-a", "name": "b", "description": ""}, "set3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(product(list1,list2))", "name": "set3", "description": ""}, "set11": {"group": "Ungrouped variables", "templateType": "anything", "definition": "union(set1-set4,set4-set1)", "name": "set11", "description": ""}, "list10": {"group": "Lists", "templateType": "anything", "definition": "map(list9[x][0]+list9[x][1],x,0..len(list9)-1)", "name": "list10", "description": ""}, "set6": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(product(list(set8),list(set7)))", "name": "set6", "description": ""}, "set8": {"group": "Ungrouped variables", "templateType": "anything", "definition": "intersection(set2,set5)", "name": "set8", "description": ""}, "set15": {"group": "Ungrouped variables", "templateType": "anything", "definition": "intersection(set(product(list1,list5)),set(product(list4,list2)))", "name": "set15", "description": ""}, "set2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(list2)", "name": "set2", "description": ""}, "set5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(list5)", "name": "set5", "description": ""}, "list9": {"group": "Lists", "templateType": "anything", "definition": "product(product(list(set7),list(set7)),list(intersection(set4,set5)))", "name": "list9", "description": ""}, "list4": {"group": "Lists", "templateType": "anything", "definition": "shuffle(list1)[0..a-1]+list_extra", "name": "list4", "description": ""}, "set4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(list4)", "name": "set4", "description": ""}, "set7": {"group": "Ungrouped variables", "templateType": "anything", "definition": "intersection(set1,set4)", "name": "set7", "description": ""}, "list1": {"group": "Lists", "templateType": "anything", "definition": "shuffle(list(1..20))[0..a]", "name": "list1", "description": ""}, "list2": {"group": "Lists", "templateType": "anything", "definition": "shuffle(list(25..100#5))[0..b]", "name": "list2", "description": ""}, "a": {"group": "Random numbers", "templateType": "anything", "definition": "random(2..3)", "name": "a", "description": ""}, "list_extra": {"group": "Lists", "templateType": "anything", "definition": "[random(21..24)]", "name": "list_extra", "description": ""}, "list5": {"group": "Lists", "templateType": "anything", "definition": "shuffle(list2)[0..b-1]+list_extra", "name": "list5", "description": ""}, "set1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(list1)", "name": "set1", "description": ""}, "set16": {"group": "Ungrouped variables", "templateType": "anything", "definition": "union(set(product(list(intersection(set4,set5)),list(set4-set5))),set(product(list(set5-set4),list(intersection(set4,set5)))))", "name": "set16", "description": ""}, "set12": {"group": "Ungrouped variables", "templateType": "anything", "definition": "union(set2-set5,set5-set2)", "name": "set12", "description": ""}, "set14": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(product(list(set11),list(set12)))", "name": "set14", "description": ""}}, "ungrouped_variables": ["set1", "set2", "set3", "set4", "set5", "set6", "set7", "set8", "set10", "set11", "set12", "set14", "set15", "set16"], "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;i$A \\times B=\\;$[[0]]

", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"answer": "{set3}", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "marks": 1, "scripts": {}, "vsetRangePoints": 5, "type": "jme", "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "sortAnswers": false}, {"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "

$(B\\cap D)\\times (A\\cap C)=\\;$[[0]]

", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"answer": "{set6}", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "marks": 1, "scripts": {}, "vsetRangePoints": 5, "type": "jme", "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "sortAnswers": false}, {"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "

$(A\\cap C)\\times (A\\cap C)\\times (C\\cap D)=\\;$[[0]]

", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"answer": "{set10}", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "marks": 1, "scripts": {}, "vsetRangePoints": 5, "type": "jme", "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "sortAnswers": false}, {"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "

$[(A - C)\\cup (C-A)]\\times [(B-D)\\cup(D-B)]=\\;$[[0]]

", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"answer": "{set14}", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "marks": 1, "scripts": {}, "vsetRangePoints": 5, "type": "jme", "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "sortAnswers": false}, {"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "

$(A\\times D)\\cap (C\\times B)=\\;$[[0]]

", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"answer": "{set15}", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "marks": 1, "scripts": {}, "vsetRangePoints": 5, "type": "jme", "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "sortAnswers": false}, {"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "

$[(C\\cap D)\\times (C-D)]\\cup [(D-C)\\times (C\\cap D)]=\\;$[[0]]

", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"answer": "{set16}", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "marks": 1, "scripts": {}, "vsetRangePoints": 5, "type": "jme", "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "sortAnswers": false}], "statement": "

Let $A=\\var{set1}$,  let  $B=\\var{set2}$, let  $C=\\var{set4}$ and let $D=\\var{set5}$.

\n

List the elements of the following sets.

\n

Input sets in the form set(a,b,c,d) .

\n

For example set(1,2,3) gives the set $\\{1,2,3\\}$.

\n

Element $(a,b)$ of a Cartesian product is entered, and represented, as $[a,b]$.

\n

For example set([1,1],[1,2],[2,3])gives the set $\\{[1,1], [1,2], [2,3]\\}$.

\n

The empty set is input as set().

", "tags": [], "rulesets": {}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

a)

\n

$A \\times B$ is the set of all pairs $(a,b)$, where $a \\in A$ and $b \\in B$.

\n

b)

\n

$B \\cap D$ is the set of all elements present in both $B$ and $D$, i.e. $\\var{set2 and set5}$.

\n

$A \\cap C$ is the set of all elements present in both $A$ and $C$, i.e. $\\var{set1 and set4}$.

\n

$(B\\cap D)\\times (A\\cap C)$ is the set of pairs of all pairs $(x,y)$, where $x \\in B \\cap D$ and $y \\in A \\cap C$.

\n

c)

\n

$(A\\cap C)\\times (A\\cap C)\\times (C\\cap D)$ is the set of all triples $(x,y,z)$, where $x \\in A \\cap C$, $y \\in A \\cap C$ and $z \\in C \\cap D$. Note that $x$ and $y$ do not have to be different.

\n

d)

\n

$A-C$ is the set of all elements present in $A$ but not in $C$, i.e. $\\var{set1-set4}$.

\n

$C-A$ is the set of all elements present in $C$ but not in $A$, i.e. $\\var{set4-set1}$.

\n

$(A-C) \\cup (C-A)$ is the set of all elements which are either in $A-C$, or in  $C-A$, so $(A-C) \\cup (C-A) = \\var{(set1-set4) or (set4-set1)}$.

\n

e)

\n

$(A \\times D)$ is the set of all pairs of elements $(a,d)$, with $a \\in A$ and $d \\in D$, i.e. $\\var{set(product(list(set1),list(set5)))}$.

\n

$C \\times B)$ is the set of all pairs of elements $(c,b)$, with $c \\in C$ and $b \\in B$, i.e. $\\var{set(product(list(set4),list(set2)))}$.

\n

$(A \\times D) \\cap (C \\times B)$ is the set of all pairs present in both of the previous sets.

\n

f)

\n

$C \\cap D$ is the set of all elements in both $C$ and in $D$, so $C \\cap D = \\var{set4 and set5}$.

\n

$C - D$ is the set of all elements in $C$ and not in $D$, so $C-D = \\var{set4 - set5}$.

\n

$(C \\cap D) \\times (C - D)$ is the set of all pairs of elements $(x,y)$, where $x$ is in $C \\cap D$ and $y$ is in $C - D$, so $C \\cap D) \\times (C-D) = \\var{set(product(list(set4 and set5),list(set4 - set5)))}$.

\n

Similarly, $(D - C) \\times (C \\cap D) = \\var{set(product(list(set5-set4),list(set4 and set5)))}$.

\n

Finally, $[(C \\cap D) \\times (C - D)] \\cup [(D - C) \\times (C \\cap D)]$ is the set of all pairs present in either of the above sets, i.e. $\\var{set16}$.

"}, {"name": "set6 - Cartesian Products and Complements", "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": {"set1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "union(set(list1),int)", "description": "", "name": "set1"}, "set6_2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(product(list(univ),list(intersection(set1,set2))))", "description": "", "name": "set6_2"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "5-a", "description": "", "name": "b"}, "set4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "intersection(set4_1,set4_2)", "description": "", "name": "set4"}, "set6_1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "univ_2-set(product(list(union(set1,set2)),list(univ)))", "description": "", "name": "set6_1"}, "list1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "shuffle(list(1..20))[0..a]", "description": "", "name": "list1"}, "set3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(product(list(intersection(univ-set1,univ-set2)),list(intersection(set1,set2))))", "description": "", "name": "set3"}, "list2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "shuffle(list(30..105#5))[0..b]", "description": "", "name": "list2"}, "set5_2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "univ-union(set1,set2)", "description": "", "name": "set5_2"}, "set4_2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "intersection(univ_2-set(product(list(univ),list(set1))),univ_2-set(product(list(set2),list(univ))))", "description": "", "name": "set4_2"}, "ext": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(shuffle(31..106#5)[0..2])", "description": "", "name": "ext"}, "set5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(product(list(set5_1),list(set5_2)))", "description": "", "name": "set5"}, "univ": {"templateType": "anything", "group": "Ungrouped variables", "definition": "union(union(set1,set2),ext)", "description": "", "name": "univ"}, "set6": {"templateType": "anything", "group": "Ungrouped variables", "definition": "intersection(set6_1,set6_2)", "description": "", "name": "set6"}, "set7": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(product(list((univ-set1)-set2),list((univ-set2)-set1)))", "description": "", "name": "set7"}, "set5_1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set1-set2", "description": "", "name": "set5_1"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "name": "a"}, "univ_2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(product(list(univ),list(univ)))", "description": "", "name": "univ_2"}, "set4_1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "intersection(univ_2-set(product(list(univ),list(set2))),univ_2-set(product(list(set1),list(univ))))", "description": "", "name": "set4_1"}, "set2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "union(set(list2),int)", "description": "", "name": "set2"}, "int": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(shuffle(21..29)[0..2])", "description": "", "name": "int"}}, "ungrouped_variables": ["a", "b", "ext", "int", "list1", "list2", "set1", "set2", "set3", "set4", "set4_1", "set4_2", "set5", "set5_1", "set5_2", "set6", "set6_1", "set6_2", "set7", "univ", "univ_2"], "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;i$(A^c\\cap B^c) \\times (A\\cap B)=\\;$[[0]]

", "scripts": {}, "gaps": [{"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}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"prompt": "

$(U\\times A)^c\\cap (U\\times B)^c\\cap (A\\times U)^c\\cap (B\\times U)^c=\\;$[[0]]

", "scripts": {}, "gaps": [{"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}, {"prompt": "

$(A-B)\\times (A\\cup B)^c=\\;$[[0]]

", "scripts": {}, "gaps": [{"answer": "{set5}", "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}, {"prompt": "

$[ (A \\cup B)\\times U]^c \\cap [ U \\times (A \\cap B) ]=\\;$[[0]]

", "scripts": {}, "gaps": [{"answer": "{set6}", "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}, {"prompt": "

$(A^c - B)\\times (B^c-A)=\\;$[[0]]

", "scripts": {}, "gaps": [{"answer": "{set7}", "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}], "statement": "

In this question the universal set is $U=\\var{univ}$.

\n

Let $A=\\var{set1}$ and let  $B=\\var{set2}$.

\n

For subsets $A$ and $B$ of $U$, the universal set for the Cartesian product $A\\times B$ is $U\\times U$.

\n

List the elements of the following sets. 

\n

Note that you input sets in the form set(a,b,c,d) .

\n

For example set(1,2,3)gives the set $\\{1,2,3\\}$.

\n

Element $(a,b)$ of a Cartesian product is entered, and represented as $[a,b]$.

\n

For example set([1,1],[1,2],[2,3])gives the set $\\{[1,1], [1,2], [2,3]\\}$.

\n

The empty set is input as set().

", "tags": [], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

a)

\n

$A^c$ is the set of $U-A$ of all elements in $U$ and not in $A$, so $A^c = \\var{univ - set1}$.

\n

$B^c$ is the set of $U-A$ of all elements in $U$ and not in $B$, so $B^c = \\var{univ - set1}$.

\n

$A^c \\cap B^c$ is the set of all elements present in both $A^c$ and $B^c$. This is equivalent to the set of all elements in neither $A$ nor $B$, i.e. $\\var{(univ-set1) and (univ-set2)}$.

\n

$A \\cap B$ is the set of all elements present in both $A$ and $B$, i.e $\\var{set1 and set2}$.

\n

So $(A^c \\cap B^c) \\times (A \\cap B)$ is the set of all pairs $(x,y)$, where $x$ is in $A^c \\cap B^c$, and $y$ is in $A \\cap B$.

\n

b)

\n

$(U \\times A)^c$ is the set of all pairs $(x,y)$ in $U \\times U$ which are not in $U \\times A$. Since $U$ is the universal set, this is equivalent to $U \\times (A^c)$, the product of $U$ with the set of elements not in $A$.

\n

Similarly, $(U \\times B)^c$ is equivalent to $U \\times (B^c)$.

\n

Again because $U$ is the universal set, $(U \\times A)^c \\cap (U \\times B)^c = U \\times (A^c \\cap B^c)$.

\n

By a similar argument, $(A \\times U)^c \\cap (B \\times U)^c = (A^c \\cap B^c) \\times U$.

\n

So $(U\\times A)^c\\cap (U\\times B)^c\\cap (A\\times U)^c\\cap (B\\times U)^c$ is equivalent to $(A^c \\cap B^c) \\times (A^c \\cap B^c)$. That is, the set of all pairs of two elements that are in neither $A$ nor $B$.

\n

c)

\n

$A-B$ is the set of elements which are in $A$ but not $B$, i.e. $\\var{set1-set2}$.

\n

$(A \\cup B)^c$ is the set of elements $U - (A \\cup B)$ which are in $U$ and not in $A \\cup B$, so $(A \\cup B)^c = \\var{univ-(set1 or set2)}$.

\n

d)

\n

$[(A \\cup B) \\times U]^c$ is equivalent to $(A \\cup B)^c \\times U$.

\n

So $[(A \\cup B) \\times U]^c \\cap [U \\times (A \\cap B)] = (A \\cup B)^c \\times (A \\cap B)$.

\n

e)

\n

$A^c-B$ is the set of all elements which are in $A^c$ but not $B$. That's equivalent to the set of elements which are in neither $A$ nor $B$, i.e. $(A \\cup B)^c = \\var{univ-(set1 or set2)}$.

\n

Similarly, $B^c - A = (B \\cup A)^c = (A \\cup B)^c = \\var{univ-(set1 or set2)}$.

"}], "name": "", "pickQuestions": 0}], "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Some more questions on set theory - covering set builder notation, cartesian products, complements.

"}, "type": "exam", "navigation": {"onleave": {"action": "none", "message": "You haven't submitted all your answers on this page."}, "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": []}