% tabulardemo.tex
\documentclass{article}

\newlength{\circwidth}
\settowidth{\circwidth}{$\bigcirc$}
\newcommand{\numcirc}[1]{ \makebox{\ensuremath{\bigcirc}} %
                          \hspace{-1.4\circwidth} \raisebox{-1pt}{#1} }
\begin{document}
  \begin{tabular}{|llp{2.5in}|} \hline
    Topology    & Size    & Definition \\ \hline
    Ring        & $n$ nodes   & 
                  $\{C^1(1,n) \mbox{ and its inverse} \}$ \\
    Complete Graph& $n$ nodes & 
                    $\{C^i(1,n) \mid 1 \leq i \leq n-1 \}$ \\
    Hypercube   & $k$-dimensional & 
                    $\{(2i-1\; 2i) \mid 1\leq i \leq k \}$ \\
    Star Graph  & $n!$ nodes & 
                     $\{(1\; i) \mid 2\leq i \leq n \}$ \\
    Torus       & $d_1 \times d_2 \times \cdots \times d_k$ & 
          $\bigcup_{j=1}^{k} C^1(1+\sum_{i=1}^{j-1} 
	  d_i,\sum_{i=1}^{j} d_i)$
          and their inverses \\ \hline
  \end{tabular}

\[
  j= \left\{ \begin{array}{ll}
               i+1\: (\bmod\ n) & \mbox{ when } p=q \in \mathcal{H} \\
               i-1\: (\bmod\ n) & \mbox{ when } p=q \in \mathcal{H}
            \end{array}
     \right.
\]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Table Generated By \RESEARCH\PHD\FULL-TEX.C on Jul 28 1996
%
  \centering\begin{tabular}{|c||cc|cc|} \hline 
    \multicolumn{1}{|c||}{Row} & \multicolumn{4}{|c|}{Rotations} \\ \cline{2-5}
    \multicolumn{1}{|c||}{Labels} &  1 & 2 & 2 & 1 \\ \hline \hline
    $+$ & $+$ & \numcirc{2} & \numcirc{2} & $+$ \\ \hline
    $-$ & $-$ & \numcirc{2} & \numcirc{2} & $-$ \\ \hline
  \end{tabular}

\end{document}

