The separate items in the student's answer

", "name": "bits"}, {"definition": "settings[\"correctAnswer\"]", "description": "", "name": "expected_numbers"}, {"definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )", "description": "

Is every number in the student's list valid?

Are the student's answers in ascending order?

", "name": "is_sorted"}, {"definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentIs each number in the expected answer present in the student's list the correct number of times?

", "name": "included"}, {"definition": "all(included)", "description": "

Has every number been included the right number of times?

", "name": "all_included"}, {"definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(filter(not (x in expected_numbers),x,interpreted_answer)[0]+\" is not in the list.\");\n false\n )", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "name": "no_extras"}, {"definition": "map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n)", "description": "A value representing the student's answer to this part.", "name": "interpreted_answer"}, {"definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "name": "mark"}, {"definition": "[\"en\"]", "description": "", "name": "notationStyles"}], "source": {"pk": 2, "edit_page": "/part_type/2/edit", "author": {"pk": 7, "name": "Christian Lawson-Perfect"}}, "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

", "input_options": {"allowEmpty": {"static": true, "value": false}, "hint": {"static": true, "value": "Enter a list of numbers separated by commas."}, "correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n \", \"\n)"}}], "showQuestionGroupNames": false, "duration": 0, "question_groups": [{"questions": [{"name": "MATH6005 Assessment 2_Q1of6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"showfrontpage": false, "preventleave": false, "allowregen": true}, "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/854/", "name": "Katy Dobson"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/", "name": "Harry Flynn"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/", "name": "Violeta CIT"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/", "name": "Marie Nicholson"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2551/", "name": "Paul Emanuel"}], "type": "question", "advice": "

#### a)

\n

\$\\boldsymbol{v}+\\boldsymbol{w} = \\var{vector(a,b,g)} + \\var{vector(c,d,f)} = \\var{vector(a+c,b+d,g+f)} \$

\n

#### b)

\n

In general for a vector $\\boldsymbol{x}= \\begin{pmatrix}x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix}$, we have $\\lVert \\boldsymbol{x} \\rVert = \\sqrt{x_1^2+x_2^2+x_3^2}$.

\n

Hence:

\n

\\begin{align}
\\lVert \\boldsymbol{v} \\rVert &= \\sqrt{\\var{a^2}+\\var{b^2}+\\var{g^2}} = \\simplify[all]{ sqrt({a^2+b^2+g^2})} \\\\
\\lVert \\boldsymbol{w} \\rVert &= \\sqrt{\\var{c^2}+\\var{d^2}+\\var{f^2}} = \\simplify[all]{ sqrt({c^2+d^2+f^2})} \\\\
\\lVert \\boldsymbol{v+w} \\rVert &= \\sqrt{\\var{(a+c)^2}+\\var{(b+d)^2}+\\var{(g+f)^2}} = \\simplify[all]{ sqrt({(a+c)^2+(b+d)^2+(f+g)^2})}
\\end{align}

\n

#### c)

\n

Given a vector $\\boldsymbol{x}= \\begin{pmatrix} x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix}$, the unit vector parallel to $\\boldsymbol{x}$ is given by:

\n

\$\\boldsymbol{u_x} = \\frac{1}{\\lVert \\boldsymbol{x} \\rVert} \\begin{pmatrix} x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix} = \\begin{pmatrix} \\frac{x_1}{\\lVert \\boldsymbol{x} \\rVert} \\\\ \\frac{x_2}{\\lVert \\boldsymbol{x} \\rVert} \\\\ \\frac{x_3}{\\lVert \\boldsymbol{x} \\rVert} \\end{pmatrix} \$

\n

For this example we have $\\lVert \\boldsymbol{v+w} \\rVert =\\simplify[std]{sqrt({(a+c)^2+(b+d)^2+(f+g)^2})}$, hence:

\n

\\begin{align}
&&\\boldsymbol{z} = \\boldsymbol{v} + \\boldsymbol{w} &= \\begin{pmatrix} \\var{a+c} \\\\ \\var{b+d} \\\\ \\var{g+f} \\end{pmatrix} \\\\
\\implies && \\boldsymbol{u_z} &= \\frac{1}{\\sqrt{\\var{ssquares}}} \\begin{pmatrix} \\var{a+c} \\\\ \\var{b+d} \\\\ \\var{g+f} \\end{pmatrix} \\\1em] && &= \\begin{pmatrix} \\simplify[std]{{a+c}/sqrt({ssquares})} \\\\ \\simplify[std]{{b+d}/sqrt({ssquares})} \\\\ \\simplify[std]{{g+f}/sqrt({ssquares})} \\end{pmatrix} \\end{align} \n #### d) \n \\begin{align} \\var{a4}\\boldsymbol{v} &= \\simplify{vector({a4}*{a}, {a4}*{b}, {a4}*{g})} \\\\[1em] &= \\var{a4*vector(a,b,g)} \\end{align} \n \\begin{align} \\var{-b4}\\boldsymbol{v} &= \\simplify{vector({-b4}*{c}, {-b4}*{d}, {-b4}*{f})} \\\\[1em] &= \\var{-b4*vector(c,d,f)} \\end{align} \n #### e) \n Using the information above, the unit vector parallel to \\boldsymbol{v} is: \n \\[ \\boldsymbol{u_v} = \\begin{pmatrix} \\simplify[std]{{a}/sqrt({ssquaresA})} \\\\ \\simplify[std]{{b}/sqrt({ssquaresA})} \\\\ \\simplify[std]{{g}/sqrt({ssquaresA})} \\end{pmatrix} \

