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

Einige Beispiele zum Umgang mit mehrdeutigen Lösungen in NUMBAS.

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

Mehrdeutige Lösungen

\n

Die unten stehenden Aufgaben haben jeweils verschiedene Lösungen. Um diese zu prüfeen, ist es in NUMBAS erforderlich, mit einem \"Custom Marking Algorithm\" zu arbeiten.

", "advice": "

Lösung zu a):

\n

Man erkennt leicht,  dass der Flächeninhalt $\\var{n}$ ein Vielfaches von Fünf ist (letzte Stelle ist ein 5er), somt wählt man $a=5,b=\\var{n/5}$.

\n

Es gibt andere Lösungen, z.B. $a=\\var{a},b=\\var{b}$.

\n

Für die triviale Lösung $a=1,b=\\var{n}$ gibt es nur die halbe Punktzahl.

\n

Lösung zu b):

\n

Nach der \"Kipp-Regel\" findet man jedenfalls die Lösungen $\\vec{n_1}=\\var{vector(-p[1],p[0])}$ und $\\vec{n_2}=\\var{vector(p[1],-p[0])}$. 

\n

Auch alle Vielfachen dieser Vektoren sind korrekte Lösungen.

\n

Für die triviale Lösung $\\vec{n_0}=\\vec{0}=\\begin{pmatrix}0\\\\0\\end{pmatrix}$ gibt es nur die halbe Punktzahl.

\n

Lösung zu c):

\n

Gemäß dem Lemma von Bezout existieren jedenfalls Zahlen $x,y\\in\\mathbb{Z}$, so dass $x\\cdot\\var{other}+y\\cdot\\var{prim}=\\operatorname{ggT}(\\var{other},\\var{prim})$ gilt.

\n

Solche Zahlen findet man sicher mit dem erweiterten Euklidischen Algorithmus.

\n

Fängt man mit diesem an, so sieht man allerdings bereits im ersten Schritt, dass $\\var{other}=\\var{-sschlau}\\cdot\\var{prim}+\\var{rest}\\quad\\Leftrightarrow\\quad 1\\cdot\\var{other}\\var{sschlau}\\cdot\\var{prim}=\\var{rest}$ gilt, somit ist also $r=1, s=\\var{sschlau}$.

\n

Man kann auch stumpf bis zum Ende den Algorithmus weiterrechnen, das führt zur Gleichung $\\var{bezout[1]}\\cdot\\var{other}+(\\var{bezout[2]})\\cdot\\var{prim}=1$, die man mit $\\var{rest}$ multipliziert und somit als weitere mögliche Lösung $r=\\var{rdumm}, s=\\var{sdumm}$ erhält.

\n

