-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalbero_ricerca_25-11-24.tex
63 lines (56 loc) · 3.03 KB
/
albero_ricerca_25-11-24.tex
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
% !TEX TS-program = lualatex
\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgf}
\usepackage{pgfcore}
\usepackage{pgfplots}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{cancel}
\usetikzlibrary{graphs,graphdrawing,calc}
\pgfplotsset{compat=1.18}
\begin{document}
\usegdlibrary{trees}
\tikz[tree layout, nodes={circle, thick}, inner sep=0.5pt]
\node[blue, draw, text=black] {$s_0$};
\tikz[tree layout, nodes={circle, thick}, inner sep=0.5pt]
\node[draw, text=black] {$s_0$}
child { node[draw, red, text=black] {$s_1$} edge from parent node[fill=white]{$4$}}
child { node[draw, red, text=black] {$s_2$} edge from parent node[fill=white]{$2$}}
child { node[draw, blue, text=black] {$s_3$} edge from parent node[fill=white]{$3$}}
;
\tikz[tree layout, nodes={circle, thick}, inner sep=0.5pt]
\node[draw, text=black] {$s_0$}
child { node[draw, red, text=black] {$s_1$} edge from parent node[fill=white]{$4$}}
child { node[draw, blue, text=black] {$s_2$} edge from parent node[fill=white]{$2$}}
child { node[draw, text=black] {$s_3$} edge from parent node[fill=white]{$3$}
child { node[draw, red, text=black] {$s_2$} edge from parent node[fill=white]{$4$}}
child { node[draw, red, text=black] {$s_4$} edge from parent node[fill=white]{$4$}}
child { node[draw, red, text=black] {$s_5$} edge from parent node[fill=white]{$7$}}
}
;
\tikz[tree layout, nodes={circle, thick}, inner sep=0.5pt]
\node[draw, text=black] {$s_0$}
child { node[draw, red, text=black] {$s_1$} edge from parent node[fill=white]{$4$}}
child { node[draw, text=black] {$s_2$} edge from parent node[fill=white]{$2$}
child { node[draw, blue, text=black] {$s_4$} edge from parent node[fill=white]{$3$}}
}
child { node[draw, text=black] {$s_3$} edge from parent node[fill=white]{$3$}
child { node[draw, red, text=black] {$\cancel{s_2}$} edge from parent node[fill=white]{$4$}}
child { node[draw, red, text=black] {$s_4$} edge from parent node[fill=white]{$4$}}
child { node[draw, red, text=black] {$s_5$} edge from parent node[fill=white]{$7$}}
}
;
\tikz[tree layout, nodes={circle, thick}, inner sep=0.5pt]
\node[draw, text=black] {$s_0$}
child { node[draw, red, text=black] {$s_1$} edge from parent node[fill=white]{$4$}}
child { node[draw, text=black] {$s_2$} edge from parent node[fill=white]{$2$}
child { node[draw, black, text=black] {$s_4$} edge from parent node[fill=white]{$3$}}
}
child { node[draw, text=black] {$s_3$} edge from parent node[fill=white]{$3$}
child { node[draw, red, text=black] {$\cancel{s_2}$} edge from parent node[fill=white]{$4$}}
child { node[draw, red, text=black] {$\cancel{s_4}$} edge from parent node[fill=white]{$4$}}
child { node[draw, blue, text=black] {$s_5$} edge from parent node[fill=white]{$7$}}
}
;
\end{document}