// Numbas version: exam_results_page_options {"name": "Duality", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Duality", "tags": [], "metadata": {"description": "

GIve a random linear program and ask the students to convert it to canonical form.

", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "statement": "

Find the dual problem for the following linear program:

\n

\\[\\begin{gathered}
\\var{{optimise}}\\text{ } \\var{objective} \\text{ subject to }\\\\
\\var{system}
\\end{gathered}\\]

\n

\\[x_i≥0, \\forall j\\in \\var{Jp}\\]

\n

\\[x_j≤0, \\forall j\\in \\var{Jn}\\]

", "advice": "

In order to convert a problem to canonical form, we need to perform the following changes

\n
    \n
  1. The objective should be maximised.
  2. \n
  3. All variables should be positive.
  4. \n
  5. All constraints should be in the form ≤
  6. \n
\n

\\[\\begin{gathered}
\\var{{optimise}}\\text{ } \\var{objective} \\text{ subject to }\\\\
\\var{system}
\\end{gathered}\\]

\n

\\[x_i≥0, \\forall\\in \\var{Jp}\\]

\n

\\[x_j≤0, \\forall j\\in \\var{Jn}\\]

\n

\n

The dual problem is:

\n

\\[\\begin{gathered}
\\var{optimised}\\text{ } \\var{objectived} \\text{ subject to }\\\\
\\var{systemd}
\\end{gathered}\\]

\n

\\[y_i≥0, \\forall\\in \\var{Jdp}\\]

\n

\\[y_j≤0, \\forall j\\in \\var{Jdn}\\]

