// Numbas version: exam_results_page_options {"name": "Enumerar los elementos de un producto cartesiano ...", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Enumerar los elementos de un producto cartesiano ...", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Considere los siguientes conjuntos : $A=\\var{set1}$,  $B=\\var{set2}$,  $C=\\var{set4}$ y $D=\\var{set5}$.

\n

Listar los elementos de los siguientes conjuntos.

\n

\n

Indicaciones.  Ingrese los conjuntos en la forma set(a,b,c,d),  por ejemplo, si ingresa set(1,2,3)  se observa el conjunto $\\{1,2,3\\}$

\n

Un par ordenado $(a,b)$ del producto cartesiano, es representado como $[a,b]$.

\n

Por ejemplo,  el conjunto set([1,1],[1,2],[2,3]) nos da como resultado $\\{[1,1], [1,2], [2,3]\\}$.

\n

El conjunto vacío se ingresa como set(). 

", "advice": "

a)

\n

$A \\times B$ es el conjunto de todos los pares $(a,b)$, donde $a \\in A$ y $b \\in B$.

\n

b)

\n

$B \\cap D$ es el conjunto de todos los elementos presentes en ambos conjuntos $B$ y $D$, i.e. $\\var{set2 and set5}$.

\n

$A \\cap C$ es el conjunto de todos los elementos presentes en ambos conjuntos $A$ y $C$, i.e. $\\var{set1 and set4}$.

\n

$(B\\cap D)\\times (A\\cap C)$ es el conjunto de todos los pares $(x,y)$, donde $x \\in B \\cap D$ y $y \\in A \\cap C$.

\n

c)

\n

$(A\\cap C)\\times (A\\cap C)\\times (C\\cap D)$ es el conjunto de todos los triples $(x,y,z)$, donde $x \\in A \\cap C$, $y \\in A \\cap C$ y $z \\in C \\cap D$. Observe que $x$ e $y$ no tienen que ser diferente.

\n

d)

\n

$A-C$ es el conjunto de todos los elementos presentes en $A$ pero no en $C$, i.e. $\\var{set1-set4}$.

\n

$C-A$ es el conjunto de todos los elementos presentes en$C$ pero no $A$, i.e. $\\var{set4-set1}$.

\n

$(A-C) \\cup (C-A)$  es el conjunto de todos los elementos que están en $A-C$, o en  $C-A$, así $(A-C) \\cup (C-A) = \\var{(set1-set4) or (set4-set1)}$.

\n

e)

\n

$(A \\times D)$ es el conjunto de todos los pares $(a,d)$, con $a \\in A$ y $d \\in D$, i.e. $\\var{set(product(list(set1),list(set5)))}$.

\n

$(C \\times B)$ es el conjunto de todos los pares $(c,b)$, con $c \\in C$ y $b \\in B$, i.e. $\\var{set(product(list(set4),list(set2)))}$.

\n

$(A \\times D) \\cap (C \\times B)$ es el conjunto de todos los pares presente en  los conjuntos anteriores.

\n

f)

\n

$C \\cap D$ es el conjunto de todos los elementos en ambos conjuntos $C$ y en $D$, así $C \\cap D = \\var{set4 and set5}$.

\n

$C - D$ es el conjunto de todos los elementos que están $C$ y no en $D$, así $C-D = \\var{set4 - set5}$.

\n

$(C \\cap D) \\times (C - D)$ es el conjunto de todos los pares $(x,y)$, donde $x$ está en $C \\cap D$  e $y$ está en $C - D$, así $C \\cap D) \\times (C-D) = \\var{set(product(list(set4 and set5),list(set4 - set5)))}$.

\n

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

\n

Finalmente, $[(C \\cap D) \\times (C - D)] \\cup [(D - C) \\times (C \\cap D)]$ es el conjunto de todos los pares presentes en cualquiera de los conjuntos anteriores, i.e. $\\var{set16}$.

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

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

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

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

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

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

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

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

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

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

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

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{set16}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "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/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}]}], "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/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}