\begin{tikzpicture} \begin{scope}[scale=0.55] {\tiny \draw[step=1,help lines,color=black] grid (4,4); \node[anchor=north] (y2) at ([xshift=-3.3em,yshift=0em]n1.north) {0.01}; \node[anchor=north] (y1) at ([xshift=0em,yshift=-3.3em]y2.south) {0.00}; \node[anchor=north] (y3) at ([xshift=0em,yshift=4.5em]y2.north) {0.02}; \node[anchor=north] (y4) at ([xshift=0em,yshift=6.6em]y3.north) {$\vdots$}; \node[anchor=north] (y5) at ([xshift=0em,yshift=2em]y4.north) {1.00}; \node[anchor=north] (x1) at ([xshift=2em,yshift=-3em]n1.south) {$\lambda_1$}; \node[anchor=north] (x2) at ([xshift=4.5em,yshift=0em]x1.north) {$\lambda_2$}; \node[anchor=north] (x3) at ([xshift=4em,yshift=-1em]x2.north) {$...$}; \node[anchor=north] (x4) at ([xshift=5em,yshift=1em]x3.north) {$\lambda_{M-1}$}; \node[anchor=north] (x5) at ([xshift=5em,yshift=0em]x4.north) {$\lambda_M$}; \draw [-](n1) (0,4) -- (0,4.4); \draw [-](n2) (1,4) -- (1,4.4); \draw [-](n3) (2,4) -- (2,4.4); \draw [-](n4) (3,4) -- (3,4.4); \draw [-](n5) (4,4) -- (4,4.4); \node [anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r11) at (0,1) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r12) at (1,2) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r13) at (2,1) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r14) at (3,2) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,blue!30,fill=blue!30] (r15) at (4,4) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,ugreen!30,fill=ugreen!30] (r21) at (0,2) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,ugreen!30,fill=ugreen!30] (r22) at (1,3) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,ugreen!30,fill=ugreen!30] (r23) at (2,4) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,ugreen!30,fill=ugreen!30] (r24) at (3,0) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,ugreen!30,fill=ugreen!30] (r25) at (4,2) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r31) at (0,4) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r32) at (1,3) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r33) at (2,2) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r34) at (3,3) {}; \node [anchor=center,draw,circle,inner sep=1.5pt,red!30,fill=red!30] (r35) at (4,1) {}; \draw [-,very thick,blue!50] (0,1) -- (1,2) -- (2,1) -- (3,2) -- (4,4); \draw [-,very thick,ugreen!50] (0,2) -- (1,3) -- (2,4) -- (3,0) -- (4,2); \draw [-,very thick,red!50] (0,4) -- (1,3) -- (2,2) -- (3,3) -- (4,1); \draw[decorate,decoration={brace}](4.5,4.3) --(4.5,0) node [xshift=2.3em,yshift=7.5em,align=center](label1) {$M^V$}; \node[anchor=north] (label2) at ([xshift=0em,yshift=-2.5em]label1.north) {pathes}; } \end{scope} \end{tikzpicture}