Blog 1

Random Talk on Random Thoughts

Star of David in Pascal's Triangle

| Comments |

Yesterday, I learnt drawing simple TikZ diagrams.

In my opinion, defining nodes while connecting them will not look good.

\path[draw] (0, 0) node {A} -- (1,0) -- (1,1) node {B};

I define the nodes before connecting them, and the result is what I desire.

Drawing basic TikZ diagramslink
1
2
3
\node (A) at (0,0) {A};
\node (B) at (1,1) {B};
\draw (A) -- (1,0) -- (B);

I overlooked the meaning of clipping in Meik Hellmund’s short TikZ tutorial.1 I constructed the diagram using the edge command.

(DavidStar.tex) download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
  \node (A) at (1,0) {${{n + 1}\choose{r}}$};
  \node (C) at (4,2) {${{n}\choose{r + 1}}$} edge (A);
  \node (E) at (1,4) {${{n - 1}\choose{r - 1}}$} edge (C)
                                                 edge (A);
  \node (B) at (3,0) {${{n + 1}\choose{r + 1}}$};
  \node (D) at (3,4) {${{n - 1}\choose{r}}$} edge (B);
  \node (F) at (0,2) {${{n}\choose{r - 1}}$} edge (B)
                                             edge (D);
  \node (G) at (2,2) {${n \choose r}$};
\end{tikzpicture}
\end{document}

Realising that $\displaystyle {n \choose k} = \frac{n!}{r! (n - r)!}$, one can easily see that

\[ \binom{n - 1}{k - 1} \binom{n}{k + 1} \binom{n + 1}{k} = \binom{n - 1}{k} \binom{n}{k - 1} \binom{n + 1}{k + 1}. \]


  1. See p.12 of the tutorial.

    “It is often better to define named nodes first and connect them later, since then the paths are clipped around the notes…”

Comments