// Numbas version: finer_feedback_settings {"name": "Induktion (Fibonacci-Zahlen)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Induktion (Fibonacci-Zahlen)", "tags": [], "metadata": {"description": "

An induction problem concerning the Fibonacci sequence.

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

Wir definieren die Folge der Fibonacci-Zahlen durch

\n

\\[ F_0 = 0,\\quad F_1 = 1,\\quad F_n = F_{n-1}+F_{n-2}\\ \\text{für}\\ n\\ge 2.\\]

\n

Siehe Frage 2.1 im Skript für weitere Verweise.

", "advice": "

a)

\n

Da hier keine sehr hohen Indizes auftreten, kann man einfach die ersten Terme der Fibonacci-Folge anhand der rekursiven Definition ausrechnen:

\n

\\[ 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, \\dots \\]

\n

b)

\n

In der Summe werden die Fibonacci-Zahlen bis $F_{\\var{nn}}$ aufsummiert, aber mit wechselndem (\"alternierendem\") Vorzeichen, denn $(-1)^1 = -1$, $(-1)^2 = 1$, $(-1)^3 = -1$, usw.

\n

Es ist also

\n

\\[ \\sum_{i=1}^{\\var{nn}} (-1)^{i+1} F_i = (-1)^2 F_1 + (-1)^3 F_2 + (-1)^4 F_3 + \\cdots + (-1)^{\\var{nn+1}} F_{\\var{nn}}  = F_1 - F_2 + F_3 - \\cdots \\var{sgnnpo} F_{\\var{nn}}. \\]

\n

\n

c)

\n

Hier noch einmal der vollständige Beweis:

\n

Behauptung: Für alle natürlichen Zahlen $n\\ge 1$ gilt: \\[ \\sum_{i=1}^n (-1)^{i+1} F_i = (-1)^{n-1}F_{n-1} + 1.\\]

\n

\n

Beweis durch vollständige Induktion nach $n$.

\n

Induktionsanfang $n=1$. Die linke Seite ist $\\sum_{i=1}^1 (-1)^{i+1} F_i = F_1 = 1$, die rechte Seite ist $(-1)^{1-1}F_{1-1} + 1 = F_0+1=1$. Der Induktionsanfang ist also richtig.

\n

Induktionsschritt $n>1$. Wir wollen zeigen, dass $\\sum_{i=1}^n (-1)^{i+1} F_i = (-1)^{n-1}F_{n-1} + 1$. Dabei dürfen wir die Induktionsvoraussetzung benutzen:

\n

\\[ \\sum_{i=1}^{n-1} (-1)^{i+1} F_i = (-1)^{n-2}F_{n-2} + 1. \\]

\n

Wir schreiben

\n

\\begin{align} \\sum_{i=1}^n (-1)^{i+1} F_i & = \\sum_{i=1}^{n-1} (-1)^{i+1} F_i + (-1)^{n+1} F_n \\\\ & = (-1)^{n-2}F_{n-2} + 1 + (-1)^{n+1} F_n = (-1)^{n} F_{n-2} - (-1)^{n} F_n + 1, \\end{align}

\n

wobei wir im zweiten Schritt die Induktionsvoraussetzung verwendet haben, und im dritten Schritt benutzen, dass $(-1)^{n+1} = -(-1)^{n}$ und dass $(-1)^{n-2} = (-1)^{n}$ ist, denn ein Produkt von $-1$'en ist $1$ oder $-1$, je nachdem, ob die Anzahl der Faktoren gerade oder ungerade ist.

\n

Nun setzen wir die Definition von $F_n$ ein, $F_n = F_{n-1}+ F_{n-2}$, und klammern $(-1)^{n}$ aus:

\n

\\begin{align} \\sum_{i=1}^n (-1)^{i+1} F_i &= (-1)^{n} (F_{n-2} - F_{n-1} - F_{n-2}) +1 = -(-1)^{n}F_{n-1} + 1 \\\\ &= (-1)^{n-1} F_{n-1} + 1. \\end{align}

\n

Damit ist der Induktionsschritt abgeschlossen und die Behauptung bewiesen.

", "rulesets": {}, "extensions": [], "variables": {"fib1": {"name": "fib1", "group": "Ungrouped variables", "definition": "fibonacci(a1)", "description": "", "templateType": "anything"}, "fib2": {"name": "fib2", "group": "Ungrouped variables", "definition": "fibonacci(a2)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(6..10 except a1)", "description": "", "templateType": "anything"}, "nn": {"name": "nn", "group": "Ungrouped variables", "definition": "random(5..7)", "description": "", "templateType": "anything"}, "sgnnpo": {"name": "sgnnpo", "group": "Ungrouped variables", "definition": "if(mod(nn, 2), '+', '-')", "description": "

