Du befindest dich hier: FSI Informatik » Prüfungsfragen und Altklausuren » Prüfungen im Bachelor-Studium (1. - 5. Semester) » aud » Forendiskussionen
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige ÜberarbeitungNächste ÜberarbeitungBeide Seiten, nächste Überarbeitung | ||
pruefungen:bachelor:aud:loesungws08 [16.02.2013 09:28] – Dawodo | pruefungen:bachelor:aud:loesungws08 [12.01.2014 16:24] – munzm | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ==forum== | + | ===== Forendiskussionen ===== |
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
Zeile 7: | Zeile 7: | ||
* [[https:// | * [[https:// | ||
- | ====Lösungsversuch==== | + | ===== Lösungsversuch |
- | ==Aufgabe 1 - Wissensfragen== | + | ==== Aufgabe 1 - Wissensfragen |
**a)** Falsch, es muss sortiert sein | **a)** Falsch, es muss sortiert sein | ||
Zeile 28: | Zeile 28: | ||
**i)** 1 - kontextsensitiven Grammatiken | **i)** 1 - kontextsensitiven Grammatiken | ||
- | ==Aufgabe 2 - Graphen== | + | ==== Aufgabe 2 - Graphen ==== |
**a)** | **a)** | ||
^ A ^ B ^ C ^ D ^ E ^ F ^ Prioritäts-Warteschlange^ | ^ A ^ B ^ C ^ D ^ E ^ F ^ Prioritäts-Warteschlange^ | ||
Zeile 49: | Zeile 50: | ||
^ F | 10 | A -> B -> E -> F | | ^ F | 10 | A -> B -> E -> F | | ||
- | ==Aufgabe 3 - Java== | + | ==== Aufgabe 3 - Java ==== |
**a)** | **a)** | ||
Zeile 75: | Zeile 76: | ||
{{: | {{: | ||
- | ==Aufgabe 4 - ADT== | + | ==== Aufgabe 4 - ADT ==== |
**a)** | **a)** | ||
- | | + | < |
- | contains(x, append(x, L)) = 1 + contains(x, L) | + | contains(x, create) = false |
- | contains(x, append(y, L)) = contains(x, L) | + | contains(x, append(x, L)) = true |
+ | contains(x, append(y, L)) = contains(x, L) | ||
+ | </ | ||
**b)** | **b)** | ||
- | A -> D -> create | + | A -> D |
**c)** | **c)** | ||
+ | < | ||
+ | append(head(append(D, | ||
+ | A1 | ||
+ | = append(head(prepend(D, | ||
+ | A1 | ||
+ | = append(head(prepend(D, | ||
+ | A3 | ||
+ | = append(D, prepend(A, create)) = | ||
+ | A2 | ||
+ | = prepend(A, append(D, create)) = | ||
+ | A1 | ||
+ | = prepend(A, prepend(D, create)) | ||
+ | </ | ||
- | append(head(append(D, | + | ==== Aufgabe 5 - Pseudo-Zufallszahlen |
- | A1 | + | |
- | | + | |
- | A1 | + | |
- | = append(head(prepend(D, | + | |
- | A3 | + | |
- | = append(D, prepend(A, create)) = | + | |
- | A2 | + | |
- | = prepend(A, append(D, create)) = | + | |
- | A1 | + | |
- | = prepend(A, prepend(D, create)) | + | |
- | + | ||
- | + | ||
- | ==Aufgabe 5 - Pseudo-Zufallszahlen== | + | |
**a)** | **a)** | ||
<code java> | <code java> | ||
Zeile 157: | Zeile 160: | ||
return a; | return a; | ||
- | lin(b, c, 1 + (((c - b) * a) % 100), steps - 1); | + | return |
} | } | ||
</ | </ | ||
Zeile 176: | Zeile 179: | ||
while(n > 0) { | while(n > 0) { | ||
- | int fn = 1 + (((c - b) * a) % 100) | + | int fn = 1 + (((c - b) * a) % 100); |
a = b; | a = b; | ||
b = c; | b = c; | ||
Zeile 188: | Zeile 191: | ||
- | ==Aufgabe 6 - Suchbäume== | + | ==== Aufgabe 6 - Suchbäume |
**a)** | **a)** | ||
Zeile 232: | Zeile 235: | ||
{{: | {{: | ||
- | ==Aufgabe 7 - Heap== | + | ==== Aufgabe 7 - Heap ==== |
**a)** | **a)** | ||
- | Der Wert jedes Knotens muss größer, als der seiner Kinder sein. | + | Der Wert jedes Knotens muss größer |
**b)** | **b)** | ||
Zeile 255: | Zeile 258: | ||
<code java> | <code java> | ||
public int parentIndex (int childIndex) { | public int parentIndex (int childIndex) { | ||
- | return (childIndex - 1) / 2; | + | return |
} | } | ||
</ | </ | ||
Zeile 282: | Zeile 285: | ||
- | ==Aufgabe 8 (wp)== | + | ==== Aufgabe 8 - wp-Kalkül ==== |
**a)** | **a)** |