Skip to content

Commit 8db1b05

Browse files
committed
Куза правок везде и сразу.
1 parent 1dda7c2 commit 8db1b05

9 files changed

+361
-163
lines changed

tex/Context-Free_Languages.tex

Lines changed: 212 additions & 70 deletions
Large diffs are not rendered by default.

tex/FormalLanguageConstrainedReachabilityLectureNotes.bib

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2098,4 +2098,24 @@ @Article{ foster.ea:efsm:2020
20982098
title = {A Formal Model of Extended Finite State Machines},
20992099
url = {https://www.brucker.ch/bibliography/abstract/foster.ea-efsm-2020},
21002100
year = {2020},
2101-
}
2101+
}
2102+
2103+
@article{10.1145/1075382.1075387,
2104+
author = {Alur, Rajeev and Benedikt, Michael and Etessami, Kousha and Godefroid, Patrice and Reps, Thomas and Yannakakis, Mihalis},
2105+
title = {Analysis of Recursive State Machines},
2106+
year = {2005},
2107+
issue_date = {July 2005},
2108+
publisher = {Association for Computing Machinery},
2109+
address = {New York, NY, USA},
2110+
volume = {27},
2111+
number = {4},
2112+
issn = {0164-0925},
2113+
url = {https://doi.org/10.1145/1075382.1075387},
2114+
doi = {10.1145/1075382.1075387},
2115+
abstract = {Recursive state machines (RSMs) enhance the power of ordinary state machines by allowing vertices to correspond either to ordinary states or to potentially recursive invocations of other state machines. RSMs can model the control flow in sequential imperative programs containing recursive procedure calls. They can be viewed as a visual notation extending Statecharts-like hierarchical state machines, where concurrency is disallowed but recursion is allowed. They are also related to various models of pushdown systems studied in the verification and program analysis communities.After introducing RSMs and comparing their expressiveness with other models, we focus on whether verification can be efficiently performed for RSMs. Our first goal is to examine the verification of linear time properties of RSMs. We begin this study by dealing with two key components for algorithmic analysis and model checking, namely, reachability (Is a target state reachable from initial states?) and cycle detection (Is there a reachable cycle containing an accepting state?). We show that both these problems can be solved in time O(nθ2) and space O(nθ), where n is the size of the recursive machine and θ is the maximum, over all component state machines, of the minimum of the number of entries and the number of exits of each component. From this, we easily derive algorithms for linear time temporal logic model checking with the same complexity in the model. We then turn to properties in the branching time logic CTL*, and again demonstrate a bound linear in the size of the state machine, but only for the case of RSMs with a single exit node.},
2116+
journal = {ACM Trans. Program. Lang. Syst.},
2117+
month = {jul},
2118+
pages = {786–818},
2119+
numpages = {33},
2120+
keywords = {model checking, program analysis, Software verification, temporal logic, context-free languages, recursive state machines, pushdown automata}
2121+
}

tex/FormalLanguageConstrainedReachabilityLectureNotes.tex

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,11 @@
1010
\input{styles/tikz.tex}
1111
\input{styles/math.tex}
1212
\input{styles/theorems.tex}
13+
\input{styles/algorithm.tex}
1314

1415
\usepackage{kaobiblio} % Обертка для biblatex, позволяет печатать сноску сбоку
1516
\addbibresource{FormalLanguageConstrainedReachabilityLectureNotes.bib}
1617

17-
\usepackage[]{pseudo}
18-
\newtcbtheorem{algorithm}{Листинг}{pseudo/booktabs, float, floatplacement=h, separator sign={.}}{algo}
19-
20-
\usepackage{caption}
21-
\usepackage{subcaption}
22-
\usetikzlibrary {backgrounds}
23-
2418
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
2519
\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
2620

tex/GraphTheoryIntro.tex

Lines changed: 81 additions & 40 deletions
Large diffs are not rendered by default.

tex/LinearAlgebra.tex

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ \section{Матрицы и вектора}
414414

415415
Примерами структурных операций является \emph{транспонирование}, \emph{взятие подматрицы} и \emph{взятие элемента по индексу}.
416416

417-
\marginnote{
418417
\begin{example}
419418
Транспонирование матрицы.
420419
\[
@@ -429,7 +428,7 @@ \section{Матрицы и вектора}
429428
\end{pmatrix}
430429
\]
431430
\end{example}
432-
}
431+
433432
\begin{definition}[Транспонирование матрицы]
434433
Пусть дана матрица $M_{n \times m}$.
435434
Тогда результат её \emph{транспонирования}, это такая матрица $M'_{m \times n}$, что $M'[i,j] = M[j,i]$ для всех $i \in [0 \rng m - 1]$ и $j \in [0 \rng n - 1]$.
@@ -450,41 +449,39 @@ \section{Матрицы и вектора}
450449
Где 0 обозначает нулевой блок. Прямая сумма обозначается $L = M \oplus N$.
451450
\end{definition}
452451

453-
\marginnote{
454-
\begin{example}
455-
Взятие подматрицы.
456-
\begin{multline*}
457-
\begin{pmatrix}
458-
"a" & "ba" & "cb" \\
459-
"ac" & "bab" & "b"
460-
\end{pmatrix} [0 \rng 1, 1 \rng 2] = \\
461-
= \begin{pmatrix}
462-
"ba" & "cb" \\
463-
"bab" & "b"
464-
\end{pmatrix}
465-
\end{multline*}
466-
\end{example}
467-
}
468452
\begin{definition}[Взятие подматрицы]
469453
Пусть дана матрица $M_{n\times m}$.
470454
Тогда $M_{n \times m}[i_0 \rng i_1, j_0 \rng j_1]$~--- это такая $M'_{(i_1 - i_0 + 1) \times (j_1 - j_0 + 1)}$, что $M'[i, j] = M[i_0 + i, j_0 + j]$ для всех $i \in [0 \rng i_1 - i_0 + 1]$ и $j \in [0 \rng j_1 - j_0 + 1]$.
471455
\end{definition}
472456

473-
\marginnote{
474-
\begin{example}
475-
Взятие элемента по индексу.
476-
\[
477-
\begin{pmatrix}
478-
"a" & "ba" & "cb" \\
479-
"ac" & "bab" & "b"
480-
\end{pmatrix}[0, 1] = "ba"
481-
\]
482-
\end{example}
483-
}
457+
\begin{example}
458+
Взятие подматрицы.
459+
\begin{multline*}
460+
\begin{pmatrix}
461+
"a" & "ba" & "cb" \\
462+
"ac" & "bab" & "b"
463+
\end{pmatrix} [0 \rng 1, 1 \rng 2] =
464+
\begin{pmatrix}
465+
"ba" & "cb" \\
466+
"bab" & "b"
467+
\end{pmatrix}
468+
\end{multline*}
469+
\end{example}
470+
484471
\begin{definition}[Взятие элемента по индексу]
485472
\emph{Взятие элемента по индексу}~--- это частный случай взятия подматрицы, когда начало и конец \enquote{среза} совпадают: $M[i, j] = M[i \rng i, j \rng j]$.
486473
\end{definition}
487474

475+
\begin{example}
476+
Взятие элемента по индексу.
477+
\[
478+
\begin{pmatrix}
479+
"a" & "ba" & "cb" \\
480+
"ac" & "bab" & "b"
481+
\end{pmatrix}[0, 1] = "ba"
482+
\]
483+
\end{example}
484+
488485
Из алгебраических операций над матрицами нас в дальнейшем будут интересовать \emph{поэлементные операции}, \emph{скалярные операции}, \emph{матричное умножение}, \emph{произведение Кронекера}.
489486

490487
\begin{definition}[Поэлементные операции]
@@ -587,7 +584,7 @@ \section{Матрицы и вектора}
587584
Пусть $G = (S, \circ)$~--- полугруппа, $M_{m \times n}$ и $N_{p \times q}$~--- две матрицы над этой полугруппой.
588585
Тогда \emph{произведение Кронекера} или \emph{тензорное произведение} матриц $M$ и $N$~--- это блочная матрица $K$ размера $mp \times nq$, вычисляемая следующим образом:
589586
\begin{multline*}
590-
K = M \otimes N = \\
587+
K = M \otimes N =
591588
\begin{pmatrix}
592589
(M[0,0] \circ N & \cdots & M[0,n-1] \circ N \\
593590
\vdots & \ddots & \vdots \\
@@ -598,7 +595,7 @@ \section{Матрицы и вектора}
598595

599596
\begin{remark}
600597
\label{note:KronIsNotCommutative}
601-
Произведение Кронекера не является коммутативным.
598+
Произведение Кронекера не является коммутативным\sidenote{Показать это можно по определению: найти пример, для которого $M \otimes N \neq N \otimes M$.}.
602599
При этом всегда существуют две матрицы перестановок $P$ и $Q$ такие, что $A \otimes B = P(B \otimes A)Q$.
603600
\end{remark}
604601

tex/figures/cfl/tree0.tex

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
\begin{tikzpicture}[sibling distance=4em,
1+
\begin{tikzpicture}[sibling distance=3em,
22
every node/.style = {shape=rectangle, rounded corners,
3-
draw, align=center}]]
3+
draw, align=center}]
44
\node {S}
55
child { node {a} }
66
child { node {S}
@@ -14,14 +14,7 @@
1414
}
1515
child { node {b} }
1616
child { node {S}
17-
child {node {a}}
18-
child {node {S}
1917
child {node {$\varepsilon$}}
2018
}
21-
child {node {b}}
22-
child {node {S}
23-
child {node {$\varepsilon$}}
24-
}
25-
}
26-
};
19+
};
2720
\end{tikzpicture}