\n

and the unit vector anti-parallel to $\\boldsymbol{w}$ is:

\n

\$-\\boldsymbol{u_w} = \\begin{pmatrix} \\simplify[std]{{-c}/sqrt({ssquaresB})} \\\\ \\simplify[std]{{-d}/sqrt({ssquaresB})} \\\\ \\simplify[std]{{-f}/sqrt({ssquaresB})} \\end{pmatrix} \$

", "tags": [], "ungrouped_variables": ["b4", "q", "s3", "s2", "s1", "s5", "s4", "ssquares", "v1", "v2", "a4", "a", "c", "b", "d", "g", "f", "m", "n", "ssquaresb", "ssquaresa", "v"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "metadata": {"description": "

Elementary operations on vectors; sum, modulus, unit vector, scalar multiple.

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"sortAnswers": false, "marks": 0, "scripts": {}, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "prompt": "

Calculate $\\mathbf{v}+\\mathbf{w} =$ [[0]]

", "showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"allowFractions": false, "marks": "0.25", "scripts": {}, "tolerance": 0, "type": "matrix", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "variableReplacements": [], "correctAnswerFractions": false, "numColumns": 1, "showCorrectAnswer": true, "unitTests": [], "customMarkingAlgorithm": "", "correctAnswer": "v", "numRows": "3", "markPerCell": false, "allowResize": false, "extendBaseMarkingAlgorithm": true}], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "extendBaseMarkingAlgorithm": true}, {"sortAnswers": false, "marks": 0, "scripts": {}, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "prompt": "

Calculate $4\\mathbf{v}-2\\mathbf{w} =$[[0]]

", "showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"allowFractions": false, "marks": "0.25", "scripts": {}, "tolerance": 0, "type": "matrix", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "variableReplacements": [], "correctAnswerFractions": false, "numColumns": 1, "showCorrectAnswer": true, "unitTests": [], "customMarkingAlgorithm": "", "correctAnswer": "4*v1 - 2*v2", "numRows": "3", "markPerCell": false, "allowResize": false, "extendBaseMarkingAlgorithm": true}], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "extendBaseMarkingAlgorithm": true}], "variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variables": {"s1": {"definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s1", "description": "", "templateType": "anything"}, "d": {"definition": "s4*random(2..9)", "group": "Ungrouped variables", "name": "d", "description": "", "templateType": "anything"}, "s2": {"definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s2", "description": "", "templateType": "anything"}, "s5": {"definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s5", "description": "", "templateType": "anything"}, "m": {"definition": "matrix([a,b],[c,d])", "group": "Ungrouped variables", "name": "m", "description": "", "templateType": "anything"}, "v1": {"definition": "vector(a,b,g)", "group": "Ungrouped variables", "name": "v1", "description": "", "templateType": "anything"}, "b4": {"definition": "-random(3..9)", "group": "Ungrouped variables", "name": "b4", "description": "", "templateType": "anything"}, "c": {"definition": "s3*random(2..9)", "group": "Ungrouped variables", "name": "c", "description": "", "templateType": "anything"}, "ssquares": {"definition": "(a+c)^2+(b+d)^2+(f+g)^2", "group": "Ungrouped variables", "name": "ssquares", "description": "", "templateType": "anything"}, "a": {"definition": "s1*random(2..9)", "group": "Ungrouped variables", "name": "a", "description": "", "templateType": "anything"}, "v2": {"definition": "vector(c,d,f)", "group": "Ungrouped variables", "name": "v2", "description": "", "templateType": "anything"}, "n": {"definition": "matrix([a,b],[c,d])", "group": "Ungrouped variables", "name": "n", "description": "", "templateType": "anything"}, "ssquaresb": {"definition": "(c)^2+(d)^2+(f)^2", "group": "Ungrouped variables", "name": "ssquaresb", "description": "", "templateType": "anything"}, "g": {"definition": "s1*random(2..9)", "group": "Ungrouped variables", "name": "g", "description": "", "templateType": "anything"}, "v": {"definition": "v1+v2", "group": "Ungrouped variables", "name": "v", "description": "", "templateType": "anything"}, "a4": {"definition": "random(3..9)", "group": "Ungrouped variables", "name": "a4", "description": "", "templateType": "anything"}, "f": {"definition": "random(2..9)", "group": "Ungrouped variables", "name": "f", "description": "", "templateType": "anything"}, "b": {"definition": "s2*random(2..9)", "group": "Ungrouped variables", "name": "b", "description": "", "templateType": "anything"}, "s4": {"definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s4", "description": "", "templateType": "anything"}, "q": {"definition": "M+N", "group": "Ungrouped variables", "name": "q", "description": "", "templateType": "anything"}, "s3": {"definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s3", "description": "", "templateType": "anything"}, "ssquaresa": {"definition": "(a)^2+(b)^2+(g)^2", "group": "Ungrouped variables", "name": "ssquaresa", "description": "", "templateType": "anything"}}, "statement": "

