// Numbas version: exam_results_page_options {"name": "John'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": [{"variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["a1", "g5", "ans3", "g3", "ans1", "ans2", "t5", "ans4", "ans5", "s5", "h5", "b4", "b5", "a3", "a2", "a5", "b1", "b2", "b3", "a4"], "name": "John's copy of Perform arithmetic in Z_n", "variables": {"a2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "name": "a2", "description": ""}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..4)", "name": "a1", "description": ""}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..4)", "name": "b1", "description": ""}, "t5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(g5+h5,9)", "name": "t5", "description": ""}, "a4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(6..9)", "name": "a4", "description": ""}, "g5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..9)", "name": "g5", "description": ""}, "ans5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(a5+b5)*(g5+h5)", "name": "ans5", "description": ""}, "ans2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a2*b2", "name": "ans2", "description": ""}, "ans1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a1+b1", "name": "ans1", "description": ""}, "b5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..9)", "name": "b5", "description": ""}, "b3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..6)", "name": "b3", "description": ""}, "b2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "name": "b2", "description": ""}, "a3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..6)", "name": "a3", "description": ""}, "g3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..6)", "name": "g3", "description": ""}, "h5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..9)", "name": "h5", "description": ""}, "b4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(6..9)", "name": "b4", "description": ""}, "ans3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a3*(b3+g3)", "name": "ans3", "description": ""}, "ans4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a4*b4", "name": "ans4", "description": ""}, "a5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(5..9)", "name": "a5", "description": ""}, "s5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(a5+b5,9)", "name": "s5", "description": ""}}, "variable_groups": [], "parts": [{"showCorrectAnswer": true, "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 \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
$\\mathbb{Z}_{2}$$\\mathbb{Z}_{9}$$\\mathbb{Z}_{10}$
$\\var{a1}+\\var{b1}$[[0]][[1]][[2]]
$\\var{a2}\\times\\var{b2}$[[3]][[4]][[5]]
$\\var{a3}\\times(\\var{b3}+\\var{g3})$[[6]][[7]][[8]]
$\\var{a4}\\times\\var{b4}$[[9]][[10]][[11]]
$(\\var{a5}+\\var{b5})\\times (\\var{g5}+\\var{h5})$[[12]][[13]][[14]]
\n \n ", "type": "gapfill", "scripts": {}, "marks": 0, "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans1,2)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans1,2)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans1,9)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans1,9)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans1,10)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans1,10)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans2,2)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans2,2)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans2,9)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans2,9)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans2,10)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans2,10)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans3,2)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans3,2)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans3,9)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans3,9)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans3,10)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans3,10)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans4,2)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans4,2)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans4,9)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans4,9)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans4,10)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans4,10)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans5,2)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans5,2)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans5,9)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans5,9)}"}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "maxValue": "{mod(ans5,10)}", "type": "numberentry", "showPrecisionHint": false, "scripts": {}, "marks": 0.2, "minValue": "{mod(ans5,10)}"}]}], "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.

\n

For 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}

", "statement": "", "preamble": {"css": "", "js": ""}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "tags": ["checked2015", "MAS3214", "Modular arithmetic", "modular arithmetic"], "type": "question", "functions": {}, "question_groups": [{"questions": [], "pickingStrategy": "all-ordered", "name": "", "pickQuestions": 0}], "showQuestionGroupNames": false, "metadata": {"description": "

Calculations in $\\mathbb{Z_n}$ for three values of $n$.     

", "notes": "

16/08/2012:

\n


Added tags.

\n

Added description.    

", "licence": "Creative Commons Attribution 4.0 International"}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "John Moss", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3481/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "John Moss", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3481/"}]}