# Ćwiczenia 4, grupa śr. 14-16, 20 marca 2024
###### tags: `SYK24` `ćwiczenia` `pwit`
## Deklaracje
Gotowość rozwiązania zadania należy wyrazić poprzez postawienie X w odpowiedniej kolumnie! Jeśli pożądasz zreferować dane zadanie (co najwyżej jedno!) w trakcie dyskusji oznacz je znakiem ==X== na żółtym tle.
**UWAGA: Tabelkę wolno edytować tylko wtedy, gdy jest na zielonym tle!**
:::danger
| | 1 | 2 | 3 | 4 | 5 |
| ----------------------:| -----| --- | --- | --- | --- |
Krzysztof Chorzempa | | | | | |
Maciej Ciepiela | X | | | X | X |
Szymon Fica | X | X | | X | X |
Agnieszka Grala | X | | | X | X |
Karolina Jędraszek | X | X | | X | X |
Katarzyna Jodłowska | X | X | | X | X |
Dominik Kiełbowicz | | | | | |
Michał Kolasa | | | | | |
Rafał Krysa | X | X | X | X | |
Miłosz Krzysiek | X | X | | X | X |
Łukasz Kulczycki | | | | | |
Leon Lepkowski | X | X | X | X | ==X== |
Hanna Makowska | X | X | X | X | |
Jan Marek | | | | | |
Cezary Miłek | X | X | X | ==X== | X |
Anna Pierzchała | X | X | X | X | X |
Alan Pietrasz | X | X | X | X | X |
Kacper Ponikowski | X | X | X | X | X |
Dominik Walecko | ==X== | X | X | X | X |
Michał Włodarczak | X | X | X | X | X |
:::
Tutaj można zadeklarować zaległe zadania **3** i **4** z **listy 3**:
:::success
| Imię i nazwisko | 3.3 | 3.4 |
| ----------------------:| -----| -----|
| | |
| | |
:::
:::info
**Uwaga:** Po rozwiązaniu zadania należy zmienić kolor nagłówka na zielony.
:::
## Zadanie 1
:::success
Autor: Dominik Walecko
:::

**Zadanie 6 z poprzedniej listy:**