You are given the vectors

\n

\\begin{align}
\\mathbf{v} & =\\simplify[std]{vector({a},{b},{g})}, &
\\end{align}

\n

Enter your answers to the following questions exactly, using the function sqrt(x) if necessary.

"}, {"name": "MATH6005 Assessment 2_Q2of6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"showfrontpage": false, "preventleave": false, "allowregen": true}, "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/854/", "name": "Katy Dobson"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/", "name": "Harry Flynn"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/", "name": "Violeta CIT"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/", "name": "Marie Nicholson"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2551/", "name": "Paul Emanuel"}], "type": "question", "advice": "

#### a)

\n

\$\\boldsymbol{v}+\\boldsymbol{w} = \\var{vector(a,b,g)} + \\var{vector(c,d,f)} = \\var{vector(a+c,b+d,g+f)} \$

\n

#### b)

\n

In general for a vector $\\boldsymbol{x}= \\begin{pmatrix}x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix}$, we have $\\lVert \\boldsymbol{x} \\rVert = \\sqrt{x_1^2+x_2^2+x_3^2}$.

\n

Hence:

\n

\\begin{align}
\\lVert \\boldsymbol{v} \\rVert &= \\sqrt{\\var{a^2}+\\var{b^2}+\\var{g^2}} = \\simplify[all]{ sqrt({a^2+b^2+g^2})} \\\\
\\lVert \\boldsymbol{w} \\rVert &= \\sqrt{\\var{c^2}+\\var{d^2}+\\var{f^2}} = \\simplify[all]{ sqrt({c^2+d^2+f^2})} \\\\
\\lVert \\boldsymbol{v+w} \\rVert &= \\sqrt{\\var{(a+c)^2}+\\var{(b+d)^2}+\\var{(g+f)^2}} = \\simplify[all]{ sqrt({(a+c)^2+(b+d)^2+(f+g)^2})}
\\end{align}

\n

#### c)

\n

Given a vector $\\boldsymbol{x}= \\begin{pmatrix} x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix}$, the unit vector parallel to $\\boldsymbol{x}$ is given by:

\n

\$\\boldsymbol{u_x} = \\frac{1}{\\lVert \\boldsymbol{x} \\rVert} \\begin{pmatrix} x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix} = \\begin{pmatrix} \\frac{x_1}{\\lVert \\boldsymbol{x} \\rVert} \\\\ \\frac{x_2}{\\lVert \\boldsymbol{x} \\rVert} \\\\ \\frac{x_3}{\\lVert \\boldsymbol{x} \\rVert} \\end{pmatrix} \$

\n

For this example we have $\\lVert \\boldsymbol{v+w} \\rVert =\\simplify[std]{sqrt({(a+c)^2+(b+d)^2+(f+g)^2})}$, hence:

\n

