// Numbas version: finer_feedback_settings {"name": "Blathnaid's copy of Predicates and sets", "feedback": {"allowrevealanswer": true, "showtotalmark": true, "advicethreshold": 0, "intro": "", "feedbackmessages": [], "showanswerstate": true, "showactualmark": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "allQuestions": true, "shuffleQuestions": false, "percentPass": 0, "duration": 0, "pickQuestions": 0, "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "allowregen": true, "showresultspage": "oncompletion", "preventleave": true, "browse": true, "showfrontpage": true}, "metadata": {"description": "

Questions about logical predicates, and basic set theory concepts.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "exam", "questions": [], "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": "set3", "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/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"set1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(b..c)", "description": "", "name": "set1"}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(3..8)", "description": "", "name": "b"}, "universal": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(1..a)", "description": "", "name": "universal"}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "b+random(10..a-b)", "description": "", "name": "c"}, "f": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2,3,5,6)", "description": "", "name": "f"}, "set3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(mod_set(1,a,f))", "description": "", "name": "set3"}, "d": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(5..c-1)", "description": "", "name": "d"}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(b+10..30)", "description": "", "name": "a"}, "set2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(d+1..a)", "description": "", "name": "set2"}}, "ungrouped_variables": ["a", "b", "c", "d", "f", "universal", "set1", "set2", "set3"], "variable_groups": [], "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 following sets:

\n

a) $A \\cap B=\\;$[[0]]

\n

b) $B \\cap C=\\;$[[1]]

\n

c) $A \\cap \\overline{C}=\\;$[[2]]

\n

d) $(\\overline{A} \\cup C) \\cap B=\\;$[[3]]

\n

e) $\\overline{A \\cup C} \\cap \\overline{B}=\\;$[[4]]

\n

f) $(A \\cup \\overline{B}) \\cap C=\\;$[[5]]

\n

\n

Note that you input sets in the form set(a,b,c,..,z) .

\n

For example set(1,2,3)gives the set $\\{1,2,3\\}$.

\n

The empty set is input as set().

\n

Also some labour saving tips:

\n

If 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).

\n

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

", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"answer": "{set1 and set2}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "{set2 and set3}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "{set1 and (universal-set3)}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "{((universal-set1) or set3) and set2}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "{(universal-(set1 or set3)) and (universal-set2)}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "{(set1 or (universal-set2)) and set3}", "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "marks": 1, "checkingType": "absdiff", "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}], "statement": "

In this question, the universal set is  $\\mathcal{U}=\\{x \\in \\mathbb{N}\\; | \\;x \\leq \\var{a}\\}$.

\n

Let:

\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}\\}$.

\n

\n

", "tags": [], "rulesets": {}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "advice": ""}]}], "contributors": [{"name": "Blathnaid Sheridan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/447/"}], "extensions": [], "custom_part_types": [], "resources": []}