Improve language

This commit is contained in:
Antti H S Laaksonen 2017-05-29 20:22:28 +03:00
parent 38c59da9ea
commit 5362b37bda
1 changed files with 8 additions and 15 deletions

View File

@ -29,7 +29,7 @@ For example, consider the following graph:
\path[draw,thick,-] (3) -- node[font=\small,label=left:3] {} (6); \path[draw,thick,-] (3) -- node[font=\small,label=left:3] {} (6);
\end{tikzpicture} \end{tikzpicture}
\end{center} \end{center}
A possible spanning tree for the graph is as follows: One spanning tree for the graph is as follows:
\begin{center} \begin{center}
\begin{tikzpicture}[scale=0.9] \begin{tikzpicture}[scale=0.9]
\node[draw, circle] (1) at (1.5,2) {$1$}; \node[draw, circle] (1) at (1.5,2) {$1$};
@ -67,12 +67,9 @@ is 20, and such a tree can be constructed as follows:
\node[draw, circle] (6) at (5,1) {$6$}; \node[draw, circle] (6) at (5,1) {$6$};
\path[draw,thick,-] (1) -- node[font=\small,label=above:3] {} (2); \path[draw,thick,-] (1) -- node[font=\small,label=above:3] {} (2);
%\path[draw,thick,-] (2) -- node[font=\small,label=above:5] {} (3);
%\path[draw,thick,-] (3) -- node[font=\small,label=above:9] {} (4);
\path[draw,thick,-] (1) -- node[font=\small,label=below:5] {} (5); \path[draw,thick,-] (1) -- node[font=\small,label=below:5] {} (5);
\path[draw,thick,-] (5) -- node[font=\small,label=below:2] {} (6); \path[draw,thick,-] (5) -- node[font=\small,label=below:2] {} (6);
\path[draw,thick,-] (6) -- node[font=\small,label=below:7] {} (4); \path[draw,thick,-] (6) -- node[font=\small,label=below:7] {} (4);
%\path[draw,thick,-] (2) -- node[font=\small,label=left:6] {} (5);
\path[draw,thick,-] (3) -- node[font=\small,label=left:3] {} (6); \path[draw,thick,-] (3) -- node[font=\small,label=left:3] {} (6);
\end{tikzpicture} \end{tikzpicture}
\end{center} \end{center}
@ -92,14 +89,11 @@ example graph is 32:
\node[draw, circle] (4) at (6.5,2) {$4$}; \node[draw, circle] (4) at (6.5,2) {$4$};
\node[draw, circle] (5) at (3,1) {$5$}; \node[draw, circle] (5) at (3,1) {$5$};
\node[draw, circle] (6) at (5,1) {$6$}; \node[draw, circle] (6) at (5,1) {$6$};
%\path[draw,thick,-] (1) -- node[font=\small,label=above:3] {} (2);
\path[draw,thick,-] (2) -- node[font=\small,label=above:5] {} (3); \path[draw,thick,-] (2) -- node[font=\small,label=above:5] {} (3);
\path[draw,thick,-] (3) -- node[font=\small,label=above:9] {} (4); \path[draw,thick,-] (3) -- node[font=\small,label=above:9] {} (4);
\path[draw,thick,-] (1) -- node[font=\small,label=below:5] {} (5); \path[draw,thick,-] (1) -- node[font=\small,label=below:5] {} (5);
%\path[draw,thick,-] (5) -- node[font=\small,label=below:2] {} (6);
\path[draw,thick,-] (6) -- node[font=\small,label=below:7] {} (4); \path[draw,thick,-] (6) -- node[font=\small,label=below:7] {} (4);
\path[draw,thick,-] (2) -- node[font=\small,label=left:6] {} (5); \path[draw,thick,-] (2) -- node[font=\small,label=left:6] {} (5);
%\path[draw,thick,-] (3) -- node[font=\small,label=left:3] {} (6);
\end{tikzpicture} \end{tikzpicture}
\end{center} \end{center}
@ -107,15 +101,14 @@ Note that a graph may have several
minimum and maximum spanning trees, minimum and maximum spanning trees,
so the trees are not unique. so the trees are not unique.
This chapter discusses algorithms It turns out that several greedy methods
for constructing spanning trees. can be used to construct minimum and maximum
It turns out that it is easy to find spanning trees.
minimum and maximum spanning trees, In this chapter, we discuss two algorithms
because many greedy methods produce optimals solutions. that process
We will learn two algorithms that both process
the edges of the graph ordered by their weights. the edges of the graph ordered by their weights.
We will focus on finding minimum spanning trees, We focus on finding minimum spanning trees,
but similar algorithms can be used for finding but the same algorithms can find
maximum spanning trees by processing the edges in reverse order. maximum spanning trees by processing the edges in reverse order.
\section{Kruskal's algorithm} \section{Kruskal's algorithm}