$RD_o(L):$
$RD_o(1) = \{(x, ?), (y, ?), (i, ?), (t, ?), (z, ?)\}$
$RD_o(2) = \{(x, 1), (y, ?), (i, ?), (t, ?), (z, ?)\}$
$RD_o(3) = \{(x, 1), (y, 2), (i, ?), (t, ?), (z, ?)\}$
$RD_o(4) = \{(x, 1), (y, 2), (i, 3), (t, 5), (x, 6), (y, 7), (i, 8), (z, ?), (t, ?)\}$
$RD_o(5) = \{(x, 1), (y, 2), (i, 3), (t, 5), (x, 6), (y, 7), (i, 8), (z, ?), (t, ?)\}$
$RD_o(6) = \{(x, 1), (y, 2), (i, 3), (t, 5), (x, 6), (y, 7), (i, 8), (z, ?)\}$
$RD_o(7) = \{(y, 2), (i, 3), (t, 5), (x, 6), (y, 7), (i, 8), (z, ?)\}$
$RD_o(8) = \{(i, 3), (t, 5), (x, 6), (y, 7), (i, 8), (z, ?)\}$
$RD_o(9) = \{(x, 1),(y, 2), (i, 3),(t, 5), (x, 6), (y, 7), (i, 8), (z, ?), (t, ?)\}$
$RD_*(L):$
$RD_*(1) = \{(x, 1), (y, ?), (i, ?), (t, ?), (z, ?)\}$
$RD_*(2) = \{(x, 1), (y, 2), (i, ?), (t, ?), (z, ?)\}$
$RD_*(3) = \{(x, 1), (y, 2), (i, 3), (t, ?), (z, ?)\}$
$RD_*(4) = \{(x, 1), (y, 2), (i, 3), (t, 5), (x, 6), (y, 7), (i, 8), (z, ?), (t, ?)\}$
$RD_*(5) = \{(x, 1), (y, 2), (i, 3), (t, 5), (x, 6), (y, 7), (i, 8), (z, ?)\}$
$RD_*(6) = \{(y, 2), (i, 3), (t, 5), (x, 6), (i, 8), (y, 7), (z, ?)\}$
$RD_*(7) = \{(i, 3), (t, 5), (x, 6), (i, 8), (y, 7), (z, ?)\}$
$RD_*(8) = \{(t, 5), (x, 6), (y, 7), (i, 8), (z, ?)\}$
$RD_*(9) = \{(x, 1), (i, 3),(t, 5), (x, 6), (i, 8), (y, 9), (z, ?), (t, ?)\}$
**Równania z aktualnego zadania:**
$RD_*(1) = RD_o(1) \backslash \{(x, l) | l \in Lab \} \cup (x, 1)$
$RD_*(2) = RD_o(2) \backslash \{(y, l) | l \in Lab \} \cup (y, 2)$
$RD_*(3) = RD_o(3) \backslash \{(i, l) | l \in Lab \} \cup (i, 3)$
$RD_*(4) = RD_o(4)$
$RD_*(5) = RD_o(5) \backslash \{(t, l) | l \in Lab \} \cup (t, 5)$
$RD_*(6) = RD_o(6) \backslash \{(x, l) | l \in Lab \} \cup (x, 6)$
$RD_*(7) = RD_o(7) \backslash \{(y, l) | l \in Lab \} \cup (y, 7)$
$RD_*(8) = RD_o(8) \backslash \{(i, l) | l \in Lab \} \cup (i, 8)$
$RD_*(9) = RD_o(9) \backslash \{(y, l) | l \in Lab \} \cup (y, 9)$
$RD_o(1) = \{(x, ?), (y, ?), (i, ?), (t, ?), (z, ?) \}$
$RD_o(2) = RD_*(1)$
$RD_o(3) = RD_*(2)$
$RD_o(4) = RD_*(3) \cup RD_*(8)$
$RD_o(5) = RD_*(4)$
$RD_o(6) = RD_*(5)$
$RD_o(7) = RD_*(6)$
$RD_o(8) = RD_*(7)$
$RD_o(9) = RD_*(4)$
Łatwo sprawdzić, że zbiory z zadania z 6 z poprzedniej listy spełniają te równania.
Przykładowo:
$RD_o(1) = \{(x, ?), (y, ?), (i, ?), (t, ?), (z, ?) \}$
$RD_o(4) = \{(x, 1), (y, 2), (i, 3), (t, ?), (z, ?)\} \cup \{(i, 3), (t, 5), (x, 6), (y, 7), (i, 8), (z, ?)\} = \{(x, 1), (y, 2), (i, 3), (t, ?), (t, 5), (x, 6), (y, 7), (i, 8), (z, ?)\}$
$RD_*(1) = \{(x, ?), (y, ?), (i, ?), (t, ?), (z, ?)\} \backslash (x, ?) \cup (x, 1) = \{(x, 1), (y, ?), (i, ?), (t, ?), (z, ?)\}$$RD_*(2) = \{(x, 1), (y, ?), (i, ?), (t, ?), (z, ?)\} \backslash (y, ?) \cup (y, 2) = \{(x, 1), (y,2), (i, ?), (t, ?), (z, ?)\}$$RD_*(9) = \{(x, 1),(y, 2), (i, 3),(t, 5), (x, 6), (y, 7), (i, 8), (z, ?), (t, ?)\} \backslash \{(y, 2), (y, 7)\} \cup (y, 9) = \{(x, 1), (i, 3),(t, 5), (x, 6), (i, 8), (y, 9), (z, ?), (t, ?)\}$
## Zadanie 2
:::success
Autor: Rafał Krysa
:::
<details>
**Iteracja 0:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={},
RD<sub>out</sub>(2)={(y, 2) },
RD<sub>o</sub>(3)={},
RD<sub>out</sub>(3)={(i, 3) },
RD<sub>o</sub>(4)={},
RD<sub>out</sub>(4)={},
RD<sub>o</sub>(5)={},
RD<sub>out</sub>(5)={(t, 5) },
RD<sub>o</sub>(6)={},
RD<sub>out</sub>(6)={(x, 6) },
RD<sub>o</sub>(7)={},
RD<sub>out</sub>(7)={(y, 7) },
RD<sub>o</sub>(8)={},
RD<sub>out</sub>(8)={(i, 8) },
RD<sub>o</sub>(9)={},
RD<sub>out</sub>(9)={(y, 9) },
**Iteracja 1:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(y, 2) },
RD<sub>o</sub>(3)={(y, 2) },
RD<sub>out</sub>(3)={(i, 3) },
RD<sub>o</sub>(4)={(i, 3) (i, 8) },
RD<sub>out</sub>(4)={},
RD<sub>o</sub>(5)={},
RD<sub>out</sub>(5)={(t, 5) },
RD<sub>o</sub>(6)={(t, 5) },
RD<sub>out</sub>(6)={(x, 6) },
RD<sub>o</sub>(7)={(x, 6) },
RD<sub>out</sub>(7)={(y, 7) },
RD<sub>o</sub>(8)={(y, 7) },
RD<sub>out</sub>(8)={(i, 8) },
RD<sub>o</sub>(9)={},
RD<sub>out</sub>(9)={(y, 9) },
**Iteracja 2:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(y, 2) },
RD<sub>out</sub>(3)={(y, 2) (i, 3) },
RD<sub>o</sub>(4)={(i, 3) (i, 8) },
RD<sub>out</sub>(4)={(i, 3) (i, 8) },
RD<sub>o</sub>(5)={},
RD<sub>out</sub>(5)={(t, 5) },
RD<sub>o</sub>(6)={(t, 5) },
RD<sub>out</sub>(6)={(t, 5) (x, 6) },
RD<sub>o</sub>(7)={(x, 6) },
RD<sub>out</sub>(7)={(x, 6) (y, 7) },
RD<sub>o</sub>(8)={(y, 7) },
RD<sub>out</sub>(8)={(y, 7) (i, 8) },
RD<sub>o</sub>(9)={},
RD<sub>out</sub>(9)={(y, 9) },
**Iteracja 3:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(y, 2) (i, 3) },
RD<sub>o</sub>(4)={(y, 2) (i, 3) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(i, 3) (i, 8) },
RD<sub>o</sub>(5)={(i, 3) (i, 8) },
RD<sub>out</sub>(5)={(t, 5) },
RD<sub>o</sub>(6)={(t, 5) },
RD<sub>out</sub>(6)={(t, 5) (x, 6) },
RD<sub>o</sub>(7)={(t, 5) (x, 6) },
RD<sub>out</sub>(7)={(x, 6) (y, 7) },
RD<sub>o</sub>(8)={(x, 6) (y, 7) },
RD<sub>out</sub>(8)={(y, 7) (i, 8) },
RD<sub>o</sub>(9)={(i, 3) (i, 8) },
RD<sub>out</sub>(9)={(y, 9) },
**Iteracja 4:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(y, 2) (i, 3) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(y, 2) (i, 3) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(i, 3) (i, 8) },
RD<sub>out</sub>(5)={(i, 3) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(t, 5) },
RD<sub>out</sub>(6)={(t, 5) (x, 6) },
RD<sub>o</sub>(7)={(t, 5) (x, 6) },
RD<sub>out</sub>(7)={(t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(x, 6) (y, 7) },
RD<sub>out</sub>(8)={(x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(i, 3) (i, 8) },
RD<sub>out</sub>(9)={(i, 3) (i, 8) (y, 9) },
**Iteracja 5:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(y, 2) (i, 3) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(y, 2) (i, 3) (y, 7) (i, 8) },
RD<sub>out</sub>(5)={(i, 3) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(i, 3) (i, 8) (t, 5) },
RD<sub>out</sub>(6)={(t, 5) (x, 6) },
RD<sub>o</sub>(7)={(t, 5) (x, 6) },
RD<sub>out</sub>(7)={(t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(t, 5) (x, 6) (y, 7) },
RD<sub>out</sub>(8)={(x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(y, 2) (i, 3) (y, 7) (i, 8) },
RD<sub>out</sub>(9)={(i, 3) (i, 8) (y, 9) },
**Iteracja 6:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(y, 2) (i, 3) (y, 7) (i, 8) },
RD<sub>out</sub>(5)={(y, 2) (i, 3) (y, 7) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(i, 3) (i, 8) (t, 5) },
RD<sub>out</sub>(6)={(i, 3) (i, 8) (t, 5) (x, 6) },
RD<sub>o</sub>(7)={(t, 5) (x, 6) },
RD<sub>out</sub>(7)={(t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(t, 5) (x, 6) (y, 7) },
RD<sub>out</sub>(8)={(t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(y, 2) (i, 3) (y, 7) (i, 8) },
RD<sub>out</sub>(9)={(i, 3) (i, 8) (y, 9) },
**Iteracja 7:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(5)={(y, 2) (i, 3) (y, 7) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(y, 2) (i, 3) (y, 7) (i, 8) (t, 5) },
RD<sub>out</sub>(6)={(i, 3) (i, 8) (t, 5) (x, 6) },
RD<sub>o</sub>(7)={(i, 3) (i, 8) (t, 5) (x, 6) },
RD<sub>out</sub>(7)={(t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(t, 5) (x, 6) (y, 7) },
RD<sub>out</sub>(8)={(t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(9)={(i, 3) (i, 8) (y, 9) },
**Iteracja 8:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(5)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(y, 2) (i, 3) (y, 7) (i, 8) (t, 5) },
RD<sub>out</sub>(6)={(y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>o</sub>(7)={(i, 3) (i, 8) (t, 5) (x, 6) },
RD<sub>out</sub>(7)={(i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(t, 5) (x, 6) (y, 7) },
RD<sub>out</sub>(8)={(t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(9)={(t, ?) (z, ?) (x, 1) (i, 3) (x, 6) (i, 8) (y, 9) },
**Iteracja 9:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(5)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>out</sub>(6)={(y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>o</sub>(7)={(y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>out</sub>(7)={(i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>out</sub>(8)={(t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(9)={(t, ?) (z, ?) (x, 1) (i, 3) (x, 6) (i, 8) (y, 9) },
**Iteracja 10:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(5)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>out</sub>(6)={(z, ?) (y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>o</sub>(7)={(y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>out</sub>(7)={(i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>out</sub>(8)={(t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(9)={(t, ?) (z, ?) (x, 1) (i, 3) (t, 5) (x, 6) (i, 8) (y, 9) },
**Iteracja 11:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(5)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>out</sub>(6)={(z, ?) (y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>o</sub>(7)={(z, ?) (y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>out</sub>(7)={(i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>out</sub>(8)={(t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(9)={(t, ?) (z, ?) (x, 1) (i, 3) (t, 5) (x, 6) (i, 8) (y, 9) },
**Iteracja 12:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(5)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>out</sub>(6)={(z, ?) (y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>o</sub>(7)={(z, ?) (y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>out</sub>(7)={(z, ?) (i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>out</sub>(8)={(t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(9)={(t, ?) (z, ?) (x, 1) (i, 3) (t, 5) (x, 6) (i, 8) (y, 9) },
**Iteracja 13:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(5)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>out</sub>(6)={(z, ?) (y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>o</sub>(7)={(z, ?) (y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>out</sub>(7)={(z, ?) (i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(z, ?) (i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>out</sub>(8)={(t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(9)={(t, ?) (z, ?) (x, 1) (i, 3) (t, 5) (x, 6) (i, 8) (y, 9) },
**Iteracja 14:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(5)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>out</sub>(6)={(z, ?) (y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>o</sub>(7)={(z, ?) (y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>out</sub>(7)={(z, ?) (i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(z, ?) (i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>out</sub>(8)={(z, ?) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(9)={(t, ?) (z, ?) (x, 1) (i, 3) (t, 5) (x, 6) (i, 8) (y, 9) },
**Iteracja 15:**
RD<sub>o</sub>(1)={(x, ?) (y, ?) (t, ?) (i, ?) (z, ?) },
RD<sub>out</sub>(1)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>o</sub>(2)={(y, ?) (t, ?) (i, ?) (z, ?) (x, 1) },
RD<sub>out</sub>(2)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>o</sub>(3)={(t, ?) (i, ?) (z, ?) (x, 1) (y, 2) },
RD<sub>out</sub>(3)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) },
RD<sub>o</sub>(4)={(t, ?) (x, 1) (y, 2) (i, 3) (z, ?) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(4)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(5)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(5)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>o</sub>(6)={(z, ?) (x, 1) (y, 2) (i, 3) (x, 6) (y, 7) (i, 8) (t, 5) },
RD<sub>out</sub>(6)={(z, ?) (y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>o</sub>(7)={(z, ?) (y, 2) (i, 3) (y, 7) (i, 8) (t, 5) (x, 6) },
RD<sub>out</sub>(7)={(z, ?) (i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>o</sub>(8)={(z, ?) (i, 3) (i, 8) (t, 5) (x, 6) (y, 7) },
RD<sub>out</sub>(8)={(z, ?) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>o</sub>(9)={(t, ?) (z, ?) (x, 1) (y, 2) (i, 3) (t, 5) (x, 6) (y, 7) (i, 8) },
RD<sub>out</sub>(9)={(t, ?) (z, ?) (x, 1) (i, 3) (t, 5) (x, 6) (i, 8) (y, 9) },
</details>
Zbiory po ostatniej iteracji są zgodne z tymi z zadania 6.

..........
## Zadanie 3
:::success
Autor: Michał Włodarczak
:::




## Zadanie 4
:::success
Autor: Cezary Miłek
:::


### **Algorytm**:
$RD_{in}(1) :=\{(x,?),(y,?),(z,?)\}$
$RD_{out}(1):= RD_{in}(1) \setminus (x, ?) \cup (x, 1):= \{(x,1),(y,?),(z,?)\}$
$RD_{in}(2) :=\{(x,1),(y,?),(z,?)\}$
$RD_{out}(2):=\{(x,1),(y,?),(z,?)\}$
$RD_{in}(3) :=\{(x,1),(y,?),(z,?)\}$
$RD_{out}(3):= RD_{in}(3) \setminus (y, ?) \cup (y, 3):=\{(x,1),(y,3),(z,?)\}$
$RD_{in}(4) :=\{(x,1),(y,?),(z,?)\}$
$RD_{out}(4):= RD_{in}(4) \setminus (y, ?) \cup (y, 4):=\{(x,1),(y,4),(z,?)\}$
$RD_{in}(5) :=\{(x,1),(y,3),(y,4),(z,?)\}$
$RD_{out}(5):=\{(x,1),(y,3),(y,4),(z,5)\}$
### **Najlepsze rozwiązanie**:
$RD_{in}(1) :=\{(x,?),(y,?),(z,?)\}$
$RD_{out}(1):=\{(x,1),(y,?),(z,?)\}$
$RD_{in}(2) :=\{(x,1),(y,?),(z,?)\}$
$RD_{out}(2):=\{(x,1),(y,?),(z,?)\}$
$RD_{in}(3) :=\{(x,1),(y,?),(z,?)\}$
$RD_{out}(3):=\{(x,1),(y,3),(z,?)\}$
$RD_{in}(4) :=\{(x,1),(y,?),(z,?)\}$
$RD_{out}(4):=\{(x,1),(y,4),(z,?)\}$
$RD_{in}(5) :=\{(x,1),(y,3),(z,?)\}$
$RD_{out}(5) :=\{(x,1),(y,3),(z,5)\}$
Zauważmy, że $4$ linijka nigdy się nie wykona, ponieważ predefiniujemy $x$ już w $1$ linijce i nie zmieniamy go, wykona się tylko $if$ dla prawdy.
W związku z tym rozwiązanie **nie jest optymalne**, bo kompletnie zbędna jest ta $4$ linijka - nawet tam nie wchodzimy.
**Najlepsze rozwiązanie** nie uwzględniałoby tej $4$ linijki, bo i tak jest ona (w obecnej wersji) zbędna.
## Zadanie 5
:::success
Autor: Leon Lepkowski
:::




| l | $kill_{LV}(l)$ | $gen_{LV}(l)$ |
| -------- | -------- | -------- |
| 1 | {x} | $\emptyset$ |
| 2 | {y} | $\emptyset$ |
| 3 | {i} | $\emptyset$ |
| 4 | $\emptyset$ | {i,z} |
| 5 | {t} | {x,y} |
| 6 | {x} | {y} |
| 7 | {y} | {t} |
| 8 | {i} | {i} |
| 9 | {y} | {x} |

$LV_{in}(1) = LV_{out}(1) \setminus{\{x\}}$
$LV_{out}(1) = LV_{in}(2)$
$LV_{in}(2) = LV_{out}(2) \setminus{\{y\}}$
$LV_{out}(2) = LV_{in}(3)$
$LV_{in}(3) = LV_{out}(3) \setminus{\{i\}}$
$LV_{out}(3) = LV_{in}(4)$
$LV_{in}(4) = LV_{out}(4) \cup{\{z,i\}}$
$LV_{out}(4) = LV_{in}(5) \cup LV_{in}(5)$
$LV_{in}(5) = LV_{out}(5) \setminus{\{t\}} \cup{\{x,y\}}$
$LV_{out}(5) = LV_{in}(6)$
$LV_{in}(6) = LV_{out}(6) \setminus{\{x\}} \cup {\{y\}}$
$LV_{out}(6) = LV_{in}(7)$
$LV_{in}(7) = LV_{out}(7) \setminus{\{y\}} \cup {\{t\}}$
$LV_{out}(7) = LV_{in}(8)$
$LV_{in}(8) = LV_{out}(8) \setminus{\{i\}} \cup {\{i\}}$
$LV_{out}(8) = LV_{in}(4)$
$LV_{in}(9) = LV_{out}(9) \setminus{\{y\} \cup {\{x\}}}$
$LV_{out}(9) = \emptyset$
| l | $LV_{in}(l)$ | $LV_{out}(l)$ |
| -------- | -------- | -------- |
| 1 | {z} | {x,z} |
| 2 | {x,z} | {x,y,z} |
| 3 | {x,y,z} | {x,y,z,i} |
| 4 | {x,y,z,i} | {x,y,z,i} |
| 5 | {x,y,z,i} | {t,y,z,i} |
| 6 | {t,y,z,i} | {x,t,z,i} |
| 7 | {x,t,z,i} | {x,y,z,i} |
| 8 | {x,y,z,i} | {x,y,z,i} |
| 9 | {x} | $\emptyset$ |
$LV_{in}(9) = \{x\}$
$LV_{out}(8) = LV_{in}(4) = LV_{out}(4) \cup \{i,z\} = (LV_{in}(5) \cup LV_{in}(9)) \cup \{i,z\} = (LV_{out}(5) \setminus\{t\} \cup \{x,y\}) \cup \{x\} \cup \{i,z\} = \ ... \setminus \{t\} \cup \{x,y,z,i\} = \{x,y,z,i\}$