// Numbas version: finer_feedback_settings {"name": "I can name your polynomial", "extensions": ["polynomials"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "I can name your polynomial", "tags": [], "metadata": {"description": "
Explore mode question guiding you through the steps of the \"I can name your polynomial\" trick.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": ["polynomials"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"N": {"name": "N", "group": "Ungrouped variables", "definition": "10", "description": "", "templateType": "anything", "can_override": false}, "fN": {"name": "fN", "group": "Ungrouped variables", "definition": "127", "description": "", "templateType": "anything", "can_override": false}, "coefficients": {"name": "coefficients", "group": "Ungrouped variables", "definition": "int(mod(x,N)) for: x of: iterate_until(x -> (x-mod(x,N))/N, fN, x -> x=0, 100)[0..-1]", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "polynomial(x,coefficients)", "description": "", "templateType": "anything", "can_override": false}, "found": {"name": "found", "group": "Ungrouped variables", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "prefix": {"name": "prefix", "group": "Ungrouped variables", "definition": "join(if(iChoose a whole number between 2 and 10: [[0]]
\nAnd another whole number between 100 and 200: [[1]]
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Small number", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "2", "maxValue": "10", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": true, "customName": "Big number", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "100", "maxValue": "200", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Write the polynomial", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Get a hint", "rawLabel": "Get a hint", "otherPart": 2, "variableReplacements": [], "availabilityCondition": "not (answered and credit=1)", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "{if(found>0,found_reminder,\"\")}
\nWrite a polynomial $f(x)$, with all coefficients non-negative whole numbers less than $\\var{N}$, such that $f(\\var{N}) = \\var{fN}$.
\n$f(x) = $ [[0]]
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Write the polynomial", "answer": "{expr(p)}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "information", "useCustomName": true, "customName": "The plan", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Write a coefficient", "rawLabel": "", "otherPart": 3, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "You know that all of the coefficients of the polynomial must be less than $\\var{N}$.
\nSo, if
\n\\[ f(x) = a_nx^n + a_{n-1}x^{n-1} + \\ldots + a_1x + a_0, \\]
\nthen
\n\\[ f(\\var{N}) = a_n\\var{N}^n + a_{n-1}\\var{N}^{n-1} + \\ldots + a_1\\var{N} + a_0. \\]
\nTake out a factor of $\\var{N}$ from the non-constant terms:
\n\\[ f(\\var{N}) = \\var{N} \\cdot \\left( a_n\\var{N}^{n-1} + a_{n-1}\\var{N}^{n-2} + \\ldots + a_1 \\right) + a_0. \\]
\nSo $f(\\var{N}) \\mod \\var{N} = a_0$.
\nOnce you've found the constant term $a_0$, you can repeat the trick on the bit inside the brackets to find the rest of the coefficients, one-by-one.
"}, {"type": "numberentry", "useCustomName": true, "customName": "Write a coefficient", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Write a coefficient", "rawLabel": "", "otherPart": 3, "variableReplacements": [{"variable": "found", "definition": "found+1"}], "availabilityCondition": "answered and credit=1 and found{found_reminder}
\nSo $q_{\\var{found}}(\\var{N}) = \\var{rest}$.
\nWhat's $q_{\\var{found}}(\\var{N}) \\mod \\var{N}$?
", "minValue": "coefficients[found]", "maxValue": "coefficients[found]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "explore", "maxMarks": 0, "objectives": [{"name": "Write the polynomial", "limit": "10"}], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}], "resources": []}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Christian Lawson-Perfect", "profile_url": "http://clppc.local:8000/accounts/profile/1/"}]}