// Numbas version: exam_results_page_options {"name": "Lois's copy of set6 - Cartesian Products and Complements", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Lois's copy of set6 - Cartesian Products and Complements", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

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

\n

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

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

", "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)}$.

", "rulesets": {}, "extensions": [], "variables": {"ext": {"name": "ext", "group": "Ungrouped variables", "definition": "set(shuffle(31..106#5)[0..2])", "description": "", "templateType": "anything"}, "set7": {"name": "set7", "group": "Ungrouped variables", "definition": "set(product(list((univ-set1)-set2),list((univ-set2)-set1)))", "description": "", "templateType": "anything"}, "set6_1": {"name": "set6_1", "group": "Ungrouped variables", "definition": "univ_2-set(product(list(union(set1,set2)),list(univ)))", "description": "", "templateType": "anything"}, "set4": {"name": "set4", "group": "Ungrouped variables", "definition": "intersection(set4_1,set4_2)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything"}, "set4_2": {"name": "set4_2", "group": "Ungrouped variables", "definition": "intersection(univ_2-set(product(list(univ),list(set1))),univ_2-set(product(list(set2),list(univ))))", "description": "", "templateType": "anything"}, "set5": {"name": "set5", "group": "Ungrouped variables", "definition": "set(product(list(set5_1),list(set5_2)))", "description": "", "templateType": "anything"}, "set6": {"name": "set6", "group": "Ungrouped variables", "definition": "intersection(set6_1,set6_2)", "description": "", "templateType": "anything"}, "set3": {"name": "set3", "group": "Ungrouped variables", "definition": "set(product(list(intersection(univ-set1,univ-set2)),list(intersection(set1,set2))))", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "5-a", "description": "", "templateType": "anything"}, "set4_1": {"name": "set4_1", "group": "Ungrouped variables", "definition": "intersection(univ_2-set(product(list(univ),list(set2))),univ_2-set(product(list(set1),list(univ))))", "description": "", "templateType": "anything"}, "int": {"name": "int", "group": "Ungrouped variables", "definition": "set(shuffle(21..29)[0..2])", "description": "", "templateType": "anything"}, "list2": {"name": "list2", "group": "Ungrouped variables", "definition": "shuffle(list(30..105#5))[0..b]", "description": "", "templateType": "anything"}, "set5_1": {"name": "set5_1", "group": "Ungrouped variables", "definition": "set1-set2", "description": "", "templateType": "anything"}, "set5_2": {"name": "set5_2", "group": "Ungrouped variables", "definition": "univ-union(set1,set2)", "description": "", "templateType": "anything"}, "univ": {"name": "univ", "group": "Ungrouped variables", "definition": "union(union(set1,set2),ext)", "description": "", "templateType": "anything"}, "set6_2": {"name": "set6_2", "group": "Ungrouped variables", "definition": "set(product(list(univ),list(intersection(set1,set2))))", "description": "", "templateType": "anything"}, "list1": {"name": "list1", "group": "Ungrouped variables", "definition": "shuffle(list(1..20))[0..a]", "description": "", "templateType": "anything"}, "set2": {"name": "set2", "group": "Ungrouped variables", "definition": "union(set(list2),int)", "description": "", "templateType": "anything"}, "set1": {"name": "set1", "group": "Ungrouped variables", "definition": "union(set(list1),int)", "description": "", "templateType": "anything"}, "univ_2": {"name": "univ_2", "group": "Ungrouped variables", "definition": "set(product(list(univ),list(univ)))", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "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"], "variable_groups": [], "functions": {"mod_set": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"]], "type": "list", "language": "javascript", "definition": "//returns all integers which are divisible by c betweeen a and b\nvar l=[];\nfor(var i=a;i$(A^{\\prime}\\cap B^{\\prime}) \\times (A\\cap B)=\\;$[[0]]

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

$(A-B)\\times (A\\cup B)^{\\prime}=\\;$[[0]]

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

$(A^{\\prime} - B)\\times (B^{\\prime}-A)=\\;$[[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{set7}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}], "sortAnswers": false}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}]}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}