// Numbas version: exam_results_page_options {"name": "Power set - list members", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Power set - list members", "tags": [], "metadata": {"description": "
Introductory exercise about power sets.
", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "statement": "The power set of $A$, written $P(A)$, is the set of all subsets of $A$.
", "advice": "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\\}$.
\nYou 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
\nNote that the length zero subset is always the empty set, and the largest subset is the set itself.
", "rulesets": {}, "extensions": [], "variables": {"PB": {"name": "PB", "group": "Ungrouped variables", "definition": "set(set(),set(listB[0]),set(listB[1]),B)", "description": "", "templateType": "anything"}, "A": {"name": "A", "group": "Ungrouped variables", "definition": "deal(2)", "description": "", "templateType": "anything"}, "listB": {"name": "listB", "group": "Ungrouped variables", "definition": "repeat(random(3..9),2)", "description": "", "templateType": "anything"}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "set(listB)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "not (listB[0] = listB[1])", "maxRuns": 100}, "ungrouped_variables": ["A", "listB", "PB", "B"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [{"variable": "B", "must_go_first": true}], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "What is the power set of $\\left\\{\\var{listB[0]},\\var{listB[1]}\\right\\}$?
\nYou can enter a set using the notation set(a,b,c). A set containing the set $\\{a\\}$ would be entered as set(set(a)).
", "answer": "{PB}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "valuegenerators": []}], "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/"}]}