\\begin{align}
&&\\boldsymbol{z} = \\boldsymbol{v} + \\boldsymbol{w} &= \\begin{pmatrix} \\var{a+c} \\\\ \\var{b+d} \\\\ \\var{g+f} \\end{pmatrix} \\\\
\\implies && \\boldsymbol{u_z} &= \\frac{1}{\\sqrt{\\var{ssquares}}} \\begin{pmatrix} \\var{a+c} \\\\ \\var{b+d} \\\\ \\var{g+f} \\end{pmatrix} \\\1em] && &= \\begin{pmatrix} \\simplify[std]{{a+c}/sqrt({ssquares})} \\\\ \\simplify[std]{{b+d}/sqrt({ssquares})} \\\\ \\simplify[std]{{g+f}/sqrt({ssquares})} \\end{pmatrix} \\end{align} \n #### d) \n \\begin{align} \\var{a4}\\boldsymbol{v} &= \\simplify{vector({a4}*{a}, {a4}*{b}, {a4}*{g})} \\\\[1em] &= \\var{a4*vector(a,b,g)} \\end{align} \n \\begin{align} \\var{-b4}\\boldsymbol{v} &= \\simplify{vector({-b4}*{c}, {-b4}*{d}, {-b4}*{f})} \\\\[1em] &= \\var{-b4*vector(c,d,f)} \\end{align} \n #### e) \n Using the information above, the unit vector parallel to \\boldsymbol{v} is: \n \\[ \\boldsymbol{u_v} = \\begin{pmatrix} \\simplify[std]{{a}/sqrt({ssquaresA})} \\\\ \\simplify[std]{{b}/sqrt({ssquaresA})} \\\\ \\simplify[std]{{g}/sqrt({ssquaresA})} \\end{pmatrix} \

\n

and the unit vector anti-parallel to $\\boldsymbol{w}$ is:

\n

\$-\\boldsymbol{u_w} = \\begin{pmatrix} \\simplify[std]{{-c}/sqrt({ssquaresB})} \\\\ \\simplify[std]{{-d}/sqrt({ssquaresB})} \\\\ \\simplify[std]{{-f}/sqrt({ssquaresB})} \\end{pmatrix} \$

", "tags": [], "ungrouped_variables": ["b4", "q", "s3", "s2", "s1", "s5", "s4", "ssquares", "v1", "v2", "a4", "a", "c", "b", "d", "g", "f", "m", "n", "ssquaresb", "ssquaresa", "v"], "variable_groups": [], "preamble": {"js": "", "css": ""}, "metadata": {"description": "

Elementary operations on vectors; sum, modulus, unit vector, scalar multiple.

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"sortAnswers": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "type": "gapfill", "prompt": "

Calculate the following.

\n

$\\vert \\mathbf{v} \\vert=$ [[0]]

\n

\n

", "showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"checkVariableNames": false, "type": "jme", "variableReplacementStrategy": "originalfirst", "showPreview": true, "scripts": {}, "answerSimplification": "std", "marks": "0.25", "checkingAccuracy": 0.001, "showFeedbackIcon": true, "vsetRangePoints": 5, "failureRate": 1, "variableReplacements": [], "checkingType": "absdiff", "showCorrectAnswer": true, "vsetRange": [0, 1], "customMarkingAlgorithm": "", "unitTests": [], "answer": "sqrt({a^2+b^2+g^2})", "expectedVariableNames": [], "extendBaseMarkingAlgorithm": true}], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "extendBaseMarkingAlgorithm": true}, {"sortAnswers": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "type": "gapfill", "prompt": "

Let $\\mathbf{z}=\\mathbf{v}+\\mathbf{w}$.

\n

Calculate the unit vector $\\mathbf{\\hat{z}}$ in the direction of $\\mathbf{z}$. Write $\\mathbf{\\hat{z}}$ as a row vector.

\n

$\\mathbf{\\hat{z}}= \\big($ [[0]], [[1]], [[2]] $\\big)$

\n

You must enter your answers exactly, using the function sqrt(x) as necessary.

You are given the vectors

\n

\\begin{align}
\\mathbf{v} & =\\simplify[std]{vector({a},{b},{g})}, &
\\end{align}

\n

Enter your answers to the following questions exactly, using the function sqrt(x) if necessary.

"}, {"name": "MATH6005 Assessment 2_Q3of6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"showfrontpage": false, "preventleave": false, "allowregen": true}, "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/", "name": "Harry Flynn"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/", "name": "Violeta CIT"}], "type": "question", "advice": "

Note that in this advice, the full calculator display is used in the calculation of each step; any rounding is purely for display clarity.

\n

The dot product of two vectors $\\boldsymbol{a}=\\pmatrix{a_1,a_2,a_3}$ and $\\boldsymbol{b}=\\pmatrix{b_1,b_2,b_3}$ is given by

\n

\$\\boldsymbol{a\\cdot b}=a_1b_1+a_2b_2+a_3b_3\$

\n

\n

$\\lvert\\boldsymbol{a}\\rvert=\\sqrt{a_1^2+a_2^2+a_3^2}$ ,$\\lvert\\boldsymbol{b}\\rvert=\\sqrt{b_1^2+b_2^2+b_3^2}$ are the lengths of the vectors $\\boldsymbol{a}$ and $\\boldsymbol{b}$.

\n

\n

and so

\n

\$\\cos(\\theta)=\\frac{\\boldsymbol{a\\cdot b}}{\\lvert\\boldsymbol{a}\\rvert \\lvert\\boldsymbol{b}\\rvert}=\\frac{a_1b_1+a_2b_2+a_3b_3}{\\lvert\\boldsymbol{a}\\rvert \\lvert\\boldsymbol{b}\\rvert}.\$

