Aufgabe2.tex 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. \section*{Aufgabe 2}
  2. \subsection*{Teilaufgabe a}
  3. \textbf{Aufgabe}
  4. Formulieren Sie einen Algorithmus in Pseudocode zum Lösen des Gleichungssystems
  5. \[Ly = b,\]
  6. wobei $L$ eine invertierbare, untere Dreiecksmatrix ist.
  7. Geben Sie die Formel zur Berechnung von $y_i$ an.
  8. \textbf{Lösung:}
  9. \[y_i = \frac{b_i - \sum_{k=i}^{i-1} l_{ik} \cdot y_k}{l_{ii}}\]
  10. \subsection*{Teilaufgabe b}
  11. \[Ax = b ? PAx = Pb ? LRx = Pb \]
  12. Pseudocode:
  13. \begin{algorithm}[H]
  14. \begin{algorithmic}
  15. \Require Matrix $A$, Vektor $b$
  16. \Procedure{CalculateLegendre}{$A$, $b$}
  17. \State $P, L, R \gets \Call{LRZerlegung}{A}$
  18. \State $b^* \gets Pb$
  19. \State $c \gets \Call{VorwärtsSubstitution}{L, b^*}$
  20. \State $x \gets \Call{RückwärtsSubstitution}{R, c}$
  21. \State \Return $x$
  22. \EndProcedure
  23. \end{algorithmic}
  24. \caption{Calculate TODO}
  25. \label{alg:TODO}
  26. \end{algorithm}
  27. \subsection*{Teilaufgabe c}
  28. Der Gesamtaufwand ist:
  29. \begin{itemize}
  30. \item LR-Zerlegung, $\frac{1}{3}n^3 - \frac{1}{3} n^2$
  31. \item Vektormultiplikation, $2n$
  32. \item Vorwärtssubstitution, $\frac{1}{2} n^2$
  33. \item Rückwärtssubstitution, $\frac{1}{2} n^2$
  34. \end{itemize}