% Copyright 2014, 2015 Kevin Ryde
%


\documentclass{article}
\usepackage[T1]{fontenc}  % T1 for accents, before babel
\usepackage{amsmath}
\allowdisplaybreaks

\usepackage{float}      % for \begin{figure}[H]
\usepackage{gensymb}    % for \degree
\usepackage{hyphenat}   % for \hyp hyphenation of words with -

\usepackage[pdfusetitle,
            pdflang={en}, % RFC3066 style ISO639
           ]{hyperref}
\renewcommand\figureautorefname{figure}   % lower case
\renewcommand\theoremautorefname{theorem} % lower case
\providecommand*{\lemmaautorefname}{lemma}
\providecommand*{\corollaryautorefname}{corollary}
\usepackage[all]{hypcap} % figure links to top of figure

\usepackage{mathtools}  % for \mathclap and showonlyrefs
\mathtoolsset{showonlyrefs}

\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{corollary}{Corollary}

\usepackage{tikz}
\usetikzlibrary{arrows.meta}  % for arrow To[length etc
\usetikzlibrary{bending}      % for arrow [bend]
\usetikzlibrary{calc}         % for ($(...)$) coordinate calculations
\usetikzlibrary{decorations}  % for [decoration=]
\usetikzlibrary{decorations.pathreplacing}  % for decoration=brace
\usetikzlibrary{shapes}       % for shape aspect=1
\tikzset{>=Latex}             % arrowhead style
  % must be capital Latex for [harpoon] half arrows

\hyphenation{Amer-ican}
\hyphenation{Pos-it-ive}
\hyphenation{Calc-ul-at-ions}
\hyphenation{Rep-lic-at-ions}
\hyphenation{Twin-drag-on}
\hyphenation{Pap-er-fold-ing}
\hyphenation{Bit-Above-Low-est-One}
\hyphenation{gBit-Above-Low-est-One}
\hyphenation{Blob-List}
\hyphenation{Blob-Seg-ments}
\hyphenation{Blob-Delta}
\hyphenation{Blob-Delta-Len}
\hyphenation{Blob-Start}
\hyphenation{Drag-on-Bord-er}
\hyphenation{fract-al}
\hyphenation{trig-on-om-et-ric}
\hyphenation{co-eff-ic-ients}

%---------------------------------
% personal preferences

\hypersetup{
  pdfborderstyle={/W 0},  % no border on hyperlinks
}

\usepackage{lastpage} % for \pageref{LastPage}
\makeatletter
\newcommand\ps@MyPageMofN{%
  \let\@oddhead\@empty
  \let\@evenhead\@empty
  \def\@oddfoot{\normalfont\rlap{Draft XX} \hfil page \thepage\ of \pageref*{LastPage} \hfil}
  \let\@evenfoot\@oddfoot
}
\newcommand\ps@MyFirstPageMofN{%
  \ps@MyPageMofN
  \def\@oddhead{\hfil\scriptsize\url{\MyWebPage}}
  \let\@evenhead\@oddhead
}
\makeatother
\pagestyle{MyPageMofN}

\setlength\abovecaptionskip{.5\baselineskip}   % less space after
% cf \belowcaptionskip \abovedisplayskip \belowdisplayskip
%
% \setlength\intextsep{0\baselineskip}
% \setlength\textfloatsep{0\baselineskip}

% these must be after \begin{document} to take effect, hence \AtBeginDocument
\AtBeginDocument{%
  \setlength\abovedisplayskip{.7\baselineskip}
  \setlength\belowdisplayskip{.7\baselineskip}
  \setlength\abovedisplayshortskip{.5\baselineskip}
  \setlength\belowdisplayshortskip{.5\baselineskip}
}

% less space after "plain" style \end{theorem} etc
\makeatletter
\g@addto@macro\th@plain{\thm@postskip=1\baselineskip}
\makeatother

%------------------------------------------------------------------------------
% GP-DEFINE  default(strictargs,1);

\newcommand\MySlash{\slash\hspace{0pt}}
\newcommand\MyTightDots{.\kern.1em.\kern.1em.}

\newbox\MyNegativePhantomBox
\newcommand\MyNegativePhantom[1]{%
  \setbox\MyNegativePhantomBox\hbox{#1}%
  \hbox to -\wd\MyNegativePhantomBox{}}
% -\wd\MyNegativePhantomBox

% % Uncomment this to see the bounding box around each picture.
% \tikzset{
%   every picture/.append style={
%     execute at end picture={
%       \draw (current bounding box.south west)
%         rectangle (current bounding box.north east);
% }}}


%------------------------------------------------------------------------------
\begin{document}

%------------------------------------------------------------------------------
\section{Hanoi 2 Discs, 4 Spindles, Star}

\begin{center}
\begin{tikzpicture}
    [scale=1.25,
     my box/.style={circle,draw,inner sep=.15em,outer sep=.3em},
     font=\scriptsize,
    ]
  % degree=2 count 9
  % degree=3 count 4
  % degree=4 count 3

  \node at (0,0)   [my box,name=00] {00};
  \node at (30:1)  [my box,name=01] {01};
  \node at (-90:1) [my box,name=02] {02};
  \node at (150:1) [my box,name=03] {03};

  \begin{scope}[shift={(210:2)}]
  \node at (0,0)   [my box,name=10] {10};
  \node at (210:1) [my box,name=11] {11};
  \node at (-30:1) [my box,name=12] {12};
  \node at (90:1) [my box,name=13] {13};
  \end{scope}

  \begin{scope}[shift={(90:2)}]
  \node at (0,0)   [my box,name=20] {20};
  \node at (-30:1) [my box,name=21] {21};
  \node at (90:1) [my box,name=22] {22};
  \node at (210:1) [my box,name=23] {23};
  \end{scope}

  \begin{scope}[shift={(-30:2)}]
  \node at (0,0)   [my box,name=30] {30};
  \node at (90:1) [my box,name=31] {31};
  \node at (210:1) [my box,name=32] {32};
  \node at (-30:1) [my box,name=33] {33};
  \end{scope}


  \draw [] (01) to (21);
  \draw [] (20) to (21);
  \draw [] (03) to (23);
  \draw [] (00) to (01);
  \draw [] (00) to (02);
  \draw [] (02) to (12);
  \draw [] (20) to (23);
  \draw [] (00) to (03);
  \draw [] (10) to (12);
  \draw [] (30) to (33);
  \draw [] (01) to (31);
  \draw [] (03) to (13);
  \draw [] (10) to (11);
  \draw [] (30) to (32);
  \draw [] (10) to (13);
  \draw [] (20) to (22);
  \draw [] (02) to (32);
  \draw [] (30) to (31);

\end{tikzpicture}
\end{center}

%------------------------------------------------------------------------------
\section{Hanoi 2 Discs, 4 Spindles, Linear}

% 3, 10, 19, 34, 57, 88
% A160002
% my(n=2); 3^n+n-1 == 10
% my(n=3); 3^n+n-1 == 29

\begin{center}
\begin{tikzpicture}
    [scale=1.5,
     my box/.style={circle,draw,inner sep=.15em,outer sep=.3em},
     font=\scriptsize,
    ]

  \node at (3,0) [my box,name=0] {0};
  \node at (4,0) [my box,name=1] {1};
  \node at (4,1) [my box,name=2] {2};
  \node at (4,2) [my box,name=3] {3};

  \node at (1,1) [my box,name=4] {4};
  \node at (2,1) [my box,name=5] {5};
  \node at (3,1) [my box,name=6] {6};
  \node at (3,2) [my box,name=7] {7};

  \node at (0,1) [my box,name=8] {8};
  \node at (0,2) [my box,name=9] {9};
  \node at (1,2) [my box,name=10] {10};
  \node at (2,2) [my box,name=11] {11};

  \node at (-1,1) [my box,name=12] {12};
  \node at (-1,2) [my box,name=13] {13};
  \node at (-1,3) [my box,name=14] {14};
  \node at (0,3) [my box,name=15] {15};


  \draw [] (14) to (15);
  \draw [] (9) to (10);
  \draw [] (0) to (1);
  \draw [] (9) to (8);
  \draw [] (4) to (5);
  \draw [] (3) to (7);
  \draw [] (1) to (2);
  \draw [] (7) to (11);
  \draw [] (6) to (7);
  \draw [] (4) to (8);
  \draw [] (12) to (8);
  \draw [] (9) to (13);
  \draw [] (2) to (6);
  \draw [] (13) to (14);
  \draw [] (2) to (3);
  \draw [] (6) to (5);
  \draw [] (12) to (13);
  \draw [] (10) to (11);

\end{tikzpicture}
\end{center}

%------------------------------------------------------------------------------
\section{Hanoi 2 Discs, 4 Spindles, Cyclic}

\begin{center}
\begin{tikzpicture}
    [scale=2,
     my box/.style={circle,draw,inner sep=.15em,outer sep=.3em},
     font=\scriptsize,
    ]

  \node at (0,0) [my box,name=0] {0};
  \node at (0,1) [my box,name=1] {1};
  \node at (1,1) [my box,name=2] {2};
  \node at (1,0) [my box,name=3] {3};

  \node at (3,1) [my box,name=4] {4};
  \node at (3,0) [my box,name=5] {5};
  \node at (2,0) [my box,name=6] {6};
  \node at (2,1) [my box,name=7] {7};

  \node at (2,2) [my box,name=8] {8};
  \node at (2,3) [my box,name=9] {9};
  \node at (3,3) [my box,name=10] {10};
  \node at (3,2) [my box,name=11] {11};

  \node at (1,3) [my box,name=12] {12};
  \node at (1,2) [my box,name=13] {13};
  \node at (0,2) [my box,name=14] {14};
  \node at (0,3) [my box,name=15] {15};

  \draw [] (2) to (6);
  \draw [] (1) to (13);
  \draw [] (13) to (14);
  \draw [] (7) to (4);
  \draw [] (1) to (2);
  \draw [] (15) to (14);
  \draw [] (11) to (10);
  \draw [] (4) to (5);
  \draw [] (8) to (4);
  \draw [] (6) to (7);
  \draw [] (12) to (13);
  \draw [] (8) to (12);
  \draw [] (0) to (3);
  \draw [] (9) to (10);
  \draw [] (8) to (9);
  \draw [] (0) to (1);
  \draw [] (8) to (11);
  \draw [] (3) to (7);
  \draw [] (6) to (5);
  \draw [] (3) to (2);
  \draw [] (12) to (15);
  \draw [] (2) to (14);
  \draw [] (9) to (13);
  \draw [] (11) to (7);

\end{tikzpicture}
\end{center}

%------------------------------------------------------------------------------
\section{Hanoi 2 Discs 4 Spindles}

\begin{center}
\begin{tikzpicture}
    [scale=.75,
     my box/.style={circle,draw,inner sep=.15em,outer sep=.3em},
     font=\scriptsize,
    ]

  \node at (0,8) [my box,name=0] {0};
  \node at (-1,7) [my box,name=1] {1};
  \node at (1,7) [my box,name=2] {2};
  \node at (0,6) [my box,name=3] {3};

  \node at (4,3) [my box,name=4] {4};
  \node at (5,4) [my box,name=5] {5};
  \node at (3,4) [my box,name=6] {6};
  \node at (4,5) [my box,name=7] {7};

  \node at (-4,3) [my box,name=8] {8};
  \node at (-3,4) [my box,name=9] {9};
  \node at (-5,4) [my box,name=10] {10};
  \node at (-4,5) [my box,name=11] {11};

  \node at (0,2) [my box,name=12] {12};
  \node at (-1,1) [my box,name=13] {13};
  \node at (1,1) [my box,name=14] {14};
  \node at (0,0) [my box,name=15] {15};

  \draw [] (9) to (11);
  \draw [] (4) to (6);
  \draw [] (3) to (11);
  \draw [] (8) to (9);
  \draw [] (15) to (14);
  \draw [] (12) to (15);
  \draw [] (5) to (6);
  \draw [] (12) to (14);
  \draw [] (15) to (13);
  \draw [] (8) to (12);
  \draw [] (8) to (11);
  \draw [] (1) to (13);
  \draw [] (9) to (13);
  \draw [] (6) to (14);
  \draw [] (4) to (7);
  \draw [] (5) to (7);
  \draw [] (7) to (11);
  \draw [] (0) to (2);
  \draw [] (10) to (9);
  \draw [] (1) to (9);
  \draw [] (3) to (7);
  \draw [] (4) to (12);
  \draw [] (6) to (7);
  \draw [] (0) to (1);
  \draw [] (1) to (2);
  \draw [] (4) to (5);
  \draw [] (12) to (13);
  \draw [] (10) to (11);
  \draw [] (13) to (14);
  \draw [] (4) to (8);
  \draw [] (8) to (10);
  \draw [] (2) to (6);
  \draw [] (2) to (3);
  \draw [] (0) to (3);
  \draw [] (2) to (14);
  \draw [] (1) to (3);

\end{tikzpicture}
\end{center}

\begin{center}
\begin{tikzpicture}
    [scale=.8,
     my box/.style={circle,draw,inner sep=.15em,outer sep=.3em},
     font=\scriptsize,
    ]

  \node at (-0*36: 5) [my box,name=1-2] {1,2};    % 3
  \node at (-1*36: 5) [my box,name=2-5] {2,5};    % 7
  \node at (-2*36: 5) [my box,name=2-4] {2,4};    % 6
  \node at (-3*36: 5) [my box,name=2-3] {2,3};    % 5
  \node at (-4*36: 5) [my box,name=3-5] {3,5};    % 8
  \node at (-5*36: 5) [my box,name=3-4] {3,4};    % 7
  \node at (-6*36: 5) [my box,name=1-3] {1,3};    % 4

  \node at (-7*36: 5) [my box,name=1-5] {1,5};    % 6
  \node at (-8*36: 5) [my box,name=1-4] {1,4};    % 5
  \node at (-9*36: 5) [my box,name=4-5] {4,5};    % 9

  \draw (1-2) to (1-3);
  \draw (1-2) to (1-4);
  \draw (1-2) to (1-5);
  \draw (1-2) to (2-3);
  \draw (1-2) to (2-4);
  \draw (1-2) to (2-5);

  \draw (1-4) to (4-5);
  \draw (2-4) to (3-4);
  \draw (1-3) to (1-5);
  \draw (1-5) to (2-5);
  \draw (1-3) to (2-3);
  \draw (2-5) to (4-5);
  \draw (3-5) to (4-5);
  \draw (1-3) to (3-4);
  \draw (2-3) to (3-5);
  \draw (3-4) to (4-5);
  \draw (1-4) to (1-5);
  \draw (1-5) to (3-5);
  \draw (1-4) to (3-4);
  \draw (1-4) to (2-4);
  \draw (1-3) to (1-4);
  \draw (2-3) to (3-4);
  \draw (3-4) to (3-5);
  \draw (2-3) to (2-4);
  \draw (1-3) to (3-5);
  \draw (2-5) to (3-5);
  \draw (2-4) to (4-5);
  \draw (1-5) to (4-5);
  \draw (2-4) to (2-5);
  \draw (2-3) to (2-5);

\end{tikzpicture}
\end{center}

%------------------------------------------------------------------------------
\section{Johnson 5,2}

\begin{center}
\begin{tikzpicture}
    [scale=.74,
     my box/.style={circle,draw,inner sep=.15em,outer sep=.3em},
     font=\small,
    ]
  \newcommand\MyOuter{9}
  \newcommand\MyInner{6}
  % \newcommand\MyInnerAngle{54+180}
  \newcommand\MyInnerAngle{54}

  \node at (90-0*72: \MyOuter) [my box,name=1-2] {1,2};
  \node at (90-1*72: \MyOuter) [my box,name=2-3] {2,3};
  \node at (90-2*72: \MyOuter) [my box,name=3-4] {3,4};
  \node at (90-3*72: \MyOuter) [my box,name=4-5] {4,5};
  \node at (90-4*72: \MyOuter) [my box,name=1-5] {1,5};

  \node at (\MyInnerAngle-0*72: \MyInner) [my box,name=1-3] {1,3};
  \node at (\MyInnerAngle-1*72: \MyInner) [my box,name=2-4] {2,4};
  \node at (\MyInnerAngle-2*72: \MyInner) [my box,name=3-5] {3,5};
  \node at (\MyInnerAngle-3*72: \MyInner) [my box,name=1-4] {1,4};
  \node at (\MyInnerAngle-4*72: \MyInner) [my box,name=2-5] {2,5};

  \draw (1-2) to (1-3);
  \draw (1-2) to (1-4);
  \draw (1-2) to (1-5);
  \draw (1-2) to (2-3);
  \draw (1-2) to (2-4);
  \draw (1-2) to (2-5);
  
  \draw (1-4) to (4-5);
  \draw (2-4) to (3-4);
  \draw (1-3) to (1-5);
  \draw (1-5) to (2-5);
  \draw (1-3) to (2-3);
  \draw (2-5) to (4-5);
  \draw (3-5) to (4-5);
  \draw (1-3) to (3-4);
  \draw (2-3) to (3-5);
  \draw (3-4) to (4-5);
  \draw (1-4) to (1-5);
  \draw (1-5) to (3-5);
  \draw (1-4) to (3-4);
  \draw (1-4) to (2-4);
  \draw (1-3) to (1-4);
  \draw (2-3) to (3-4);
  \draw (3-4) to (3-5);
  \draw (2-3) to (2-4);
  \draw (1-3) to (3-5);
  \draw (2-5) to (3-5);
  \draw (2-4) to (4-5);
  \draw (1-5) to (4-5);
  \draw (2-4) to (2-5);
  \draw (2-3) to (2-5);

\end{tikzpicture}
\end{center}

\begin{center}
\begin{tikzpicture}
    [scale=1,
     my box/.style={circle,draw,inner sep=.15em,outer sep=.3em},
     font=\scriptsize,
    ]

  \node at (-0*36: 5) [my box,name=1-2] {1,2};    % 3
  \node at (-1*36: 5) [my box,name=2-5] {2,5};    % 7
  \node at (-2*36: 5) [my box,name=2-4] {2,4};    % 6
  \node at (-3*36: 5) [my box,name=2-3] {2,3};    % 5
  \node at (-4*36: 5) [my box,name=3-5] {3,5};    % 8
  \node at (-5*36: 5) [my box,name=3-4] {3,4};    % 7
  \node at (-6*36: 5) [my box,name=1-3] {1,3};    % 4

  \node at (-7*36: 5) [my box,name=1-5] {1,5};    % 6
  \node at (-8*36: 5) [my box,name=1-4] {1,4};    % 5
  \node at (-9*36: 5) [my box,name=4-5] {4,5};    % 9

  \draw (1-2) to (1-3);
  \draw (1-2) to (1-4);
  \draw (1-2) to (1-5);
  \draw (1-2) to (2-3);
  \draw (1-2) to (2-4);
  \draw (1-2) to (2-5);

  \draw (1-4) to (4-5);
  \draw (2-4) to (3-4);
  \draw (1-3) to (1-5);
  \draw (1-5) to (2-5);
  \draw (1-3) to (2-3);
  \draw (2-5) to (4-5);
  \draw (3-5) to (4-5);
  \draw (1-3) to (3-4);
  \draw (2-3) to (3-5);
  \draw (3-4) to (4-5);
  \draw (1-4) to (1-5);
  \draw (1-5) to (3-5);
  \draw (1-4) to (3-4);
  \draw (1-4) to (2-4);
  \draw (1-3) to (1-4);
  \draw (2-3) to (3-4);
  \draw (3-4) to (3-5);
  \draw (2-3) to (2-4);
  \draw (1-3) to (3-5);
  \draw (2-5) to (3-5);
  \draw (2-4) to (4-5);
  \draw (1-5) to (4-5);
  \draw (2-4) to (2-5);
  \draw (2-3) to (2-5);

\end{tikzpicture}
\end{center}

%------------------------------------------------------------------------------

\end{document}

% Local variables:
% compile-command: "latexmk -file-line-error -pdf misc.tex"
% End:
