// Numbas version: exam_results_page_options {"name": "Simon's copy of Basic Set Theory: power set", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "description": "

The power set of $\\left\\{\\var{listB[0]},\\var{listB[1]}\\right\\}$ is

\n

$\\left\\{\\left\\{\\right\\}, \\left\\{\\var{listB[0]}\\right\\},\\left\\{\\var{listB[1]}\\right\\}, \\left\\{\\var{listB[0]},\\var{listB[1]}\\right\\}\\right\\}$.

\n

You can obtain the power set by finding all the subsets of all possible sizes. Since we have a set of size two then the subsets have length at most two. These are

\n
\n
• the subset of length zero: $\\left\\{\\right\\}$
• \n
• the subsets of length one: $\\left\\{\\var{listB[0]}\\right\\},\\left\\{\\var{listB[1]}\\right\\}$
• \n
• the subset length two: $\\left\\{\\var{listB[0]},\\var{listB[1]}\\right\\}$.
• \n
\n

Note that the length zero subset is always the empty set, and the largest subset is the set itself.

", "variable_groups": [], "name": "Simon's copy of Basic Set Theory: power set", "preamble": {"css": "", "js": ""}, "variables": {"B": {"group": "Ungrouped variables", "description": "", "definition": "set(listB)", "templateType": "anything", "name": "B"}, "A": {"group": "Ungrouped variables", "description": "", "definition": "deal(2)", "templateType": "anything", "name": "A"}, "listB": {"group": "Ungrouped variables", "description": "", "definition": "repeat(random(3..9),2)", "templateType": "anything", "name": "listB"}, "PB": {"group": "Ungrouped variables", "description": "", "definition": "set(set(),set(listB[0]),set(listB[1]),B)", "templateType": "anything", "name": "PB"}}, "parts": [{"variableReplacementStrategy": "originalfirst", "steps": [{"variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "type": "jme", "vsetrange": [0, 1], "checkvariablenames": false, "showCorrectAnswer": true, "prompt": "

First we look at all the subsets containing zero elements. This is the empty set $\\left\\{\\right\\}$ and is an element any power set. Enter the empty set below using the NUMBAS syntax, which is set().

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

Next we look at all the subsets containing exactly one element, such as $\\left\\{\\var{listB[0]}\\right\\}$. Enter this using the NUMBAS syntax set({listB[0]}).

", "checkingaccuracy": 0.001, "checkingtype": "absdiff", "marks": 1, "scripts": {}, "answer": "set({listB[0]})", "variableReplacements": [], "showpreview": true, "vsetrangepoints": 5, "expectedvariablenames": []}, {"variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "type": "jme", "vsetrange": [0, 1], "checkvariablenames": false, "showCorrectAnswer": true, "prompt": "

What is the other subset that that contains exactly one element?

", "checkingaccuracy": 0.001, "checkingtype": "absdiff", "marks": 1, "scripts": {}, "answer": "set({listB[1]})", "variableReplacements": [], "showpreview": true, "vsetrangepoints": 5, "expectedvariablenames": []}, {"variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "type": "jme", "vsetrange": [0, 1], "checkvariablenames": true, "showCorrectAnswer": true, "prompt": "

What is the subset that contains exactly two elements?

", "checkingaccuracy": 0.001, "checkingtype": "absdiff", "marks": 1, "scripts": {}, "answer": "{B}", "variableReplacements": [], "showpreview": true, "vsetrangepoints": 5, "expectedvariablenames": []}, {"variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "type": "information", "marks": 0, "scripts": {}, "variableReplacements": [], "prompt": "

The power set is the set containg all these answers as elements. Enter your answer using the NUMBAS syntax set(a,b,c,d) where $a,b,c$ and $d$ are your answers above.

", "showCorrectAnswer": true}], "type": "jme", "prompt": "

What is the power set of $\\left\\{\\var{listB[0]},\\var{listB[1]}\\right\\}$?

", "checkvariablenames": true, "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showCorrectAnswer": true, "stepsPenalty": 0, "showFeedbackIcon": true, "checkingtype": "absdiff", "marks": 1, "scripts": {}, "answer": "{PB}", "variableReplacements": [{"part": "p0s3", "variable": "B", "must_go_first": true}], "showpreview": true, "vsetrangepoints": 5, "expectedvariablenames": []}], "statement": "

The power set of $A$, written $P(A)$, is the set of all subsets of $A$.

", "ungrouped_variables": ["A", "listB", "PB", "B"], "variablesTest": {"maxRuns": 100, "condition": "not (listB[0] = listB[1])"}, "extensions": [], "functions": {}, "tags": [], "type": "question", "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}