// 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}\\}$.
\nLet:
\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}\\}$.
\nEnumerate the following sets.
\nNote that you input sets in the form set(a,b,c,d)
.
For example set(1,2,3)
gives the set $\\{1,2,3\\}$.
The empty set is input as set()
.
Also some labour saving tips:
\nIf 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)
.
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).
Notation set(a..b)
and set(a,b,c)
cannot be mixed. For example set(a..b,c)
will not be processed as expected.
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\\}\\]
\nGreatest lower bound = [[0]] (Enter as a fraction or integer, not a decimal.)
\nLeast upper bound = [[1]] (Enter as a fraction or integer, not a decimal.)
\nDoes the glb lie in the set? [[2]]
\nDoes 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\\}\\]
\nGreatest lower bound = [[0]]
\nDoes this lie in the set? [[1]]
\nLeast upper bound = [[2]] (Enter as a fraction or integer, not a decimal.)
\nDoes 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\\}\\]
\nGreatest lower bound = [[0]] (Enter as a fraction or integer, not a decimal.)
\nDoes this lie in the set? [[1]]
\nLeast upper bound = [[2]] (Enter as a fraction or integer, not a decimal.)
\nDoes 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\\}\\]
\nGreatest lower bound = [[0]]
\nDoes this lie in the set? [[1]]
\nLeast upper bound = [[2]] $\\;\\;\\;\\;$
\nDoes 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\\}\\]
\nGreatest lower bound = [[0]]
\nDoes this lie in the set? [[1]]
\nLeast upper bound = [[2]] $\\;\\;\\;\\;$
\nDoes 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\\}\\]
\nGreatest lower bound = [[0]] (enter as a fraction or integer, not a decimal)
\nDoes this lie in the set? [[1]]
\nLeast upper bound = [[2]] $\\;\\;\\;\\;$
\nDoes 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\\}\\]
\nGreatest lower bound = [[0]] (to 2 decimal places)
\nDoes this lie in the set? [[1]]
\nLeast upper bound = [[2]] (to one decimal place.)
\nDoes 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\\}\\]
\nGreatest lower bound = [[0]]
\nDoes this lie in the set? [[1]]
\nLeast upper bound = [[2]]
\nDoes 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.
\nEnter the lub as infinity i.e. type in the word infinity, if the set is not bounded above.
\nEnter 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.
\nAlso state if the lub or glb belong to the set.
\nThere 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:
\nAdjusted marks available from 32 -> 16
\n\n
4/07/2012:
\nAdded tags. Corrected tags.
\nCorrected mistake in answer to first part (minus sign missing).
\n5/07/2012:
\nThere is an issue with the MCQs - this has been reported on Github.
\nAlso an issue with recognising infinity as an answer - also reported on Github.
\nChanged to Match Text Pattern, but Correct Answer not properly displayed for $\\pm \\infty$
\nAlso an issue with reordering gaps in a gapfill - wishlist item on Github
\nAdvice display tidied up.
\n21/07/2012:
\nError in part c first MCQ. Corrected.
\nInstructions about using fractions and integers included.
\nAdded description.
\nHave used Matching Expressions question typefor identifying $\\pm \\infty$ as answers.
\n27/7/2012:
\nAdded tags.
\nEdited 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.
The greatest lower bound occurs when $n=0$ and the value is $\\displaystyle \\simplify[std]{{a1}/{b1}}$.
\nAs $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}}$.
\nHence the least upper bound is $\\simplify[std]{{a}/{b}}$.
\nb)
\\[\\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*} \\]
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.
It does have a least upper bound and this is $\\simplify[std]{{d}/{c}}$
\nc)
\\[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}}$
As $n$ increases we see that $a_n$ {mo}creases and converges to the limit $\\var{a2}$.
\nHence greatest lower bound = $\\var{glb3}$ and least upper bound = $\\var{lub3}$
\nd)
\\[S = \\left\\{\\simplify[std]{{a4}x+{b4}/x}\\;\\;:\\;\\;x \\in \\mathbb{R},\\;\\;x \\gt 0 \\right\\}\\]
It is clear that this set does not have a least upper bound, so we enter infinity for this value.
\nHowever it does have a lower bound as we have $\\displaystyle \\var{a4}x+\\frac{\\var{b4}}{x} \\gt 0,\\;\\;\\forall x \\gt 0 $.
\nTo find the greatest lower bound we find the minimum value of $\\displaystyle g(x)=\\var{a4}x+\\frac{\\var{b4}}{x},\\;\\;x \\gt 0 $.
\nNow $\\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$).
\nIt is not hard to see that this gives a minimum value for $g(x)$ and $g(\\var{r5})=\\var{ans4}$.
\nHence the greatest lower bound is $\\var{ans4}$ as $g(x) \\geq \\var{ans4},\\;\\;\\forall x \\gt 0$.
\ne)
\n\\[S = \\left\\{\\simplify[std]{{a5}x^2+{b5}/x^3}\\;\\;:\\;\\;x \\in \\mathbb{R},\\;\\;x \\neq 0 \\right\\}\\]
\nThis set does not have an upper bound as $\\var{a5}x^2 \\longrightarrow \\infty\\textrm{ as }x\\longrightarrow \\infty$.
\nAlso 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$.
\nf)
\\[S = \\left\\{\\simplify[std]{{a6}x^2+{b6}x+{c6}}\\;\\;:\\;\\;x \\in \\mathbb{R}\\right\\}\\]
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}}$.
\nIt follows that the minimum value and hence the glb is $\\var{glb6}$ on substituting into the quadratic.
\nAs it is a quadratic with positive coefficient of the $x^2$ term it tends to $\\infty$ as $x \\longrightarrow \\infty$ or $-\\infty$.
\ng)
\\[S = \\left\\{\\sqrt{\\simplify[std]{n^2+{a7}n}}-\\sqrt{\\simplify[std]{n^2+{b7}n}}\\;\\;:\\;\\;n \\in \\mathbb{N}\\right\\}\\]
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.
Hence glb = $\\sqrt{\\simplify[std]{1+{a7}}}-\\sqrt{\\simplify[std]{1+{b7}}}=\\var{glb7}$ to 2 decimal places.
\nNow 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}$.
\nh)
Since $\\var{a8}$ and $\\var{b8}$ are positive it is true that $(\\var{a8}+\\var{b8})^n \\geq \\var{a8}^n+\\var{b8}^n$.
(Use the binomial expansion to show this.)
\nHence 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}$.
\nSo 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$.
\nNow $\\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.
\nNote that you input sets in the form set(a,b,c,d)
.
For example set(1,2,3)
gives the set $\\{1,2,3\\}$.
The empty set is input as set()
.
Also some labour saving tips:
\nIf 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)
.
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).
Notation set(a..b)
and set(a,b,c)
cannot be mixed. For example set(a..b,c)
will not be processed as expected.
Enumerate the elements in some sets defined using set builder notation.
"}, "advice": "We can construct this set by reading the conditions, from left to right.
\nFirst 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\\}$.
\nNext, 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\\}$.
\nFinally, the set only includes the numbers listed above which lie between $-\\var{b}$ and $+\\var{b}$, i.e. $\\var{ans1}$.
\nThis 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$x$ is drawn from the set of integers $\\mathbb{Z} = \\{\\dots,-2,-1,0,1,2,\\dots\\}$.
\nIf $\\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}
Equivalently,
\n\\begin{align}
x &\\geq \\simplify{{-b1+c1}/{a1}} \\\\
&\\text{and} \\\\
x &\\leq \\simplify{{b1+c1}/{a1}}
\\end{align}
So $S_3 = \\var{ans3}$.
\nThis 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}$.
\nList the elements of the following sets.
\nInput sets in the form set(a,b,c,d)
.
For example set(1,2,3)
gives the set $\\{1,2,3\\}$.
Element $(a,b)$ of a Cartesian product is entered, and represented, as $[a,b]$.
\nFor example set([1,1],[1,2],[2,3])
gives the set $\\{[1,1], [1,2], [2,3]\\}$.
The empty set is input as set()
.
$A \\times B$ is the set of all pairs $(a,b)$, where $a \\in A$ and $b \\in 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$(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$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$(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$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)))}$.
\nSimilarly, $(D - C) \\times (C \\cap D) = \\var{set(product(list(set5-set4),list(set4 and set5)))}$.
\nFinally, $[(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}$.
\nLet $A=\\var{set1}$ and let $B=\\var{set2}$.
\nFor subsets $A$ and $B$ of $U$, the universal set for the Cartesian product $A\\times B$ is $U\\times U$.
\nList the elements of the following sets.
\nNote that you input sets in the form set(a,b,c,d)
.
For example set(1,2,3)
gives the set $\\{1,2,3\\}$.
Element $(a,b)$ of a Cartesian product is entered, and represented as $[a,b]$.
\nFor example set([1,1],[1,2],[2,3])
gives the set $\\{[1,1], [1,2], [2,3]\\}$.
The empty set is input as set()
.
$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}$.
\nSo $(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$(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$.
\nSimilarly, $(U \\times B)^c$ is equivalent to $U \\times (B^c)$.
\nAgain because $U$ is the universal set, $(U \\times A)^c \\cap (U \\times B)^c = U \\times (A^c \\cap B^c)$.
\nBy a similar argument, $(A \\times U)^c \\cap (B \\times U)^c = (A^c \\cap B^c) \\times U$.
\nSo $(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$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$[(A \\cup B) \\times U]^c$ is equivalent to $(A \\cup B)^c \\times U$.
\nSo $[(A \\cup B) \\times U]^c \\cap [U \\times (A \\cap B)] = (A \\cup B)^c \\times (A \\cap B)$.
\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)}$.
\nSimilarly, $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": []}