Test GR2: Różnice pomiędzy wersjami
m Zastępowanie tekstu – „ \displaystyle ” na „” |
m Zastępowanie tekstu – „\displaystyle ” na „” |
||
Linia 1: | Linia 1: | ||
{| border="1" cellspacing="0" | {| border="1" cellspacing="0" | ||
! <math>\phi</math>!! <math>\psi</math>!! <math>\psi \Rightarrow \phi</math>!! <math> | ! <math>\phi</math>!! <math>\psi</math>!! <math>\psi \Rightarrow \phi</math>!! <math>(\phi \Rightarrow (\psi \Rightarrow \phi))</math>!! | ||
|- | |- | ||
| 0 || 0 || 1 || 1 | | 0 || 0 || 1 || 1 | ||
Linia 18: | Linia 18: | ||
<center><math> | <center><math> w_3 &\rightarrow bv_3v_2w_3v_1v_3v_3v_2\ |\ | ||
aw_3v_1v_3v_3v_2\ |\ bv_3v_2v_1v_3v_3v_2 \\ | aw_3v_1v_3v_3v_2\ |\ bv_3v_2v_1v_3v_3v_2 \\ | ||
\begin{array}{lll} & & |\ av_1v_3v_3v_2\ |\ bv_3v_3v_2 | \begin{array}{lll} & & |\ av_1v_3v_3v_2\ |\ bv_3v_3v_2 | ||
Linia 25: | Linia 25: | ||
oraz | oraz | ||
<center><math> | <center><math> w_3 &\rightarrow bv_3v_2w_3v_1v_3v_3v_2w_3\ |\ | ||
aw_3v_1v_3v_3v_2w_3\ |\ bv_3v_2v_1v_3v_3v_2w_3 \\ | aw_3v_1v_3v_3v_2w_3\ |\ bv_3v_2v_1v_3v_3v_2w_3 \\ | ||
\begin{array}{lll} & & |\ av_1v_3v_3v_2w_3\ |\ bv_3v_3v_2w_3 | \begin{array}{lll} & & |\ av_1v_3v_3v_2w_3\ |\ bv_3v_3v_2w_3 | ||
Linia 47: | Linia 47: | ||
<center><math> | <center><math>\begin{array} {c|c|c|c|c|} Krok & dodane\quad do\quad S' & okreslenie\quad f' & dodane\quad do\quad T'\\ | ||
\hline 0 & \{q_0\} & & \emptyset\\ | \hline 0 & \{q_0\} & & \emptyset\\ | ||
\hline 1 & \{q_0,q_3\} & f'(\{q_0\},a)=\{q_0,q_3\} & \emptyset\\ | \hline 1 & \{q_0,q_3\} & f'(\{q_0\},a)=\{q_0,q_3\} & \emptyset\\ | ||
Linia 72: | Linia 72: | ||
<center><math> | <center><math>\begin{array} {c|c|c|c|c|} (s_0,\sharp)\mapsto (s_A,\sharp,0) & (s_0,0)\mapsto (r_0,\sharp,1) & (s_0,1)\mapsto (r_1,\sharp,1)\\ | ||
\hline (r_0,\sharp)\mapsto (s_R,\sharp,0) & (r_0,0)\mapsto (r_0',0,1) & (r_0,1)\mapsto (r_0',1,1)\\ | \hline (r_0,\sharp)\mapsto (s_R,\sharp,0) & (r_0,0)\mapsto (r_0',0,1) & (r_0,1)\mapsto (r_0',1,1)\\ | ||
\hline (r_0',\sharp)\mapsto (q_0,\sharp,-1) & (r_0',0)\mapsto (r_0',0,1) & (r_0',1)\mapsto (r_0',1,1)\\ | \hline (r_0',\sharp)\mapsto (q_0,\sharp,-1) & (r_0',0)\mapsto (r_0',0,1) & (r_0',1)\mapsto (r_0',1,1)\\ | ||
Linia 90: | Linia 90: | ||
<center><math> | <center><math>\begin{array} {c|c|c|c|c|} (s_0,\sharp)\mapsto (s_R,\sharp,0) & (s_1,\diamondsuit)\mapsto(s1,\diamondsuit,1)\\ | ||
\hline (s_0,0)\mapsto(s_1,\clubsuit,1) & (s_1,0) \mapsto(s_2,\diamondsuit,1)\\ | \hline (s_0,0)\mapsto(s_1,\clubsuit,1) & (s_1,0) \mapsto(s_2,\diamondsuit,1)\\ | ||
\hline & (s_1,\sharp)\mapsto(s_A,\sharp,0)\\ | \hline & (s_1,\sharp)\mapsto(s_A,\sharp,0)\\ | ||
Linia 109: | Linia 109: | ||
<center><math> | <center><math>\begin{array} {c|c|c|c|c|} & s_0 & s_1 & s_2\\ | ||
\hline \tau _{\mathcal{A}}(1) & s_0 & s_1 & s_2\\ | \hline \tau _{\mathcal{A}}(1) & s_0 & s_1 & s_2\\ | ||
\hline \tau _{\mathcal{A}}(a) & s_1 & s_2 & s_2\\ | \hline \tau _{\mathcal{A}}(a) & s_1 & s_2 & s_2\\ | ||
Linia 122: | Linia 122: | ||
<center><math> | <center><math>\begin{array} {c|c|c|c|c|} f & s_0 & s_1 & s_2 & s_3\\ | ||
\hline a & s_1 & s_2 & s_0 & s_2\\ | \hline a & s_1 & s_2 & s_0 & s_2\\ | ||
\hline b & s_3 & s_2 & s_2 & s_2\\ | \hline b & s_3 & s_2 & s_2 & s_2\\ | ||
Linia 131: | Linia 131: | ||
wykorzystujący stabilizujący się ciąg relacji|algorytm minimalizacji automatu wykorzystujący stabilizujący się ciąg relacji| | wykorzystujący stabilizujący się ciąg relacji|algorytm minimalizacji automatu wykorzystujący stabilizujący się ciąg relacji| | ||
1 Wejście: <math> | 1 Wejście: <math>\mathcal{A}=(S, A, f, s_0, T)</math> - automat taki, że <math>L=L(\mathcal{A})</math>. | ||
2 Wyjście: automat minimalny <math> | 2 Wyjście: automat minimalny <math>\mathcal{A}'=(S',A',f', s_0', | ||
T')</math> dla <math> | T')</math> dla <math>\mathcal{A}</math>. | ||
3 <math> | 3 <math>\overline{\rho}_1\leftarrow\approx_{\mathcal{A}}</math>; | ||
4 <math> | 4 <math>i \leftarrow 1</math>; | ||
5 '''repeat''' | 5 '''repeat''' | ||
6 <math> | 6 <math>\slash \slash</math> oblicz <math>\overline{\rho}_i</math>: <math>s_1 | ||
\overline{\rho}_i s_2 \Leftrightarrow (s_1 \overline{\rho}_{i-1} | \overline{\rho}_i s_2 \Leftrightarrow (s_1 \overline{\rho}_{i-1} | ||
s_2) \wedge (\forall a \in A\ f(s_1, a) \overline{\rho}_{i-1} | s_2) \wedge (\forall a \in A\ f(s_1, a) \overline{\rho}_{i-1} | ||
f(s_2,a))</math>; | f(s_2,a))</math>; | ||
7 <math> | 7 <math>i \leftarrow i+1</math>; | ||
8 '''empty'''<math> | 8 '''empty'''<math>(\overline{\rho}_i)</math> | ||
9 '''for''' '''each''' <math> | 9 '''for''' '''each''' <math>(s_1,s_2)\in S\times S</math> '''do''' | ||
10 flag<math> | 10 flag<math>\leftarrow</math>'''true'''; | ||
11 '''for''' '''each''' <math> | 11 '''for''' '''each''' <math>a\in A</math> | ||
12 '''if''' '''not''' <math> | 12 '''if''' '''not''' <math>f(s_1, a) \overline{\rho}_{i-1} f(s_2,a)</math> '''then''' | ||
13 flag<math> | 13 flag<math>\leftarrow</math>'''false'''; | ||
14 '''end''' '''if''' | 14 '''end''' '''if''' | ||
15 '''end''' '''for''' | 15 '''end''' '''for''' | ||
16 '''if''' flag<nowiki>=</nowiki>'''true''' '''and''' <math> | 16 '''if''' flag<nowiki>=</nowiki>'''true''' '''and''' <math>s_1 \overline{\rho}_{i-1} s_2</math> '''then''' | ||
17 <math> | 17 <math>\overline{\rho}_{i} \leftarrow \overline{\rho}_{i} \cup \{(s_1,s_2)\}</math>; | ||
18 '''end''' '''if''' | 18 '''end''' '''if''' | ||
19 '''end''' '''for''' | 19 '''end''' '''for''' | ||
20 '''until''' <math> | 20 '''until''' <math>\overline{\rho}_i = \overline{\rho}_{i-1}</math> | ||
21 <math> | 21 <math>S' \leftarrow S \slash \overline{\rho}_i</math>; | ||
22 '''for''' '''each''' <math> | 22 '''for''' '''each''' <math>[s]_{\overline{\rho}_i} \in S \slash \overline{\rho}_i</math> '''do''' | ||
23 '''for''' '''each''' <math> | 23 '''for''' '''each''' <math>a \in A</math> '''do''' | ||
24 <math> | 24 <math>f'([s]_{\overline{\rho}_i},a) \leftarrow | ||
[f(s,a)]_{\overline{\rho}_i}</math>; | [f(s,a)]_{\overline{\rho}_i}</math>; | ||
25 '''end''' '''for''' | 25 '''end''' '''for''' | ||
26 '''end''' '''for''' | 26 '''end''' '''for''' | ||
27 <math> | 27 <math>s_0' \leftarrow [s_0]_{\overline{\rho}_i}</math>; | ||
28 <math> | 28 <math>T' \leftarrow \{[t]_{\overline{\rho}_i}:\ t \in T\}</math>; | ||
29 '''return''' <math> | 29 '''return''' <math>\mathcal{A}'=(S', A, f', s_0', T')</math>; | ||
}} | }} | ||
Linia 175: | Linia 175: | ||
| | | | ||
|| | || | ||
<math> | <math>s_{0} </math> || | ||
<math> | <math>s_{1} </math> || | ||
<math> | <math>s_{2} </math> | ||
|- | |- | ||
| | | | ||
<math> | <math>\tau _{\mathcal{A}}(1) </math> || | ||
<math> | <math>s_{0} </math> || | ||
<math> | <math>s_{1} </math> || | ||
<math> | <math>s_{2} </math> | ||
|- | |- | ||
| | | | ||
<math> | <math>\tau _{\mathcal{A}}(a) </math> || | ||
<math> | <math>s_{1} </math> || | ||
<math> | <math>s_{2} </math> || | ||
<math> | <math>s_{2} </math> | ||
|- | |- | ||
| | | | ||
<math> | <math>\tau _{\mathcal{A}}(b) </math> || | ||
<math> | <math>s_{0} </math> || | ||
<math> | <math>s_{0} </math> || | ||
<math> | <math>s_{0} </math> | ||
|- | |- | ||
| | | | ||
<math> | <math>\tau _{\mathcal{A}}(a^{2}) </math> || | ||
<math> | <math>s_{2} </math> || | ||
<math> | <math>s_{2} </math> || | ||
<math> | <math>s_{2} </math> | ||
|- | |- | ||
| | | | ||
<math> | <math>\tau _{\mathcal{A}}(ab) </math> || | ||
<math> | <math>s_{0} </math> || | ||
<math> | <math>s_{0} </math> || | ||
<math> | <math>s_{2} </math> | ||
|- | |- | ||
| | | | ||
<math> | <math>\tau _{\mathcal{A}}(ba) </math> || | ||
<math> | <math>s_{1} </math> || | ||
<math> | <math>s_{1} </math> || | ||
<math> | <math>s_{1} </math> | ||
|- | |- | ||
| | | | ||
<math> | <math>\tau _{\mathcal{A}}(b^{2}) </math> || | ||
<math> | <math>s_{0} </math> || | ||
<math> | <math>s_{0} </math> || | ||
<math> | <math>s_{0} </math> | ||
|- | |- | ||
| | | | ||
<math> | <math>\tau _{\mathcal{A}}(aba) </math> || | ||
<math> | <math>s_{1} </math> || | ||
<math> | <math>s_{1} </math> || | ||
<math> | <math>s_{2} </math> | ||
|- | |- | ||
| | | | ||
Linia 241: | Linia 241: | ||
<math> | <math> | ||
\begin{array}{lll} | \begin{array}{lll} | ||
\text{b) } \lim_{x\rightarrow 2^+} (x-2)e^{\frac{1}{x-2}}&=&\lim_{x\rightarrow | |||
2^+} \frac{e^{\frac{1}{x-2}}}{(x-2)^{-1}}\begin{array} {c}\left[\frac{\infty}{\infty}\right]\\=\\H\end{array} | 2^+} \frac{e^{\frac{1}{x-2}}}{(x-2)^{-1}}\begin{array} {c}\left[\frac{\infty}{\infty}\right]\\=\\H\end{array} | ||
\lim_{x\rightarrow 2^+} | \lim_{x\rightarrow 2^+} |
Wersja z 08:57, 28 sie 2023
0 | 0 | 1 | 1 | |
0 | 1 | 0 | 1 | |
1 | 0 | 1 | 1 | |
1 | 1 | 1 | 1 |
oraz
Ostatecznie, gramatyka w postaci Greibach ma postać:
Algorytm Minimalizuj2 - algorytm minimalizacji automatu wykorzystujący stabilizujący się ciąg relacji
1 Wejście: - automat taki, że . 2 Wyjście: automat minimalny dla . 3 ; 4 ; 5 repeat 6 Parser nie mógł rozpoznać (nieznana funkcja „\slash”): {\displaystyle \slash \slash} oblicz : ; 7 ; 8 empty 9 for each do 10 flagtrue; 11 for each 12 if not then 13 flagfalse; 14 end if 15 end for 16 if flag=true and then 17 ; 18 end if 19 end for 20 until 21 Parser nie mógł rozpoznać (nieznana funkcja „\slash”): {\displaystyle S' \leftarrow S \slash \overline{\rho}_i} ; 22 for each Parser nie mógł rozpoznać (nieznana funkcja „\slash”): {\displaystyle [s]_{\overline{\rho}_i} \in S \slash \overline{\rho}_i} do 23 for each do 24 ; 25 end for 26 end for 27 ; 28 ; 29 return ;
|| || | |
|| || || | |
|| || || | |
|| || || | |
|| || || | |
|| || || | |
|| || || | |
|| || || | |
|| || || | |
... || ... || ... || ... | |
alalalalaa
alala
Złożoność czasowa | Złożoność pamięciowa | |
---|---|---|
Maszyna dodająca | ||
Maszyna rozpoznająca |
0 | 1 | ... | ... | |
---|---|---|---|---|
Cell1 | Cell2 |
0 | 1 | ||
---|---|---|---|
0 | 1 | 1 | |
1 | 0 | 1 |
0 | 1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| 1 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 |
0 | 0 | 0 | 0 |
0 | 0 | 1 | 1 |
0 | 1 | 0 | 1 |
0 | 1 | 1 | 0 |
1 | 0 | 0 | 1 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 |
0 | 0 | 0 | 1 |
0 | 0 | 1 | 1 |
0 | 1 | 0 | 1 |
0 | 1 | 1 | 1 |
1 | 0 | 0 | 1 |
1 | 0 | 1 | 1 |
1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 |
0 | 1 | 2 | ||
---|---|---|---|---|
0 | 2 | 2 | 2 | |
1 | 0 | 2 | 2 | |
2 | 0 | 1 | 2 |
Nagroda Goedla
Zobacz Nagroda Goedla]]
Nagroda Turinga
Zobacz Nagroda Turinga
Nagroda Knutha
Zobacz Nagroda Knutha
Parser nie mógł rozpoznać (błąd składni): {\displaystyle g(C)=\left\{\begin{align} C\cup \{f(C')\}\\C\end{align} \right}
Parser nie mógł rozpoznać (błąd składni): {\displaystyle c\forall d\; c\in C \land d\in C \land c\sqsubseteq d\implies c\sqsubseteq' d, (C,\sqsubseteq) \preccurlyeq (C',\sqsubseteq') \iff C\subset C' \land \left\{\begin{align} \forall c \forall d\; &(c\in C\land d\in C) \implies (c\sqsubseteq d \iff c\sqsubseteq' d) \text{ oraz }\\ \forall c \forall d\; &(c\in C\land d\in C'\setminus C) \implies c\sqsubseteq' d \end{align} \right}
dla każdego Parser nie mógł rozpoznać (błąd składni): {\displaystyle a \in A \\h(n', a) = g(h(n, a), n, a)}
dla każdego i
dla każdego Parser nie mógł rozpoznać (błąd składni): {\displaystyle a \in A \\ e(g(n, a), n, a)}
dla każdego i