// Numbas version: finer_feedback_settings
{"name": "Blathnaid's copy of Perform arithmetic in Z_n", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a1", "g5", "ans3", "g3", "ans1", "ans2", "t5", "ans4", "ans5", "s5", "h5", "b4", "b5", "a3", "a2", "a5", "b1", "b2", "b3", "a4"], "name": "Blathnaid's copy of Perform arithmetic in Z_n", "tags": ["checked2015", "MAS3214", "Modular arithmetic", "modular arithmetic"], "advice": "
In the the last part, working out $(\\var{a5}+\\var{b5})\\times (\\var{g5}+\\var{h5}) \\bmod{X}$, it is sometimes easier to work out $(\\var{a5}+\\var{b5}) \\bmod{X}$ and $(\\var{g5}+\\var{h5}) \\bmod{X}$ separately, giving two numbers in the range $[0 \\dots X-1]$, and then to multiply them together.
\nFor example, working $\\bmod{9}$ we have:
\n\\begin{align}
\\var{a5}+\\var{b5}&\\equiv \\var{mod(a5+b5,9)} \\bmod{9}, \\\\
\\var{g5}+\\var{h5}&\\equiv \\var{mod(g5+h5,9)} \\bmod{9}. \\\\ \\\\
(\\var{a5}+\\var{b5})\\times (\\var{g5}+\\var{h5}) &\\equiv \\var{s5} \\times \\var{t5} \\bmod{9} \\\\
&\\equiv \\var{mod(ans5,9)} \\bmod{9}
\\end{align}
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "\n \n \n Perform the following calculations in $\\mathbb{Z}_{2},\\;\\;\\mathbb{Z}_{9},\\;\\;\\mathbb{Z}_{10}$.
\n \n \n \n \n \n \n \n | \n \n $\\mathbb{Z}_{2}$ | \n \n $\\mathbb{Z}_{9}$ | \n \n $\\mathbb{Z}_{10}$ | \n \n
\n \n \n \n $\\var{a1}+\\var{b1}$ | \n \n [[0]] | \n \n [[1]] | \n \n [[2]] | \n \n
\n \n \n \n $\\var{a2}\\times\\var{b2}$ | \n \n [[3]] | \n \n [[4]] | \n \n [[5]] | \n \n
\n \n \n \n $\\var{a3}\\times(\\var{b3}+\\var{g3})$ | \n \n [[6]] | \n \n [[7]] | \n \n [[8]] | \n \n
\n \n \n \n $\\var{a4}\\times\\var{b4}$ | \n \n [[9]] | \n \n [[10]] | \n \n [[11]] | \n \n
\n \n \n \n $(\\var{a5}+\\var{b5})\\times (\\var{g5}+\\var{h5})$ | \n \n [[12]] | \n \n [[13]] | \n \n [[14]] | \n \n
\n \n
\n \n ", "marks": 0, "gaps": [{"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans1,2)}", "minValue": "{mod(ans1,2)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans1,9)}", "minValue": "{mod(ans1,9)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans1,10)}", "minValue": "{mod(ans1,10)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans2,2)}", "minValue": "{mod(ans2,2)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans2,9)}", "minValue": "{mod(ans2,9)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans2,10)}", "minValue": "{mod(ans2,10)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans3,2)}", "minValue": "{mod(ans3,2)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans3,9)}", "minValue": "{mod(ans3,9)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans3,10)}", "minValue": "{mod(ans3,10)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans4,2)}", "minValue": "{mod(ans4,2)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans4,9)}", "minValue": "{mod(ans4,9)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans4,10)}", "minValue": "{mod(ans4,10)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans5,2)}", "minValue": "{mod(ans5,2)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans5,9)}", "minValue": "{mod(ans5,9)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mod(ans5,10)}", "minValue": "{mod(ans5,10)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.2, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"a1": {"definition": "random(1..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "g5": {"definition": "random(5..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "g5", "description": ""}, "ans3": {"definition": "a3*(b3+g3)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans3", "description": ""}, "g3": {"definition": "random(3..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "g3", "description": ""}, "ans1": {"definition": "a1+b1", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "ans2": {"definition": "a2*b2", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}, "t5": {"definition": "mod(g5+h5,9)", "templateType": "anything", "group": "Ungrouped variables", "name": "t5", "description": ""}, "ans4": {"definition": "a4*b4", "templateType": "anything", "group": "Ungrouped variables", "name": "ans4", "description": ""}, "ans5": {"definition": "(a5+b5)*(g5+h5)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans5", "description": ""}, "s5": {"definition": "mod(a5+b5,9)", "templateType": "anything", "group": "Ungrouped variables", "name": "s5", "description": ""}, "h5": {"definition": "random(5..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "h5", "description": ""}, "b4": {"definition": "random(6..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b4", "description": ""}, "b5": {"definition": "random(5..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b5", "description": ""}, "a3": {"definition": "random(3..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "a3", "description": ""}, "a2": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a2", "description": ""}, "a5": {"definition": "random(5..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a5", "description": ""}, "b1": {"definition": "random(2..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "b2": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "b2", "description": ""}, "b3": {"definition": "random(3..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "b3", "description": ""}, "a4": {"definition": "random(6..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a4", "description": ""}}, "metadata": {"notes": "16/08/2012:
\n
Added tags.
\n Added description.
", "description": "Calculations in $\\mathbb{Z_n}$ for three values of $n$.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Blathnaid Sheridan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/447/"}]}]}], "contributors": [{"name": "Blathnaid Sheridan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/447/"}]}