File size: 4,290 Bytes
db39dbc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
\begin{tikzpicture}[
    scale=0.9,
    font=\small,
    % Tree Styles
    level distance=1.5cm, 
    % Node Styles
    treenode/.style={circle, draw, line width=0.8pt, inner sep=0pt,
                     drop shadow={opacity=0.3, shadow xshift=1.5pt, shadow yshift=-1.5pt}},
    leaf/.style={treenode, draw=blue!50!black, fill=blue!10, minimum size=7mm},
    internal_binary/.style={treenode, draw=gray!70!black, fill=gray!15, minimum size=8mm},
    internal_poly/.style={treenode, draw=red!70!black, fill=red!15, minimum size=8mm, line width=1pt},
    internal_artificial/.style={treenode, draw=yellow!70!black, fill=yellow!25, minimum size=8mm, line width=1pt, dashed},
    % Edge Styles
    edge from parent/.style={draw, line width=0.8pt, gray!60}
]

% ==========================================
% PANEL A: ORIGINAL POLYTOMOUS TREE
% ==========================================
\begin{scope}[xshift=0cm]
    % Title
    \node[font=\bfseries\large, anchor=south] at (0.9, -0.2) {Original $\mathcal{T}$};

    % --- The Tree ---
    \node[internal_poly] (root) at (0.9, -1) {}
        child[sibling distance=1.8cm] {node[leaf] {1}}
        child[sibling distance=1.8cm] {node[leaf] {2}}
        child[sibling distance=1.8cm] {node[internal_binary] (A) {}
            child[sibling distance=1.1cm] {node[leaf] {3}}
            child[sibling distance=1.1cm] {node[leaf] {4}}
        };

    % Label for k=3
    \node[right=0.15cm of root, font=\small, text=red!60!black] {$k\!=\!3$};

    % --- The Matrix ---
    \begin{scope}[yshift=-5.0cm]
        % Matrix Frame
        \draw[fill=white, drop shadow={opacity=0.1}] (0.0, 0) rectangle (2.4, -0.7);
        
        % Root columns (red) - 2 columns for k=3
        \fill[red!15] (0.0, 0) rectangle (1.6, -0.7);
        \draw[red!30] (0.8, 0) -- (0.8, -0.7);
        
        % Binary node column (gray) - 1 column
        \fill[gray!15] (1.6, 0) rectangle (2.4, -0.7);
        
        % Frame
        \draw[thick] (0.0, 0) rectangle (2.4, -0.7);
        
        % Matrix Label below
        \node[font=\large, anchor=north] at (1.2, -0.9) {$V \in \mathbb{R}^{4 \times 3}$};
    \end{scope}
    
    % Dotted arrow from root to V columns - less curvy
    \draw[-{Stealth[length=2.5mm]}, red!40, line width=1.2pt, dashed] 
        (root.south west) .. controls (-0.5, -3.0) and (0.0, -4.0) .. (0.8, -4.8);
\end{scope}

% ==========================================
% SEPARATOR
% ==========================================
\draw[gray!20, line width=1.5pt] (4.2, 0) -- (4.2, -5.5);


% ==========================================
% PANEL B: BINARIZED TREE
% ==========================================
\begin{scope}[xshift=6.0cm]
    % Title
    \node[font=\bfseries\large, anchor=south] at (0.9, -0.2) {Binarized $\mathcal{T}_b$};

    % --- The Tree ---
    \node[internal_binary] (root_b) at (0.9, -1) {}
        child[sibling distance=2.5cm] {node[internal_artificial] (art) {}
            child[sibling distance=1.1cm] {node[leaf] {1}}
            child[sibling distance=1.1cm] {node[leaf] {2}}
        }
        child[sibling distance=2.5cm] {node[internal_binary] {}
            child[sibling distance=1.1cm] {node[leaf] {3}}
            child[sibling distance=1.1cm] {node[leaf] {4}}
        };

    % Label for artificial node
    \node[right=0.05cm of art, font=\small, text=yellow!60!black] {artificial};

    % --- The Matrix ---
    \begin{scope}[yshift=-5.0cm]
        % Matrix Frame
        \draw[fill=white, drop shadow={opacity=0.1}] (-0.3, 0) rectangle (2.1, -0.7);
        
        % Root column (gray - now binary)
        \fill[gray!15] (-0.3, 0) rectangle (0.5, -0.7);
        
        % Artificial node column (yellow)
        \fill[yellow!25] (0.5, 0) rectangle (1.3, -0.7);
        
        % Other binary node column (gray)
        \fill[gray!15] (1.3, 0) rectangle (2.1, -0.7);
        
        % Grid lines
        \draw[gray!30] (0.5, 0) -- (0.5, -0.7);
        \draw[yellow!50] (1.3, 0) -- (1.3, -0.7);
        
        % Frame
        \draw[thick] (-0.3, 0) rectangle (2.1, -0.7);
        
        % Matrix Label below
        \node[font=\large, anchor=north] at (0.9, -0.9) {$V_b \in \mathbb{R}^{4 \times 3}$};
    \end{scope}

\end{scope}

% Bounding box
\path (-1.5, -7.0) rectangle (10, 1);
\end{tikzpicture}