-
Notifications
You must be signed in to change notification settings - Fork 4
/
eai.sty
102 lines (81 loc) · 2.61 KB
/
eai.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
\newcommand{\todo}{\ding{45}\ }
\newcommand*{\IndHyp}{{\bf (И.П.) }}
\newcommand*{\FA}{\langle{\Sigma,Q,\qstart,\delta,F}\rangle}
\newcommand*{\FAn}[1]{\langle{\Sigma,Q_#1,s_#1,\delta_#1,F_#1}\rangle}
\newcommand*{\NFA}{\langle{\Sigma,Q,Q_{\texttt{start}},\Delta,F}\rangle}
\newcommand*{\NFAn}[1]{\langle{\Sigma,Q_#1,S_#1,\Delta_#1,F_#1}\rangle}
\newcommand*{\PDA}{\langle{Q,\Sigma,\Gamma,\sharp,\Delta,\qstart,\qaccept}\rangle}
\newcommand*{\PDAn}[1]{\langle{Q_#1,\Sigma,\Gamma,\#,\s_#1,\Delta_#1,F_#1}\rangle}
\newcommand*{\CFG}{\langle{V,\Sigma,R,S}\rangle}
\newcommand*{\TM}{\langle{Q,\Sigma,\Gamma,\delta,\blank,\qstart,\qaccept, \qreject}\rangle}
% Parse tree
\newcommand{\high}{\texttt{height}}
\newcommand{\leaves}{\texttt{leaves}}
\newcommand{\successor}{\texttt{succ}}
\tikzset{
photon/.style={decorate, decoration={snake,segment length=5mm, amplitude=2pt}, draw=black}
}
\tikzset{
photon2/.style={decorate, decoration={snake,segment length=4mm, amplitude=3pt}, draw=black}
}
% Words
\newcommand*{\slice}[1]{\texttt{[}{#1}\texttt{]}}
\newcommand*{\card}[2]{\vert{#1}\vert_{#2}}
\newcommand*{\bin}[1]{\overline{#1}_{(2)}}
% Grammars
\newcommand*{\derive}[1]{\stackrel{{#1}}{\Rightarrow}}
\newcommand*{\lderive}[1]{\stackrel{{#1}}{\Rightarrow}_{\texttt{left}}}
\newcommand*{\rderive}[1]{\stackrel{{#1}}{\Rightarrow}_{\texttt{right}}}
\newcommand*{\yield}[1]{~\stackrel{{#1}}{\lhd}~}
\newcommand*{\uppercut}[2]{{#1}\upharpoonright_{#2}}
\newcommand*{\lowercut}[2]{{#1}\downharpoonright_{#2}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Turing Machines %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\blank}{\sqcup}
% \newcommand*{\blank}{\underbracket{\;\;}}
\newcommand*{\tape}[1]{\cdots\blank\blank\blank{#1}\blank\blank\blank\cdots}
\newcommand*{\goleft}{\lhd}
\newcommand*{\goright}{\rhd}
\newcommand*{\stay}{\Box}
\newcommand*{\PCP}{ \texttt{PCP} }
\newcommand*{\MPCP}{ \texttt{MPCP} }
\newcommand*{\INTERSECT}{\texttt{INTERSECT}}
\newcommand*{\HISTORY}{\texttt{History}}
\newcommand*{\Ldiag}{L_{\texttt{diag}}}
\newcommand*{\LEmpty}{L_{\texttt{Empty}}}
% \newenvironment{boxedd}
% {\begin{center}
% \begin{tabular}{|p{0.9\textwidth}|}
% \hline\\
% }
% {
% \\\\\hline
% \end{tabular}
% \end{center}
% }
\newenvironment{important}
{% This is the begin code
\begin{framed}
}
{% This is the end code
\end{framed}
}
\newenvironment{extra}
{% This is the begin code
% \hrulefill
\footnotesize
}
{% This is the end code
% \hrulefill
}
\newenvironment{extra2}
{% This is the begin code
\begin{multicols}{2}
% \scriptsize
\footnotesize
}
{% This is the end code
\end{multicols}
% \hrulefill
}