\n

In part a) therefore, we have

\n

\$\\cos(\\theta)=\\frac{\\var{dot(a,b)}}{\\var{precround(lena,2)}\\times\\var{precround(lenb,2)}}=\\frac{\\var{dot(a,b)}}{\\var{precround(lena*lenb,2)}}=\\var{ans1} \\; \\text{to 2d.p.,}\$

\n

Which gives an angle $\\theta =\\var{ansrad}$ radians to 1 d.p.

", "tags": [], "ungrouped_variables": ["a", "lenb", "c", "b", "lenc", "d", "lend", "ans1", "ans2", "lena", "ansrad", "ansrad2", "dot_of_ab", "dot_of_cd"], "variable_groups": [], "preamble": {"js": "", "css": ""}, "metadata": {"description": "

Find the dot product and the angle between two vectors

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"sortAnswers": false, "marks": 0, "scripts": {}, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "prompt": "

$\\boldsymbol{a}=\\pmatrix{\\var{a[0]},\\var{a[1]},\\var{a[2]}}$ and $\\boldsymbol{b}=\\pmatrix{\\var{b[0]},\\var{b[1]},\\var{b[2]}}$

\n

$\\boldsymbol{a} \\cdot \\boldsymbol{b}=$ [[2]]

\n

$\\cos({\\theta})=$ [[0]]  (Give your answer to 2d.p.)

\n

$\\theta=$ [[1]](Give your answer, in radians, to 1d.p.)

Find the angle  $\\theta$  between the following pairs of vectors.

"}, {"name": "MATH6005 Assessment 2_Q4of6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"showfrontpage": false, "preventleave": false, "allowregen": true}, "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/", "name": "Newcastle University Mathematics and Statistics"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/", "name": "Violeta CIT"}], "type": "question", "advice": "

