// Numbas version: finer_feedback_settings {"name": "truth table with 3 logic variables", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"evaluate": {"definition": "return scope.evaluate(expr);", "type": "number", "parameters": [["expr", "string"], ["dependencies", "list"]], "language": "javascript"}, "bool_to_label": {"definition": "map(if(l[x],'T','F'),x,0..length(l)-1)", "type": "number", "parameters": [["l", "list"]], "language": "jme"}, "conv": {"definition": "switch(op=\"\\\\land\",\"and\",op=\"\\\\lor\",\"or\",\"implies\")", "type": "string", "parameters": [["op", "string"]], "language": "jme"}, "convch": {"definition": "switch(ch=\"\\\\neg p\",\"not p[t]\",ch=\"\\\\neg q\",\"not q[t]\",ch=\"p\",\"p[t]\",\"q[t]\")", "type": "string", "parameters": [["ch", "string"]], "language": "jme"}}, "ungrouped_variables": [], "name": "truth table with 3 logic variables", "tags": ["truth table; logic"], "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

", "rulesets": {}, "parts": [{"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$$\\qquad q\\land r\\quad$$p\\Rightarrow(q\\land r)$$\\quad p\\Rightarrow q\\quad$$\\quad p\\Rightarrow r\\quad$$(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]]
\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "0", "scripts": {}, "answer": "0", "marks": 1, "type": "patternmatch"}, {"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "displayAnswer": "1", "scripts": {}, "answer": "1", "marks": 1, "type": "patternmatch"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

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

", "matrix": ["2", 0], "shuffleChoices": false, "marks": 0, "variableReplacements": [], "choices": ["

Yes

", "

No

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": "2", "scripts": {}, "distractors": ["", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": "0"}], "extensions": [], "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

", "variable_groups": [], "variablesTest": {"maxRuns": "150", "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {}, "metadata": {"description": "

Create a truth table with 3 logic variables to see if two logic expressions are equivalent.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Bernhard von Stengel", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1054/"}]}]}], "contributors": [{"name": "Bernhard von Stengel", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1054/"}]}