// Numbas version: exam_results_page_options {"name": "Factorise polynomial into irreducible factors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"d3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(g0+be+g1*al,n)", "description": "", "name": "d3"}, "h0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(h1=0,random(2,3),if(h1=1,random(1,2),if(h1=2,random(3,4),if(h1=3,random(3,4),random(1,2)))))", "description": "", "name": "h0"}, "f1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(h1*g0+g1*h0,n)", "description": "", "name": "f1"}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "name": "a1"}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(c+a,n)", "description": "", "name": "c2"}, "be": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(al=0,random(1,3,4),0)", "description": "", "name": "be"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(a=0,random(2,3),if(a=1,random(1,2),\nif(a=2,random(3,4),if(a=3,random(3,4),random(1,2)))))", "description": "", "name": "b"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "5", "description": "", "name": "n"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,1,2,3,4)", "description": "", "name": "a"}, "f2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(h1*g1+h0+g0,n)", "description": "", "name": "f2"}, "g0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(g1=0,random(2,3),if(g1=1,random(1,2),if(g1=2,random(3,4),if(g1=3,random(3,4),random(1,2)))))", "description": "", "name": "g0"}, "f3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(g1+h1,n)", "description": "", "name": "f3"}, "h1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(g1=0,random(1..4),if(g1=1,random(0,2,3,4),if(g1=2,random(0,1,3,4),if(g1=3,random(0,1,2,4),random(0..3)))))", "description": "", "name": "h1"}, "a2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(a1=1,random(2..4),if(a1=2,random(1,3,4),if(a1=3,random(1,2,4),random(1..3))))", "description": "", "name": "a2"}, "c0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(b*c,n)", "description": "", "name": "c0"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2,3,4)", "description": "", "name": "c"}, "g1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,1,2,3,4)", "description": "", "name": "g1"}, "d2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(g0*al+be*g1+ga,n)", "description": "", "name": "d2"}, "d4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(g1+al,n)", "description": "", "name": "d4"}, "b0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(a1*a2,n)", "description": "", "name": "b0"}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(a1+a2,n)", "description": "", "name": "b1"}, "al": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..4)", "description": "", "name": "al"}, "d1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(g1*ga+g0*be,n)", "description": "", "name": "d1"}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(a*c+b,n)", "description": "", "name": "c1"}, "ga": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(al=1,random(1,2),if(al=2,random(1,3),if(al=3,2,if(al=4,3,if(be=1,random(1,4), if(be=4,random(2,3),2))))))", "description": "", "name": "ga"}, "f0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(h0*g0,n)", "description": "", "name": "f0"}, "d0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(g0*ga,n)", "description": "", "name": "d0"}}, "ungrouped_variables": ["f0", "f1", "f2", "f3", "h0", "h1", "al", "b0", "b1", "ga", "d4", "d2", "d3", "d0", "d1", "be", "g1", "g0", "a1", "a2", "c2", "c1", "c0", "a", "c", "b", "n"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Factorise polynomial into irreducible factors", "functions": {}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 0, "scripts": {}, "gaps": [{"answer": "X^2+{g1}*X+{g0}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

Consider $f(X)$ and $g(X)$ as polynomials over  $\\mathbb{Z}_{\\var{n}}$.

\n

Find their greatest common divisor (GCD) and enter it as a monic polynomial.

\n

Note that the coefficients all should be in $\\mathbb{Z}_{\\var{n}}=\\{0,\\;1,\\;2,\\;3,\\;4\\}$.

\n

GCD=[[0]].

\n

\n

\n

Click on Show steps to obtain information on monic polynomials over $\\mathbb{Z}_{\\var{n}}$.

", "steps": [{"type": "information", "prompt": "

Monic Polynomials.

\n

\n

A monic polynomial over $\\mathbb{Z}_{\\var{n}}$  has the coefficient of the greatest power equalling $1$.

\n

For example: in order to normalize  $2X^2+3X+1$ over $\\mathbb{Z}_{\\var{n}}$ into a monic polynomial we are allowed to multiply the polynomial by a constant, and since$ 2^{-1} = 3 \\mod {\\var{n}}$ we have on multiplying the polynomial throughout by $3$ that

\n

$\\simplify{3 * (2 * X ^ 2 + 3 * X + 1) = 6 * X ^ 2 + 9 * X + 3 = X ^ 2 + 4 * X + 3}$ as a polynomial over $\\mathbb{Z}_{\\var{n}}$

\n

and which is now a monic polynomial . 

\n

\n

", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "(((X ^ 2) + ({g1} * X) + {g0}) * ((X ^ 2) + ({h1} * X) + {h0}))", "musthave": {"message": "

Factorize the polynomial into irreducible factors.

", "showStrings": false, "partialCredit": 0, "strings": ["("]}, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"message": "

Factorize the polynomial into irreducible factors.

", "showStrings": false, "partialCredit": 0, "strings": ["^4", "^3"]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "all", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

Find the irreducible factorization of $f(X)$ over  $\\mathbb{Z}_{\\var{n}}$.

\n

$f(X)=\\;$[[0]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

Let \\[\\begin{align}\\\\
f(X)&=\\simplify{ X ^ 4 + {f3} * X ^ 3 + {f2} * X ^ 2 + {f1} * X + {f0}}\\\\\\\\
g(X)&=\\simplify{X^5+{d4}*X^4+{d3}*X ^ 3 + {d2} * X ^ 2 + {d1} * X + {d0}}\\end{align}\\]

", "tags": ["checked2015", "factorize polynomials", "finite fields", "gcd", "irreducible polynomials", "MAS2213", "normalized polynomials", "polynomials over finite fields"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

$f(X)$ and $g(X)$ are polynomials over $\\mathbb{Z}_n$.

\n

Find their greatest common divisor (GCD) and enter it as a monic polynomial.

\n

Hence factorize $f(X)$ into irreducible factors.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

1. We have on using the Euclidean Algorithm that the GCD of $f(X)$ and $g(X)$ is $\\simplify{X^2+{g1}*X+{g0}}$ over $\\mathbb{Z}_{\\var{n}}$.

\n

Note that this GCD is a monic polynomial.

\n

2. Hence  $\\simplify{X^2+{g1}*X+{g0}}$  is a factor of $f(X)$ and is irreducible over $\\mathbb{Z}_{\\var{n}}$ as you can check.

\n

On dividing $f(X)$ by  $\\simplify{X^2+{g1}*X+{g0}}$ we obtain:

\n

$f(X) = \\simplify{(X ^ 2 + {g1} * X + {g0}) * (X ^ 2 + {h1} * X + {h0})}$ over  $\\mathbb{Z}_{\\var{n}}$.

\n

You can check that $\\simplify{X ^ 2 + {h1} * X + {h0}}$ is also irreducible over  $\\mathbb{Z}_{\\var{n}}$.

\n

Hence the above factorization expresses $f(X)$ as the product of irreducible polynomials over  $\\mathbb{Z}_{\\var{n}}$.

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}