\\begin{align}
\\boldsymbol{v} \\times \\boldsymbol{w} &= \\begin{pmatrix} \\simplify[basic]{{b}*{f}-{g}*{d}} \\\\ \\simplify[basic]{{g}*{c}-{a}*{f}} \\\\ \\simplify[basic]{{a}*{d}-{b}*{c}}  \\end{pmatrix} \\\1em] &= \\var{result} \\end{align} ", "tags": [], "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "result", "s1", "s2", "s3", "s4", "s5"], "variable_groups": [], "preamble": {"js": "", "css": ""}, "metadata": {"description": " Given vectors \\boldsymbol{A,\\;B}, find \\boldsymbol{A\\times B} ", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"sortAnswers": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "type": "gapfill", "prompt": " Find \n \\boldsymbol{v} \\times \\boldsymbol{w} =  [[0]] ", "showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"allowFractions": true, "scripts": {}, "tolerance": 0, "marks": "1.5", "type": "matrix", "showFeedbackIcon": true, "correctAnswer": "result", "markPerCell": true, "correctAnswerFractions": false, "numColumns": 1, "showCorrectAnswer": true, "unitTests": [], "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "numRows": "3", "allowResize": false, "extendBaseMarkingAlgorithm": true, "variableReplacements": []}], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "extendBaseMarkingAlgorithm": true}], "variablesTest": {"maxRuns": 100, "condition": ""}, "functions": {}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variables": {"s1": {"definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s1", "description": "", "templateType": "anything"}, "d": {"definition": "s4*random(2..9)", "group": "Ungrouped variables", "name": "d", "description": "", "templateType": "anything"}, "s2": {"definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s2", "description": "", "templateType": "anything"}, "s5": {"definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s5", "description": "", "templateType": "anything"}, "g": {"definition": "s1*random(2..9)", "group": "Ungrouped variables", "name": "g", "description": "", "templateType": "anything"}, "f": {"definition": "random(2..9)", "group": "Ungrouped variables", "name": "f", "description": "", "templateType": "anything"}, "result": {"definition": "cross(vector(a,b,g),vector(c,d,f))", "group": "Ungrouped variables", "name": "result", "description": "", "templateType": "anything"}, "c": {"definition": "s3*random(2..9)", "group": "Ungrouped variables", "name": "c", "description": "", "templateType": "anything"}, "a": {"definition": "s1*random(2..9)", "group": "Ungrouped variables", "name": "a", "description": "", "templateType": "anything"}, "b": {"definition": "s2*random(2..9)", "group": "Ungrouped variables", "name": "b", "description": "", "templateType": "anything"}, "s4": {"definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s4", "description": "", "templateType": "anything"}, "s3": {"definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s3", "description": "", "templateType": "anything"}}, "statement": " You are given the vectors \\boldsymbol{v} = \\var{vector(a,b,g)}, \\boldsymbol{w} = \\var{vector(c,d,f)}. "}, {"name": "MATh6005 Assessment 2_Q5of6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"showfrontpage": false, "preventleave": false, "allowregen": true}, "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/", "name": "Clodagh Carroll"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/", "name": "Violeta CIT"}], "type": "question", "advice": "", "tags": [], "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "N", "n11", "n12", "n13", "n14", "n21", "n22", "n23", "n24", "n31", "n32", "n33", "n34"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "metadata": {"description": "", "licence": "None specified"}, "parts": [{"sortAnswers": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "type": "gapfill", "prompt": " Based on the matrix above, the system of equations has \n [[0]] ", "showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"choices": ["no solutions", "a unique solution", "infinitely many solutions"], "variableReplacementStrategy": "originalfirst", "matrix": ["0", "0.5", 0], "scripts": {}, "displayType": "radiogroup", "minMarks": 0, "marks": 0, "type": "1_n_2", "shuffleChoices": false, "showFeedbackIcon": true, "distractors": ["Incorrect - if there were no solutions, the last row would be \\left[ \\begin{matrix} 0 & 0 & 0 & \\neq 0 \\end{matrix} \\right]", "Correct - there is a unique solution, since the last row is \\left[ \\begin{matrix} 0 & 0 & \\var{n33} & \\var{n34} \\end{matrix} \\right] i.e. the 3rd entry is \\neq 0.", "Incorrect - if there were infinitely many solutions, the last row would be \\left[ \\begin{matrix} 0 & 0 & 0 & 0 \\end{matrix} \\right]"], "variableReplacements": [], "displayColumns": 0, "extendBaseMarkingAlgorithm": true, "showCellAnswerState": true, "customMarkingAlgorithm": "", "unitTests": [], "maxMarks": 0, "showCorrectAnswer": true}], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "extendBaseMarkingAlgorithm": true}, {"sortAnswers": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "type": "gapfill", "prompt": " In the case of a unique solution or infinitely many solutions, write down all solutions. Note, if there are an infinite number of solutions, use t to denote the free variable. \n If you stated that there were no solutions, simply write the text \n NA \n in each of the boxes below. \n x =  [[0]] \n y =  [[1]] \n z =  [[2]] \n ", "showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "showPreview": true, "scripts": {}, "variableReplacements": [], "expectedVariableNames": [], "type": "jme", "showFeedbackIcon": true, "vsetRangePoints": 5, "failureRate": 1, "unitTests": [], "checkingType": "absdiff", "marks": "0.5", "showCorrectAnswer": true, "checkingAccuracy": 0.001, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "answer": "{a}", "extendBaseMarkingAlgorithm": true}, {"checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "showPreview": true, "scripts": {}, "variableReplacements": [], "expectedVariableNames": [], "type": "jme", "showFeedbackIcon": true, "vsetRangePoints": 5, "failureRate": 1, "unitTests": [], "checkingType": "absdiff", "marks": "0.5", "showCorrectAnswer": true, "checkingAccuracy": 0.001, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "answer": "{b}", "extendBaseMarkingAlgorithm": true}, {"checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "showPreview": true, "scripts": {}, "variableReplacements": [], "expectedVariableNames": [], "type": "jme", "showFeedbackIcon": true, "vsetRangePoints": 5, "failureRate": 1, "unitTests": [], "checkingType": "absdiff", "marks": "0.5", "showCorrectAnswer": true, "checkingAccuracy": 0.001, "customMarkingAlgorithm": "", "vsetRange": [0, 1], "answer": "{c}", "extendBaseMarkingAlgorithm": true}], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "unitTests": [], "extendBaseMarkingAlgorithm": true}], "variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {}, "variables": {"n31": {"templateType": "anything", "definition": "0", "description": "", "name": "n31", "group": "Ungrouped variables"}, "n34": {"templateType": "anything", "definition": "{m}", "description": "", "name": "n34", "group": "Ungrouped variables"}, "n21": {"templateType": "number", "definition": "0", "description": "", "name": "n21", "group": "Ungrouped variables"}, "d": {"templateType": "anything", "definition": "random(2..8)", "description": "", "name": "d", "group": "Ungrouped variables"}, "n14": {"templateType": "anything", "definition": "{d}{a} +{f}{b} + {g}{c}", "description": "", "name": "n14", "group": "Ungrouped variables"}, "n23": {"templateType": "anything", "definition": "{j}", "description": "", "name": "n23", "group": "Ungrouped variables"}, "N": {"templateType": "anything", "definition": "matrix([{n11},{n12},{n13},{n14}],[{n21},{n22},{n23},{n24}],[{n31},{n32},{n33},{n34}])", "description": "", "name": "N", "group": "Ungrouped variables"}, "n24": {"templateType": "anything", "definition": "{k}", "description": "", "name": "n24", "group": "Ungrouped variables"}, "n32": {"templateType": "anything", "definition": "0", "description": "", "name": "n32", "group": "Ungrouped variables"}, "m": {"templateType": "anything", "definition": "{c}{l}", "description": "", "name": "m", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "definition": "random(-3..6)", "description": "", "name": "c", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "definition": "random(1..9)", "description": "", "name": "a", "group": "Ungrouped variables"}, "n11": {"templateType": "anything", "definition": "{d}", "description": "", "name": "n11", "group": "Ungrouped variables"}, "n33": {"templateType": "anything", "definition": "{l}", "description": "", "name": "n33", "group": "Ungrouped variables"}, "k": {"templateType": "anything", "definition": "{b}{h}+{j}{c}", "description": "", "name": "k", "group": "Ungrouped variables"}, "l": {"templateType": "anything", "definition": "random(2..7)", "description": "", "name": "l", "group": "Ungrouped variables"}, "n12": {"templateType": "anything", "definition": "{f}", "description": "", "name": "n12", "group": "Ungrouped variables"}, "g": {"templateType": "anything", "definition": "random(-2..3 except 0)", "description": "", "name": "g", "group": "Ungrouped variables"}, "n13": {"templateType": "anything", "definition": "{g}", "description": "", "name": "n13", "group": "Ungrouped variables"}, "n22": {"templateType": "anything", "definition": "{h}", "description": "", "name": "n22", "group": "Ungrouped variables"}, "f": {"templateType": "anything", "definition": "random(-1..4 except 0)", "description": "", "name": "f", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "definition": "random(-5..5)", "description": "", "name": "b", "group": "Ungrouped variables"}, "h": {"templateType": "anything", "definition": "random(-4..-1)", "description": "", "name": "h", "group": "Ungrouped variables"}, "j": {"templateType": "anything", "definition": "random(-2..6 except 0)", "description": "", "name": "j", "group": "Ungrouped variables"}}, "statement": " After performing row operations on the augmented matrix for a particular system of equations, we get the matrix \n \\[ \\left[ \\begin{matrix} \\var{n11} & \\var{n12} & \\var{n13} & \\var{n14}\\\\ \\var{n21} & \\var{n22} & \\var{n23} & \\var{n24} \\\\ \\var{n31} & \\var{n32} & \\var{n33} & \\var{n34} \\end{matrix} \\right] \

The separate items in the student's answer

", "name": "bits"}, {"definition": "settings[\"correctAnswer\"]", "description": "", "name": "expected_numbers"}, {"definition": "if(all(map(not isnan(x),x,interpreted_answer)),\n true,\n let(index,filter(isnan(interpreted_answer[x]),x,0..len(interpreted_answer)-1)[0], wrong, bits[index],\n warn(wrong+\" is not a valid number\");\n fail(wrong+\" is not a valid number.\")\n )\n )", "description": "

Is every number in the student's list valid?

Are the student's answers in ascending order?

", "name": "is_sorted"}, {"definition": "map(\n let(\n num_student,len(filter(x=y,y,interpreted_answer)),\n num_expected,len(filter(x=y,y,expected_numbers)),\n switch(\n num_student=num_expected,\n true,\n num_studentIs each number in the expected answer present in the student's list the correct number of times?

", "name": "included"}, {"definition": "all(included)", "description": "

Has every number been included the right number of times?

", "name": "all_included"}, {"definition": "if(all(map(x in expected_numbers, x, interpreted_answer)),\n true\n ,\n incorrect(filter(not (x in expected_numbers),x,interpreted_answer)[0]+\" is not in the list.\");\n false\n )", "description": "

True if the student's list doesn't contain any numbers that aren't in the expected answer.

", "name": "no_extras"}, {"definition": "map(\n if(settings[\"allowFractions\"],parsenumber_or_fraction(x,notationStyles), parsenumber(x,notationStyles))\n ,x\n ,bits\n)", "description": "A value representing the student's answer to this part.", "name": "interpreted_answer"}, {"definition": "if(studentanswer=\"\",fail(\"You have not entered an answer\"),false);\napply(valid_numbers);\napply(included);\napply(no_extras);\ncorrectif(all_included and no_extras)", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "name": "mark"}, {"definition": "[\"en\"]", "description": "", "name": "notationStyles"}], "source": {"pk": 2, "edit_page": "/part_type/2/edit", "author": {"pk": 7, "name": "Christian Lawson-Perfect"}}, "short_name": "list-of-numbers", "description": "

The answer is a comma-separated list of numbers.

\n

The list is marked correct if each number occurs the same number of times as in the expected answer, and no extra numbers are present.

", "input_options": {"allowEmpty": {"static": true, "value": false}, "hint": {"static": true, "value": "Enter a list of numbers separated by commas."}, "correctAnswer": "join(\n if(settings[\"correctAnswerFractions\"],\n map(let([a,b],rational_approximation(x), string(a/b)),x,settings[\"correctAnswer\"])\n ,\n settings[\"correctAnswer\"]\n ),\n \", \"\n)"}}], "resources": [], "navigation": {"showfrontpage": false, "preventleave": false, "allowregen": true}, "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/", "name": "Clodagh Carroll"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/", "name": "Violeta CIT"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/", "name": "Marie Nicholson"}], "advice": "", "tags": [], "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "h", "j", "N", "n11", "n12", "n13", "n14", "n21", "n22", "n23", "n24", "n31", "n32", "n33", "n34", "k", "r1", "r2"], "variable_groups": [{"variables": [], "name": "Unnamed group"}], "preamble": {"js": "", "css": ""}, "metadata": {"description": "", "licence": "None specified"}, "parts": [{"sortAnswers": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "type": "gapfill", "useCustomName": false, "showFeedbackIcon": true, "prompt": "

The system of equations has no solution when

\n

$k =$ [[0]]

", "adaptiveMarkingPenalty": 0, "variableReplacements": [], "gaps": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "vsetRangePoints": 5, "failureRate": 1, "adaptiveMarkingPenalty": 0, "variableReplacements": [], "checkingType": "absdiff", "showCorrectAnswer": true, "unitTests": [], "customMarkingAlgorithm": "", "vsetRange": [0, 1], "valuegenerators": [], "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "marks": "0.5", "showPreview": true, "type": "jme", "useCustomName": false, "showFeedbackIcon": true, "checkingAccuracy": 0.001, "customName": "", "answer": "{r2}"}], "showCorrectAnswer": true, "customName": "", "customMarkingAlgorithm": "", "unitTests": [], "extendBaseMarkingAlgorithm": true}, {"sortAnswers": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "type": "gapfill", "useCustomName": false, "showFeedbackIcon": true, "prompt": "

The system of equations has infinitely many solutions when

\n

$k =$ [[0]]

", "adaptiveMarkingPenalty": 0, "variableReplacements": [], "gaps": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "vsetRangePoints": 5, "failureRate": 1, "adaptiveMarkingPenalty": 0, "variableReplacements": [], "checkingType": "absdiff", "showCorrectAnswer": true, "unitTests": [], "customMarkingAlgorithm": "", "vsetRange": [0, 1], "valuegenerators": [], "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "marks": "0.5", "showPreview": true, "type": "jme", "useCustomName": false, "showFeedbackIcon": true, "checkingAccuracy": 0.001, "customName": "", "answer": "{r1}"}], "showCorrectAnswer": true, "customName": "", "customMarkingAlgorithm": "", "unitTests": [], "extendBaseMarkingAlgorithm": true}, {"sortAnswers": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "type": "gapfill", "useCustomName": false, "showFeedbackIcon": true, "prompt": "

The system of equations has a unique solution when

\n

$k \\neq$ [[0]]

", "adaptiveMarkingPenalty": 0, "variableReplacements": [], "gaps": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "settings": {"correctAnswer": "[{r1}, {r2}]", "correctAnswerFractions": false, "allowFractions": false}, "marks": "0.5", "type": "list-of-numbers", "useCustomName": false, "showFeedbackIcon": true, "adaptiveMarkingPenalty": 0, "variableReplacements": [], "showCorrectAnswer": true, "customName": "", "customMarkingAlgorithm": "", "unitTests": [], "extendBaseMarkingAlgorithm": true}], "showCorrectAnswer": true, "customName": "", "customMarkingAlgorithm": "", "unitTests": [], "extendBaseMarkingAlgorithm": true}, {"sortAnswers": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "type": "gapfill", "useCustomName": false, "showFeedbackIcon": true, "prompt": "

In the case of infinitely many solutions, find the solutions.  Use t to denote the free varible

\n

Write your answer as fractions $\\frac{p}{q}$ or whole numbers (no decimal fractions).

\n

$x =$ [[0]]

\n

$y =$ [[1]]

\n

$z =$ [[2]]

\n

\$\\left[ \\begin{matrix} \\var{n11} & \\var{n12} & \\var{n13}-\\var{n34}k & \\var{n14}\\\\ \\var{n21} & \\var{n22} & \\var{n23}k & \\var{n24} \\\\ \\var{n31} & \\var{n32} & \\var{n33}(k-\\var{r1})(k-\\var{r2}) & -(k -\\var{r1}) \\end{matrix} \\right] \$