// Numbas version: finer_feedback_settings {"name": "Marie's copy of larger truth table", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

Create a truth table for a logical expression of the form $(a \\operatorname{op1} b) \\operatorname{op2}(c \\operatorname{op3} d)$ where $a, \\;b,\\;c,\\;d$ can be the Boolean variables $p,\\;q,\\;\\neg p,\\;\\neg q$ and each of $\\operatorname{op1},\\;\\operatorname{op2},\\;\\operatorname{op3}$ one of $\\lor,\\;\\land,\\;\\to$.

\n

For example: $(p \\lor \\neg q) \\land(q \\to \\neg p)$.

", "licence": "Creative Commons Attribution 4.0 International"}, "tags": [], "name": "Marie's copy of larger truth table", "functions": {"conv": {"language": "jme", "parameters": [["op", "string"]], "definition": "switch(op=\"\\\\land\",\"and\",op=\"\\\\lor\",\"or\",\"implies\")", "type": "string"}, "evaluate": {"language": "javascript", "parameters": [["expr", "string"], ["dependencies", "list"]], "definition": "return scope.evaluate(expr);", "type": "number"}, "convch": {"language": "jme", "parameters": [["ch", "string"]], "definition": "switch(ch=\"\\\\neg p\",\"not p[t]\",ch=\"\\\\neg q\",\"not q[t]\",ch=\"p\",\"p[t]\",\"q[t]\")", "type": "string"}, "bool_to_label": {"language": "jme", "parameters": [["l", "list"]], "definition": "map(if(l[x],'T','F'),x,0..length(l)-1)", "type": "number"}}, "ungrouped_variables": [], "extensions": [], "variables": {}, "parts": [{"variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true, "scripts": {}, "gaps": [{"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "0", "answer": "0", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}, {"displayAnswer": "1", "answer": "1", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "type": "patternmatch"}], "prompt": "

Complete the following truth table; enter $0$ for false and $1$ for true.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$p$$q$$r$$q\\land r$$p\\Rightarrow(q\\land r)$$p\\Rightarrow q$$p\\Rightarrow r$$(p\\Rightarrow q)\\land(p\\Rightarrow r)$
000[[0]][[8]][[16]][[24]][[32]]
001[[1]][[9]][[17]][[25]][[33]]
010[[2]][[10]][[18]][[26]][[34]]
011[[3]][[11]][[19]][[27]][[35]]
100[[4]][[12]][[20]][[28]][[36]]
101[[5]][[13]][[21]][[29]][[37]]
110[[6]][[14]][[22]][[30]][[38]]
111[[7]][[15]][[23]][[31]][[39]]
", "variableReplacementStrategy": "originalfirst", "marks": 0}, {"displayColumns": 0, "minMarks": "0", "choices": ["

Yes

", "

No

"], "shuffleChoices": false, "matrix": ["2", 0], "distractors": ["", ""], "maxMarks": "2", "displayType": "radiogroup", "type": "1_n_2", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "prompt": "

From this truth table, are the expressions $p\\Rightarrow(q\\land r)$ and $(p\\Rightarrow q)\\land (p\\Rightarrow r)$ logically equivalent?

", "variableReplacementStrategy": "originalfirst", "marks": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "statement": "

In this question you are asked to construct a truth table for the expressions

\n

$p\\Rightarrow(q\\wedge r)$ and $(p\\Rightarrow q)\\wedge (p\\Rightarrow r)$, using all possible combinations of truth values for $p,q,r$.

\n

Recall that $0$ means false and $1$ means true.

\n

\n

", "showQuestionGroupNames": false, "variable_groups": [], "rulesets": {}, "advice": "

Use the truth tables for the \"and\" operator $\\wedge$ and the implication $\\Rightarrow$. Remember that $p\\Rightarrow q$ is true whenever $p$ is false or $q$ is true.

\n

", "question_groups": [{"questions": [], "pickingStrategy": "all-ordered", "name": "", "pickQuestions": 0}], "variablesTest": {"condition": "", "maxRuns": "150"}, "contributors": [{"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}]}]}], "contributors": [{"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}]}