(2) (2) (1) (1)
(4) (4)
(5) (5) (3) (3)
Bitte zur Übung kommen -> Evaluierung der
Übungsgruppen !!
zu schwer zu langsam
zu leicht/zu schnell
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7
(6) (6)
>
>
zu schwer zu langsam
zu leicht/zu schnell
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
Vectors and Matrices
(7) (7) (8) (8) (6) (6)
>
>
>
>
>
>
>
>
x
0 1 2 3
50 100 150 200
>
>
(14) (14)
>
>
>
>
(13) (13) (6) (6)
(11) (11)
>
>
>
>
>
>
(12) (12)
>
>
(10) (10) (9) (9) Let us inspect (column) vectors.
0 2
Now, we want to compute the shortest distance from point q := <2,1> to the line.
(17) (17)
>
>
(6) (6)
(16) (16)
>
>
(15) (15)
>
>
>
>
0 1 2
1 2 3 4 5
>
>
(20) (20) (19) (19)
>
>
(6) (6)
(21) (21) (18) (18)
>
>
(22) (22)
>
>
>
>
>
>
0 1 2
1 2 3 4 5
>
>
>
>
(6) (6)
(23) (23)
>
>
Q hq
hit
q Hit
p r
0 1 2
1 2
Remarks:
q = hit+hq, thus hq=q-hit
>
>
>
>
(6) (6)
(24) (24) (23) (23)
(25) (25)
>
>
(26) (26)
>
>
>
>
now, we demand that hq t r, thus hq·r = 0, and therefore (q - (p+r)) · r = 0
Remarks:
resorting (
>
>
>
>
>
>
(27) (27) (6) (6)
(23) (23)
>
>
0 1 2
1 2
(29) (29) (28) (28)
>
>
(6) (6)
(23) (23)
in general:
cf. G. Fischer, Lineare Algebra, S. 71ff, Verknüpfungen von Matrizen
Graphs
What is a graph?
An undirected graph consists of a pair G=(V,E), where E 4{{u,v} | u,v2 V}.
The elements of E are not ordered..
Elements from V are called nodes (or vertices; Knoten in dt.), elements from E are called edges (Kanten in dt.)
A directed graph (gerichteter Graph) is as well a pair G=(V,E). However, the elements of E are ordered pairs of elements from V. Thus, E 4 {(u,v) | u,v 2 V}.
Elemente of V are called nodes, elements from E are called edges (im dt.: gerichtete Kanten oder Bögen)
>
>
>
>
(28) (28)
>
>
(6) (6)
(23) (23)
>
>
>
>
(32) (32) (31) (31) (30) (30) .
Repetition: Flow Control (if, for, while, ...)
if <conditional expression> then <statement sequence>
| elif <conditional expression> then <statement sequence> | | else <statement sequence> |
end if
(Note: Phrases located between | | are optional.)
(36) (36)
>
>
>
>
(35) (35)
>
>
(23) (23)
>
>
>
>
(28) (28)
>
>
(6) (6)
>
>
(34) (34) (33) (33)
>
>
>
>
(32) (32) The for ...while ... do loop
1) Print even numbers from 6 to 10.
6 8 10
2) Find the sum of all two-digit odd numbers from 11 to 99.
2475 3) Multiply the entries of an expression sequence.
3) Add together the contents of a list.
>
>
(38) (38) (36) (36) (23) (23)
>
>
(42) (42)
>
>
>
>
(40) (40)
>
>
>
>
>
>
(43) (43)
>
>
(28) (28)
>
>
(37) (37) (6) (6)
(39) (39)
>
>
>
>
(41) (41)
>
>
>
>
(32) (32)
"1C3*q^2*3"
145
Similar-to-Fibonacci-Numbers are
103361417709716646143
>
>
(28) (28)
(36) (36)
>
>
(6) (6)
(23) (23)
>
>
(32) (32)