Army Math Lattice

Snippets Page

How many ways can you spell "ARMY MATH" in this lattice? # Source Code

\begin{tikzpicture}
\tikzstyle{all nodes}=[inner sep=4pt]
\draw node(A)at(0,0){$A$}
node(RA)at(1,.5){$R$}node(RB)at(1,-.5){$R$}
node(MA)at(2,1){$M$}node(MB)at(2,0){$M$}node(MC)at(2,-1){$M$}
node(YA)at(3,1.5){$Y$}node(YB)at(3,.5){$Y$}node(YC)at(3,-.5){$Y$}node(YD)at(3,-1.5){$Y$};
\draw[shift={(0,-.5)}]
node(NA)at(4,1.5){$M$}node(NB)at(4,.5){$M$}node(NC)at(4,-.5){$M$}node(ND)at(4,-1.5){$M$}
node(BA)at(5,1){$A$}node(BB)at(5,0){$A$}node(BC)at(5,-1){$A$}
node(TA)at(6,.5){$T$}node(TB)at(6,-.5){$T$}
node(H)at(7,0){$H$};
\foreach\xa/\xb in{A/RA,A/RB,RA/MA,RA/MB,RB/MB,RB/MC,MA/YA,MA/YB,MB/YB,MB/YC,MC/YC,MC/YD,%
YA/NA,YB/NA,YB/NB,YC/NB,YC/NC,YD/NC,YD/ND,
NA/BA,NB/BA,NB/BB,NC/BB,NC/BC,ND/BC,BA/TA,BB/TA,BB/TB,BC/TB,TA/H,TB/H}
{\draw[->](\xa)--(\xb);}
\end{tikzpicture}

page revision: 1, last edited: 16 Dec 2008 17:17
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License