diff --git a/info4/kapitel-1/FormaleSprachen.ipynb b/info4/kapitel-1/FormaleSprachen.ipynb index e453c1af09938570ac3708cd933ff4df63449545..8739d6a7b53dbfacf29400ba8f7d103c67a5eaa1 100644 --- a/info4/kapitel-1/FormaleSprachen.ipynb +++ b/info4/kapitel-1/FormaleSprachen.ipynb @@ -962,7 +962,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 56, "metadata": {}, "outputs": [ { @@ -971,7 +971,7 @@ "Loaded machine: Alphabet" ] }, - "execution_count": 36, + "execution_count": 56, "metadata": {}, "output_type": "execute_result" } @@ -979,26 +979,26 @@ "source": [ "::load\n", "MACHINE Alphabet\n", - "SETS Σ = {a,b,c}\n", + "SETS Sigma = {a,b,c}\n", "CONSTANTS ε, Sprachen, w₁, w₂, L₁, L₂\n", "ABSTRACT_CONSTANTS\n", " teilwort, präfix\n", "PROPERTIES \n", - " ε ∈ seq(Σ) ∧ size(ε) = 0 ∧\n", - " Sprachen = {L | L ⊆ seq(Σ)}∧\n", + " ε ∈ seq(Sigma) ∧ size(ε) = 0 ∧\n", + " Sprachen = {L | L ⊆ seq(Sigma)}∧\n", " w₁ = [a,a,b,c] ∧\n", " w₂ = [c,a,b,a] ∧\n", " L₁ = {w₁,w₂} ∧\n", " L₂ = {w₂, [a,a,a] } ∧\n", - " teilwort = {ut,vt | ut∈seq(Σ) & vt∈seq(Σ) ∧ ∃(vt1,vt2).(vt1^ut^vt2 = vt)} ∧\n", - " präfix = {up,vp | up∈seq(Σ) & vp∈seq(Σ) ∧ ∃(wp).(up^wp = vp)}\n", + " teilwort = {ut,vt | ut∈seq(Sigma) & vt∈seq(Sigma) ∧ ∃(vt1,vt2).(vt1^ut^vt2 = vt)} ∧\n", + " präfix = {up,vp | up∈seq(Sigma) & vp∈seq(Sigma) ∧ ∃(wp).(up^wp = vp)}\n", "DEFINITIONS SET_PREF_PP_SEQUENCES == TRUE\n", "END" ] }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 57, "metadata": {}, "outputs": [ { @@ -1007,7 +1007,7 @@ "Machine constants set up using operation 0: $setup_constants()" ] }, - "execution_count": 37, + "execution_count": 57, "metadata": {}, "output_type": "execute_result" } @@ -1018,19 +1018,25 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 58, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ - "$\\mathit{TRUE}$" + "$\\mathit{TRUE}$\n", + "\n", + "**Solution:**\n", + "* $\\mathit{TW} = \\{[],[a],[a,b],[b],[b,c],[c],[a,\\mathit{b},c]\\}$" ], "text/plain": [ - "TRUE" + "TRUE\n", + "\n", + "Solution:\n", + "\tTW = {[],[a],[a,b],[b],[b,c],[c],[a,b,c]}" ] }, - "execution_count": 38, + "execution_count": 58, "metadata": {}, "output_type": "execute_result" } @@ -1041,7 +1047,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 59, "metadata": {}, "outputs": [ { @@ -1053,7 +1059,7 @@ "FALSE" ] }, - "execution_count": 39, + "execution_count": 59, "metadata": {}, "output_type": "execute_result" } @@ -1064,19 +1070,25 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 60, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ - "$\\mathit{TRUE}$" + "$\\mathit{TRUE}$\n", + "\n", + "**Solution:**\n", + "* $\\mathit{TW} = \\{[],[a],[a,b],[b],[b,c],[c],[a,\\mathit{b},c]\\}$" ], "text/plain": [ - "TRUE" + "TRUE\n", + "\n", + "Solution:\n", + "\tTW = {[],[a],[a,b],[b],[b,c],[c],[a,b,c]}" ] }, - "execution_count": 40, + "execution_count": 60, "metadata": {}, "output_type": "execute_result" } @@ -1094,7 +1106,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 61, "metadata": {}, "outputs": [ { @@ -1106,7 +1118,7 @@ "{[],[c],[c,b],[c,b,a],[c,b,a,a],[c,b,a,a,b]}" ] }, - "execution_count": 41, + "execution_count": 61, "metadata": {}, "output_type": "execute_result" } @@ -1117,7 +1129,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 62, "metadata": {}, "outputs": [ { @@ -1129,7 +1141,7 @@ "{[],[a],[a,a],[a,b],[b],[b,a],[c],[c,b],[a,a,b],[b,a,a],[b,a,a,b],[c,b,a],[c,b,a,a],[c,b,a,a,b]}" ] }, - "execution_count": 42, + "execution_count": 62, "metadata": {}, "output_type": "execute_result" } @@ -1140,7 +1152,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 63, "metadata": {}, "outputs": [ { @@ -1152,7 +1164,7 @@ "{[],[a],[a,b],[b],[b,c],[c],[a,b,c]}" ] }, - "execution_count": 51, + "execution_count": 63, "metadata": {}, "output_type": "execute_result" } @@ -1163,7 +1175,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 64, "metadata": {}, "outputs": [ { @@ -1172,7 +1184,7 @@ "Preference changed: DOT_DECOMPOSE_NODES = FALSE\n" ] }, - "execution_count": 52, + "execution_count": 64, "metadata": {}, "output_type": "execute_result" } @@ -1183,7 +1195,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 65, "metadata": {}, "outputs": [ { @@ -1374,7 +1386,7 @@ "<Dot visualization: expr_as_graph [TWTW={[],[a],[a,b],[b],[b,c],[c],[a,b,c]}(\"tw\",{x,y|(x,y):teilwort & y:TW})]>" ] }, - "execution_count": 53, + "execution_count": 65, "metadata": {}, "output_type": "execute_result" } @@ -1385,7 +1397,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 66, "metadata": {}, "outputs": [ { @@ -1546,7 +1558,7 @@ "<Dot visualization: expr_as_graph [TWTW={[],[a],[a,b],[b],[b,c],[c],[a,b,c]}(\"präfix\",{x,y|(x,y):präfix & y:TW})]>" ] }, - "execution_count": 55, + "execution_count": 66, "metadata": {}, "output_type": "execute_result" }