Sign of nn+1.

", "templateType": "anything"}, "": {"name": "", "group": "Ungrouped variables", "definition": "", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["fib1", "fib2", "a1", "a2", "nn", "sgnnpo", ""], "variable_groups": [], "functions": {"fibonacci": {"parameters": [["n", "number"]], "type": "anything", "language": "javascript", "definition": "if (n<=1) return n;\nvar f0 = 0;\nvar f1 = 1;\nfor(var i=0; iGeben Sie die $\\var{a1}$-te und die $\\var{a2}$-te Fibonacci-Zahl an.

\n

$F_{\\var{a1}} = $ [[0]],

\n

$F_{\\var{a2}} = $ [[1]].

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{fib1}", "maxValue": "{fib1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{fib2}", "maxValue": "{fib2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Berechnen Sie den folgenden Ausdruck:

\n

$\\sum_{i=1}^{\\var{nn}} (-1)^{i+1} F_i = $ [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{(-1)^(nn-1)*fibonacci(nn-1)+1}", "maxValue": "{(-1)^(nn-1)*fibonacci(nn-1)+1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Füllen Sie die Lücken im folgenden Text aus. Weil man komplizierte Indizes nicht direkt eingeben kann, geben Sie $F_n$ bitte in der Form $F(n)$ ein, entsprechend $(-1)^{n+1} F_{n+1}$ als (-1)^(n+1) F(n+1), usw.

\n

Behauptung: Für alle natürlichen Zahlen $n\\ge 1$ gilt: \\[ \\sum_{i=1}^n (-1)^{i+1} F_i = (-1)^{n-1}F_{n-1} + 1.\\]

\n

Beweis durch vollständige Induktion nach $n$.

\n

Induktionsanfang [[0]]. Die linke Seite ist $\\sum_{i=1}^1 (-1)^{i+1} F_i = F_1 =$ [[1]], die rechte Seite ist $(-1)^{1-1}F_{1-1} + 1 = F_0+1=$ [[2]]. Der Induktionsanfang ist also richtig.

\n

Induktionsschritt $n>1$. Wir wollen zeigen, dass $\\sum_{i=1}^n (-1)^{i+1} F_i = $ [[3]]. Dabei dürfen wir die Induktionsvoraussetzung benutzen:

\n

$\\displaystyle{ \\sum_{i=1}^{n-1} (-1)^{i+1} F_i = }$ [[4]].

\n

Wir schreiben

\n

$\\displaystyle{\\sum_{i=1}^n (-1)^{i+1} F_i  = \\sum_{i=1}^{n-1} (-1)^{i+1} F_i + }$ [[5]] 

\n

$\\displaystyle{ = (-1)^{n-2}F_{n-2} + 1 + (-1)^{n+1} F_n = (-1)^{n} F_{n-2} -}$ [[6]]  $\\displaystyle{+ 1,}$

\n

\n

wobei wir im zweiten Schritt die Induktionsvoraussetzung verwendet haben, und im dritten Schritt benutzen, dass $(-1)^{n+1} = -(-1)^n$ und dass $(-1)^{n-2} = (-1)^n$ ist, denn ein Produkt von $-1$'en ist $1$ oder $-1$, je nachdem, ob die Anzahl der Faktoren gerade oder ungerade ist.

\n

Nun setzen wir die Definition von $F_n$ ein, $F_n = $ [[7]], und klammern $(-1)^n$ aus:

\n

\\begin{align} \\sum_{i=1}^n (-1)^{i+1} F_i &= (-1)^n (F_{n-2} - F_{n-1} - F_{n-2}) +1 = -(-1)^nF_{n-1} + 1 \\\\ &= (-1)^{n-1} F_{n-1} + 1. \\end{align}

\n

Damit ist der Induktionsschritt abgeschlossen und die Behauptung bewiesen.

", "gaps": [{"type": "patternmatch", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": " *n *= *1 *", "displayAnswer": "n=1", "matchMode": "regex"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "1", "maxValue": "1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "1", "maxValue": "1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(-1)^(n-1)*F(n-1)+1", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": ["5", "15"], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "n", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(-1)^(n-2) F(n-2)+1", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": ["5", "15"], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "n", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(-1)^(n+1)F(n)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": ["5", "15"], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "n", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(-1)^n F(n)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": ["5", "15"], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "n", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "F(n-1)+F(n-2)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": ["5", "15"], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "n", "value": "random(5..15)"}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Ulrich G\u00f6rtz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7603/"}]}]}], "contributors": [{"name": "Ulrich G\u00f6rtz", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7603/"}]}