\n

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"nvar": {"name": "nvar", "group": "Parameters", "definition": "random(3..5)", "description": "

Number of variables in the system.

", "templateType": "anything", "can_override": true}, "positivity": {"name": "positivity", "group": "Parameters", "definition": "repeat(random([\"\u22640\",\"free\",\"\u22650\"]),nvar)", "description": "

Positivity of each variable: -1 means nonpositive, 1 means nonnegative and 0 means free variable.

", "templateType": "anything", "can_override": false}, "ncons": {"name": "ncons", "group": "Parameters", "definition": "random(5..8)", "description": "

Number of constraints in the system.

", "templateType": "anything", "can_override": true}, "A": {"name": "A", "group": "Parameters", "definition": "repeat(repeat(random(-5..5),nvar),ncons)", "description": "

Constraint matrix (left hand side).

", "templateType": "anything", "can_override": false}, "x": {"name": "x", "group": "Primal Problem", "definition": "map(\"x{i}\",i,1..nvar)", "description": "

Variable names for the primal problem.

", "templateType": "anything", "can_override": false}, "L": {"name": "L", "group": "Primal Problem", "definition": "map(join(map(\"{a}*{v}\",[v,a],zip(x,r)),\"+\"),r,A)", "description": "

Left hand sides for the primal, in equation form.

", "templateType": "anything", "can_override": false}, "Cp": {"name": "Cp", "group": "Primal Problem", "definition": "map(\"{l} {d} {r}\",[l,d,r],zip(L,direction,b))", "description": "

The constraints of the primal, in equation form.

", "templateType": "anything", "can_override": false}, "direction": {"name": "direction", "group": "Parameters", "definition": "repeat(random([\"\u2265\",\"=\",\"\u2264\"]),ncons)", "description": "

Directions of the constraints.

", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Parameters", "definition": "repeat(random(-5..5),ncons)", "description": "

Right hand side of the constraints.

", "templateType": "anything", "can_override": false}, "Constraints": {"name": "Constraints", "group": "Primal Problem", "definition": "map(simplify(expression(v),[\"all\"]),v,Cp)", "description": "

The constraints of the primal, in mathematical expressions.

", "templateType": "anything", "can_override": false}, "system": {"name": "system", "group": "Primal Problem", "definition": "systema", "description": "

Latex representation of the constraints of the primal.

", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "Parameters", "definition": "repeat(random(-5..5),nvar)", "description": "

Cost vector

", "templateType": "anything", "can_override": false}, "optimise": {"name": "optimise", "group": "Parameters", "definition": "random([\"maximise\", \"minimise\"])", "description": "

Optimisation direction.

", "templateType": "anything", "can_override": true}, "objective_string": {"name": "objective_string", "group": "Primal Problem", "definition": "join(map(\"{a}*{v}\",[v,a],zip(x,c)),\"+\")", "description": "

A string represneting the objective of the primal.

", "templateType": "anything", "can_override": false}, "objective": {"name": "objective", "group": "Primal Problem", "definition": "simplify(expression(objective_string),['all'])", "description": "

The objective function of the primal problem.

", "templateType": "anything", "can_override": false}, "Jp": {"name": "Jp", "group": "Primal Problem", "definition": "set(map(k+1,k,indices(positivity, Nonnegativitycodes[2])))", "description": "

List of nonnegative variables in the pimal problem.

", "templateType": "anything", "can_override": false}, "Jn": {"name": "Jn", "group": "Primal Problem", "definition": "set(map(k+1,k,indices(positivity, Nonnegativitycodes[0])))", "description": "

List of nonpositive variables in the primal problem.

", "templateType": "anything", "can_override": false}, "Mv": {"name": "Mv", "group": "Dual Problem", "definition": "map(map(if(p=nonnegativitycodes[2], [x], if(p=nonnegativitycodes[0], [-x], [x,-x])), [p, x], zip(positivity, R)), R, A)", "description": "", "templateType": "anything", "can_override": false}, "cstudent": {"name": "cstudent", "group": "Ungrouped variables", "definition": "b", "description": "", "templateType": "anything", "can_override": false}, "objectived_string": {"name": "objectived_string", "group": "Dual Problem", "definition": "join(map(\"{a}*{v}\",[v,a],zip(y,b)),\"+\")", "description": "", "templateType": "anything", "can_override": false}, "y": {"name": "y", "group": "Dual Problem", "definition": "map(\"y{i}\",i,1..ncons)", "description": "", "templateType": "anything", "can_override": false}, "objectived": {"name": "objectived", "group": "Dual Problem", "definition": "simplify(expression(objectived_string),['all'])", "description": "", "templateType": "anything", "can_override": false}, "Cpd": {"name": "Cpd", "group": "Dual Problem", "definition": "map(\"{l} {d} {r}\",[l,d,r],zip(Ld,directionv,c))", "description": "", "templateType": "anything", "can_override": false}, "Ld": {"name": "Ld", "group": "Dual Problem", "definition": "map(join(map(\"{a}*{v}\",[v,a],zip(y,r)),\"+\"),r,Ad)", "description": "", "templateType": "anything", "can_override": false}, "Constraintsd": {"name": "Constraintsd", "group": "Dual Problem", "definition": "map(simplify(expression(v),[\"all\"]),v,Cpd)", "description": "", "templateType": "anything", "can_override": false}, "Systemd": {"name": "Systemd", "group": "Dual Problem", "definition": "latex(show_system(Constraintsd, [\"all\"]))", "description": "", "templateType": "anything", "can_override": false}, "max_conversion": {"name": "max_conversion", "group": "Ungrouped variables", "definition": "[[\"\u2265\", \"\u22640\"],[\"=\", \"free\"],[\"\u2264\", \"\u22650\"], [\"\u22640\", \"\u2264\"], [\"free\", \"=\"], [\"\u22650\", \"\u2265\"],[\"maximise\", \"minimise\"]]", "description": "", "templateType": "anything", "can_override": false}, "min_conversion": {"name": "min_conversion", "group": "Ungrouped variables", "definition": "map([x,y] -> [y,x], max_conversion)", "description": "", "templateType": "anything", "can_override": false}, "conversion": {"name": "conversion", "group": "Ungrouped variables", "definition": "dict(map([x,y] -> [\"{x}\",y],if(optimise=\"maximise\",max_conversion, min_conversion)))", "description": "", "templateType": "anything", "can_override": false}, "Ad": {"name": "Ad", "group": "Dual Problem", "definition": "transpose(A)", "description": "", "templateType": "anything", "can_override": false}, "Jdn": {"name": "Jdn", "group": "Dual Problem", "definition": "map(k->k+1,set(indices(map(x->conversion[x] = nonnegativitycodes[0], direction),true)))", "description": "", "templateType": "anything", "can_override": false}, "Jdp": {"name": "Jdp", "group": "Dual Problem", "definition": "map(k->k+1,set(indices(map(x->conversion[x] = nonnegativitycodes[2], direction),true)))", "description": "", "templateType": "anything", "can_override": false}, "directionv": {"name": "directionv", "group": "Dual Problem", "definition": "map(x->conversion[\"{x}\"], positivity)", "description": "", "templateType": "anything", "can_override": false}, "optimised": {"name": "optimised", "group": "Dual Problem", "definition": "conversion[optimise]", "description": "", "templateType": "anything", "can_override": false}, "Adlt": {"name": "Adlt", "group": "Dual Problem", "definition": "matrix(map(Ad[k]+[c[k]],k,indices(directionv,\"\u2264\")))", "description": "", "templateType": "anything", "can_override": false}, "Adgt": {"name": "Adgt", "group": "Dual Problem", "definition": "matrix(map(Ad[k]+[c[k]],k,indices(directionv,\"\u2265\")))", "description": "", "templateType": "anything", "can_override": false}, "Adeq": {"name": "Adeq", "group": "Dual Problem", "definition": "matrix(map(Ad[k]+[c[k]],k,indices(directionv,\"=\")))", "description": "", "templateType": "anything", "can_override": false}, "test": {"name": "test", "group": "Test", "definition": "2//same_systems([Adlt, Adgt, Adeq],vector(b),[Jdp,Jdn],[A1,A2,A3],c1,[J1,J2])", "description": "", "templateType": "anything", "can_override": false}, "I1": {"name": "I1", "group": "Test", "definition": "matrix(map(k -> Id(ncons)[k], reorder))", "description": "", "templateType": "anything", "can_override": false}, "A1": {"name": "A1", "group": "Test", "definition": "if(length(Adlt)=0,Adlt,Adlt*I2)", "description": "", "templateType": "anything", "can_override": false}, "A2": {"name": "A2", "group": "Test", "definition": "if(length(Adgt)=0,Adgt,Adgt*I2)", "description": "", "templateType": "anything", "can_override": false}, "A3": {"name": "A3", "group": "Test", "definition": "if(length(Adeq)=0,Adeq,Adeq*I2)", "description": "", "templateType": "anything", "can_override": false}, "I2": {"name": "I2", "group": "Test", "definition": "combine_diagonally(I1,matrix([1]))", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Test", "definition": "vector(b)*I1", "description": "", "templateType": "anything", "can_override": false}, "J1": {"name": "J1", "group": "Test", "definition": "set(map(k -> reorder[k-1]+1, Jdp))", "description": "", "templateType": "anything", "can_override": false}, "reorder": {"name": "reorder", "group": "Test", "definition": "shuffle(0..ncons-1)", "description": "", "templateType": "anything", "can_override": false}, "J2": {"name": "J2", "group": "Test", "definition": "set(map(k -> reorder[k-1]+1, Jdn))", "description": "", "templateType": "anything", "can_override": false}, "nonnegativityCodes": {"name": "nonnegativityCodes", "group": "Ungrouped variables", "definition": "[\"\u22640\",\"free\",\"\u22650\"]", "description": "

Positivity of each variable: -1 means nonpositive, 1 means nonnegative and 0 means free variable.

", "templateType": "anything", "can_override": false}, "systema": {"name": "systema", "group": "Primal Problem", "definition": "latex(latexconstraints(A,direction,b,map(s->latex(expression(s)),x)))", "description": "

A latex representation of the constraints of the primal, where the variables are aligned.

", "templateType": "anything", "can_override": false}, "systemb": {"name": "systemb", "group": "Primal Problem", "definition": "latex(show_system(Constraints, [\"all\"]))", "description": "

A latex representation of the constraints of the primal, where the variables are not aligned.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "1000"}, "ungrouped_variables": ["cstudent", "max_conversion", "min_conversion", "conversion", "nonnegativityCodes"], "variable_groups": [{"name": "Parameters", "variables": ["nvar", "ncons", "positivity", "A", "b", "direction", "C", "optimise"]}, {"name": "Primal Problem", "variables": ["x", "L", "Cp", "Constraints", "system", "objective_string", "objective", "Jp", "Jn", "systema", "systemb"]}, {"name": "Dual Problem", "variables": ["y", "Ad", "Mv", "objectived_string", "objectived", "Ld", "Cpd", "Constraintsd", "Systemd", "Jdn", "Jdp", "directionv", "optimised", "Adlt", "Adgt", "Adeq"]}, {"name": "Test", "variables": ["reorder", "I1", "I2", "A1", "A2", "A3", "c1", "J1", "J2", "test"]}], "functions": {"show_system": {"parameters": [["system", "list of expression"], ["rules", "list of string"]], "type": "string", "language": "javascript", "definition": "const latex = Numbas.jme.display.treeToLaTeX\nconst bscope = Numbas.jme.builtinScope\n//console.log(latex)\n\nconst strings = system.map(s => latex(s,rules.filter(x => x !== \"aligned\"), bscope))\n\nif(rules.includes(\"aligned\")){\nconst alignedstrings = strings.map(s => s.replace(/(=|\\\\[gl]eq)/,\"&$1\")).map(s => s.replace(/(?<=.)([+-])/g,\"&$1\"))\nreturn \"\\\\begin{aligned}\"+alignedstrings.join(\"\\\\\\\\\")+\"\\\\end{aligned}\"\n}\n\nreturn \"\\\\begin{gathered}\"+strings.join(\"\\\\\\\\\")+\"\\\\end{gathered}\""}, "same_systems": {"parameters": [["AugmentedA", "list of matrix"], ["c", "matrix"], ["Ja", "list of list"], ["AugmentedM", "list of matrix"], ["u", "matrix"], ["Jm", "list of list"]], "type": "boolean", "language": "javascript", "definition": "/* This function compares two systems of the form `Ax\u2264b` and `My\u2264u`, and objectives `cx` and `vy`. The order of rows and columns in the matrices are shuffled (with the corresponding shuffles in the left hand side and objective vectors).\n\nIn case of mismatch we just return an empty matrix.\n*/\n\nconsole.log(\"Starting maching\")\n\nfunction rowmatch(x,y){\n return x[1]===y[1] && x[0].every(e => y[0].some(f => f==e))\n}\n\nJm = [Jm[0][0], Jm[1][0]]\n\n/* Check that the number of columns is the same for all (nonempty) systems. */\nconst ncolumns = c[0].length\nfor(let i=u[0].length; i {if(M.length>0 && M[0].length>0 && M[0].length != ncolumns + 1) return false})\n\ncolRange = [...Array(ncolumns).keys()]\n\n/* Split the left and right hand sides of the matrices. */\nconst Alist = AugmentedA.map(Q => Q.map(R => [[...Array(R.length-1).keys()].map(i => R[i]), R[R.length-1]]))\n//const blist = AugmentedA.map(Q => Q.map(R => R[ncolumns]))\n\nconst Mlist = AugmentedM.map(Q => Q.map(R => [[...Array(R.length-1).keys()].map(i => R[i]), R[R.length-1]]))\n//const ulist = AugmentedM.map(Q => Q.map(R => R[ncolumns]))\n\nfor(let M of Mlist){\n for(let R of M){\n for(let i=R[0].length; i [A,Mlist[n]])\n\n/* First step: identify the possible correspondence in rows from M. To do that we take every row of M and find the row of `A` that contains all the same values (not necessarily in the same order). There might be several.*/\nlet T1 = []\nfor( let [A,M] of zippedLists) {\n let T = []\n for (let R of A){\n const matchind = [...M.keys()].filter( k => rowmatch(M[k],R))\n /* At this point, if a row doesn't have a match we can stop.*/\n if(matchind.length == 0) {return false}\n T.push(matchind)\n }\n T1.push(T)\n}\n\n/* Second step: match the columns. We filter out the rows that are fully identified (only one match) and check the columns so that all the parameters match.*/\nlet T2 = []\nfor(let k=0;k< ncolumns;k++){\n let match = false\n for(let j=0; j i==k+1) == Jm[n].some( i => i==j+1))\n }\n for(let S=0; S p.length>1 || A[q][0][j] === M[p[0]][0][k] )\n }\n if(match){T2.push(j)}\n }\n /* If a column doesn't have a match we can stop.*/\n if(!match){return false}\n}\n\n\n/* All that's left is to check the rows we haven't checked because they had multiple matches. */\nlet T3 = []\nT1.forEach( (T,S) => { /* Look at the S-th system */\n const A = Alist[S][0]\n const M = Mlist[S][0]\n let TT = []\n T.forEach( (t,k) => { /* Look at the k-th row */\n if(t.length === 1){TT.push(t[0])}\n else{\n let ind = t.find(m => A[k].every((e,i) => e === M[m][T2[i]]));\n }\n })\n T3.push(TT)\n})\n\nreturn true\n "}, "isempty": {"parameters": [["M", "matrix"]], "type": "boolean", "language": "javascript", "definition": "return M.length === 0 || M[0].length === 0"}, "logme": {"parameters": [["A", "?"]], "type": "boolean", "language": "javascript", "definition": "console.log(A)\nreturn true"}, "latexconstraints": {"parameters": [["lhs", "list of list"], ["dir", "list of string"], ["rhs", "list of number"], ["vnames", "list of string"]], "type": "string", "language": "javascript", "definition": "var s = \"\\\\begin{aligned}\"\n\nvar ncons = lhs.length\nvar nvar = vnames.length\n\nfor(var c=0;c 0) ? \"+\" : \"-\"\n s += Math.abs(lhs[c][v])\n s += vnames[v]\n }\n }\n s += \" & \" + dir[c];\n s += rhs[c] + \"\\\\\\\\\"\n}\ns += \"\\\\end{aligned}\"\nreturn s"}}, "preamble": {"js": "", "css": ".equation .matrix-input .matrix .cell:nth-of-type(1)::after { content: ' y\u2081 ';}\n.equation .matrix-input .matrix .cell:nth-of-type(2)::after { content: ' y\u2082 ';}\n.equation .matrix-input .matrix .cell:nth-of-type(3)::after { content: ' y\u2083 ';}\n.equation .matrix-input .matrix .cell:nth-of-type(4)::after { content: ' y\u2084 ';}\n.equation .matrix-input .matrix .cell:nth-of-type(5)::after { content: ' y\u2085 ';}\n.equation .matrix-input .matrix .cell:nth-of-type(6)::after { content: ' y\u2086 ';}\n.equation .matrix-input .matrix .cell:nth-of-type(7)::after { content: ' y\u2087 ';}\n.equation .matrix-input .matrix .cell:nth-of-type(8)::after { content: ' y\u2088 ';}\n.equation .matrix-input .matrix .cell:nth-of-type(9)::after { content: ' y\u2089 ';}\n\n.matrix-input .matrix .cell:not(:first-of-type)::before { content: ' + ';}\n\n.indices .matrix-input .matrix .cell:not(:first-of-type)::before { content: ' , ';}\n\n.constraints .lessthan .matrix-input .matrix .cell:last-of-type::before { content: ' \u2264 ';}\n.constraints .equalities .matrix-input .matrix .cell:last-of-type::before { content: ' = ';}\n.constraints .greaterthan .matrix-input .matrix .cell:last-of-type::before { content: ' \u2265 ';}\n\n.constraints .matrix-input .matrix .cell:last-of-type::after { content: '';}\n\n\n.matrix-input .matrix .cell {\n margin-right: 0;\n padding-right: 0;\n}\n\n\n.matrix-input .left-bracket, .matrix-input .right-bracket {\n display: none !important;\n}\n"}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Dual Problem", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "gap_feedback (Feedback on each of the gaps):\n correctif(same_systems([Adlt, Adeq, Adgt],matrix(b),[Jdp,Jdn],[answers[2],answers[3],answers[4]],answers[1],[list(answers[5]),list(answers[6])]))\n\nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n apply(answers);\n //logme(answers);\n apply(gap_feedback)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

[[0]] [[1]]

\n

subject to

\n
\n

Set the number of rows/columns to 0 manually if a constraint type does not exist in the dual.

\n

Less than (≤) constraints

\n
\n

[[2]]

\n
\n

Equality constraints

\n
\n

[[3]]

\n
\n

Greater than (≥) constraints

\n
\n

[[4]]

\n
\n
\n
\n

$y_j≥0, ∀j∈${[[5]]}.

\n

$y_j≤0, ∀j∈${[[6]]}.

\n
", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "optimise", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["maximise", "minimise"], "matrix": ["if(optimised=\"maximise\",1,0)", "if(optimised=\"minimise\",1,0)"], "distractors": ["", ""]}, {"type": "matrix", "useCustomName": true, "customName": "c", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix(cstudent)", "correctAnswerFractions": false, "numRows": "1", "numColumns": "1", "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": "10", "minRows": 1, "maxRows": "1", "prefilledCells": ""}, {"type": "matrix", "useCustomName": true, "customName": "lessthan", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "value:\n cstudent[0]\n\nstudent_objective:\n true\n //vector(map(c -> parsenumber(c,allowedNotationStyles), cstudent))\n\nsame_system (compare the sytem entered by the student with the correct one):\n same_systems(AA, vector(cc), studentMatrix, cstudent[0])\n\ncheck_system (check that the sytem is correct):\n apply(same_system);\n //if(same_system = true,correct(\"Your answer is correct\"); end(),incorrect(\"Your answer is incorrect.\");end());\n correctif(same_system);end()\n assert(same_system, \n incorrect(\"You did not enter the correct system\");\n end())\n\nmark:\n apply(any_empty);\n apply(any_invalid);\n //assert(settings[\"precisionType\"]=\"none\" and not settings[\"allowFractions\"], apply(all_same_precision));\n //apply(wrong_size);\n apply(same_system);\n correctif(same_system=true)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [{"variable": "cstudent", "part": "p0g1", "must_go_first": true}], "variableReplacementStrategy": "alwaysreplace", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "Adlt", "correctAnswerFractions": false, "numRows": "1", "numColumns": "2", "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": "0", "maxColumns": "10", "minRows": "0", "maxRows": 0, "prefilledCells": ""}, {"type": "matrix", "useCustomName": true, "customName": "equalities", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "Adeq", "correctAnswerFractions": false, "numRows": 1, "numColumns": "2", "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": "0", "maxRows": 0, "prefilledCells": ""}, {"type": "matrix", "useCustomName": true, "customName": "greatherthan", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "Adgt", "correctAnswerFractions": false, "numRows": 1, "numColumns": "2", "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": "0", "maxRows": 0, "prefilledCells": ""}, {"type": "matrix", "useCustomName": true, "customName": "Nonnegative Variables", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix(Jdp)", "correctAnswerFractions": false, "numRows": 1, "numColumns": 1, "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": "0", "maxColumns": 0, "minRows": "0", "maxRows": "1", "prefilledCells": ""}, {"type": "matrix", "useCustomName": true, "customName": "Nonpositive Variables", "marks": "0", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix(Jdn)", "correctAnswerFractions": false, "numRows": 1, "numColumns": 1, "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": "0", "maxColumns": 0, "minRows": "0", "maxRows": "1", "prefilledCells": ""}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Julien Ugon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3575/"}]}]}], "contributors": [{"name": "Julien Ugon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3575/"}]}