Aufgabe2.tex 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. \section*{Aufgabe 2}
  2. \subsection*{Teilaufgabe a)}
  3. Formel: $y_i = \frac{b_i - \sum_{j=1}^{i-1} y_j \cdot l_{ij}}{l_{ii}} $
  4. Anmerkung: $l_{ii}$ kann nicht $0$ sein, da L dann nicht mehr invertierbar wäre.
  5. Algorithmus:
  6. \begin{algorithm}[H]
  7. \begin{algorithmic}
  8. \For{$i=1$ to $i=n$}
  9. \State $sum \gets 0$
  10. \For{$j = 1$ to $j = i-1$}
  11. \State $sum \gets sum + y_i \cdot l_{ij}$
  12. \EndFor
  13. \State $y_i \gets \frac{b_i - sum}{l_{ii}}$
  14. \EndFor
  15. \end{algorithmic}
  16. \caption{TODO}
  17. \end{algorithm}
  18. \subsubsection*{(b)}
  19. \begin{algorithm}[H]
  20. \begin{algorithmic}
  21. \Require Matrix $A$, Vektor $b$
  22. \Procedure{LoeseLGS}{$A$, $b$}
  23. \State $P, L, R \gets \Call{LRZer}{A}$
  24. \State $b^* \gets P \cdot b$
  25. \State $c \gets \Call{VorSub}{L, b^*}$
  26. \State $x \gets \Call{RueckSub}{R, c}$
  27. \State \Return $x$
  28. \EndProcedure
  29. \end{algorithmic}
  30. \caption{Löse ein LGS $Ax = b$}
  31. \end{algorithm}
  32. \subsection*{Teilaufgabe c)}
  33. Aufwand:
  34. \begin{itemize}
  35. \item Vorwärts-/Rückwärtssubstitution: jeweils $\frac{1}{2} \cdot n^2$
  36. \item LR-Zerlegung: $\frac{1}{3}n^3$
  37. \item gesamt: $\frac{1}{3}n^3+n^2$
  38. \end{itemize}