tex/styles/algorithm.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
\usepackage[linesnumbered,algochapter,lined,noend]{algorithm2e}
2+
3+
\renewcommand*{\algorithmcfname}{Алгоритм}
4+
\SetKwInput{KwData}{Входные данные}
5+
\SetKwInput{KwResult}{Результат работы}

tex/styles/tikz.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
\usetikzlibrary{shapes.geometric}
66
\usetikzlibrary{automata}
77
\usetikzlibrary{decorations.pathmorphing}
8+
\usetikzlibrary{backgrounds}
9+
\usetikzlibrary{calc}
10+
\usetikzlibrary{arrows}
11+
\usetikzlibrary{fit}
12+
813

914
\tikzsetexternalprefix{figures/externalized/}
1015

tex/styles/utils.tex

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
\usepackage{xurl} % Разрешить переносить URL на любой букве
22
\usepackage[noheader]{gitver}
3+
\usepackage{caption}
34
\usepackage{subcaption}
45

56
\NewDocumentCommand{\email}{m}{\href{mailto:#1}{#1}} % Кликабельный email
67

78
%% : с чуть более узки расстоянием по бокам.
89
%% Определено в pseudo, потому пока что закомментировано
9-
% \NewDocumentCommand \rng { } {
10-
% \nolinebreak
11-
% \mathinner { : }
12-
% \nolinebreak
13-
% }
10+
\NewDocumentCommand \rng { } {
11+
\nolinebreak
12+
\mathinner { : }
13+
\nolinebreak
14+
}

0 commit comments

Comments
 (0)