", "rulesets": {}, "extensions": [], "variables": {"n": {"name": "n", "group": "Aufgabenteil a)", "definition": "a*b", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Aufgabenteil a)", "definition": "random(3,7,11)^2*5", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Aufgabenteil a)", "definition": "random(7,11,13)", "description": "", "templateType": "anything"}, "p": {"name": "p", "group": "Aufgabenteil b)", "definition": "vector(shuffle([-5,-4,-3,-2,-1,1,2,3,4,5])[0..2])", "description": "", "templateType": "anything"}, "q": {"name": "q", "group": "Aufgabenteil b)", "definition": "vector(p[1],-p[0])", "description": "", "templateType": "anything"}, "prim": {"name": "prim", "group": "Aufgabenteil c)", "definition": "random(47,53,59,61,67,71,73,79,83,89)", "description": "", "templateType": "anything"}, "other": {"name": "other", "group": "Aufgabenteil c)", "definition": "-sschlau*prim+rest", "description": "", "templateType": "anything"}, "rest": {"name": "rest", "group": "Aufgabenteil c)", "definition": "random(3,5,7)", "description": "", "templateType": "anything"}, "bezout": {"name": "bezout", "group": "Aufgabenteil c)", "definition": "euclid_gcd(other,prim)", "description": "", "templateType": "anything"}, "rdumm": {"name": "rdumm", "group": "Aufgabenteil c)", "definition": "rest*bezout[1]", "description": "", "templateType": "anything"}, "sdumm": {"name": "sdumm", "group": "Aufgabenteil c)", "definition": "rest*bezout[2]", "description": "", "templateType": "anything"}, "sschlau": {"name": "sschlau", "group": "Aufgabenteil c)", "definition": "-random(2..4)", "description": "", "templateType": "anything"}, "rschlau": {"name": "rschlau", "group": "Aufgabenteil c)", "definition": "1", "description": "", "templateType": "anything"}, "ggT": {"name": "ggT", "group": "Aufgabenteil c)", "definition": "bezout[0]", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Aufgabenteil a)", "variables": ["n", "a", "b"]}, {"name": "Aufgabenteil b)", "variables": ["p", "q"]}, {"name": "Aufgabenteil c)", "variables": ["prim", "other", "rest", "bezout", "rdumm", "sdumm", "sschlau", "rschlau", "ggT"]}], "functions": {"euclid_gcd": {"parameters": [["a", "number"], ["b", "number"]], "type": "anything", "language": "javascript", "definition": " a = +a;\n b = +b;\n if (a !== a || b !== b) {\n return [NaN, NaN, NaN];\n }\n \n if (a === Infinity || a === -Infinity || b === Infinity || b === -Infinity) {\n return [Infinity, Infinity, Infinity];\n }\n // Checks if a or b are decimals\n if ((a % 1 !== 0) || (b % 1 !== 0)) {\n return false;\n }\n var signX = (a < 0) ? -1 : 1,\n signY = (b < 0) ? -1 : 1,\n x = 0,\n y = 1,\n u = 1,\n v = 0,\n q, r, m, n;\n a = Math.abs(a);\n b = Math.abs(b);\n\n while (a !== 0) {\n q = Math.floor(b / a);\n r = b % a;\n m = x - u * q;\n n = y - v * q;\n b = a;\n a = r;\n x = u;\n y = v;\n u = m;\n v = n;\n }\n return [b, signX * x, signY * y];"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "mark:\n assert(interpreted_answer[0] = floor(interpreted_answer[0]) and\n interpreted_answer[1] = floor(interpreted_answer[1]),\n fail(\"Bitte nur ganzzahlige L\u00f6sungen!\"));\n assert(interpreted_answer[0] > 0 and interpreted_answer[1] > 0,\n fail(\"Seitenl\u00e4ngen d\u00fcrfen nicht negativ sein!\"));\n correctif(interpreted_answer[0] * interpreted_answer[1] = n);\n assert(interpreted_answer[0] > 1 and\n interpreted_answer[1] > 1,\n sub_credit(0.5, \"Eine Seitenl\u00e4nge 1 ist fad!\"))\n ", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Ein Rechteck hat den Flächeninhalt $A=\\var{n}\\,$Flächeneinheiten.

\n

Geben Sie mögliche ganzzahlige Seitenlängen $a,b$ an, die dieses Rechteck haben kann.

\n

$a=$[[0]] $\\qquad b=$[[1]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "a", "maxValue": "a", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain-eu"], "correctAnswerStyle": "plain-eu"}, {"type": "numberentry", "useCustomName": true, "customName": "b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "b", "maxValue": "b", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain-eu"], "correctAnswerStyle": "plain-eu"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "mark:\n correctif(dot(interpreted_answer[0],p) = 0); \n assert(interpreted_answer[0]<>matrix([0],[0]),sub_credit(0.5,\"Nullvektor is fad!\"))", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Gegeben ist der Vektor $\\vec{p}=\\var{p}$.

\n

Geben Sie einen Normalvektor $\\vec{n}$ zu $p$ an!

\n

$\\vec{n}=$[[0]]

", "gaps": [{"type": "matrix", "useCustomName": true, "customName": "Normalvektor", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "q", "correctAnswerFractions": false, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "mark:\n assert(interpreted_answer[0] = floor(interpreted_answer[0]) and\n interpreted_answer[1] = floor(interpreted_answer[1]),\n fail(\"Nur ganze Zahlen erlaubt.\"));\n correctif(interpreted_answer[0] * other + interpreted_answer[1] * prim = rest)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Bestimmen Sie Zahlen $r,s\\in\\mathbb{Z}$, so dass $r\\cdot\\var{other}+ s\\cdot\\var{prim}=\\var{rest}$ gilt.

\n

$r=$[[0]] ,$\\qquad s=$[[1]]

", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "r", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "rschlau", "maxValue": "rschlau", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain-eu"], "correctAnswerStyle": "plain-eu"}, {"type": "numberentry", "useCustomName": true, "customName": "s", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "sschlau", "maxValue": "sschlau", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": 0, "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain-eu"], "correctAnswerStyle": "plain-eu"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Andreas Vohns", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3622/"}]}]}], "contributors": [{"name": "Andreas Vohns", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3622/"}]}