\documentclass[11pt]{article}

\usepackage{exscale}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{latexsym}
\usepackage{times,mathptm}
\usepackage{epsfig}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{automata, positioning, arrows, decorations}

\textwidth 6.5truein          
\textheight 9.0truein
\oddsidemargin 0.0in
\topmargin -0.8in

\parindent 0pt          
\parskip 0pt
%\def\baselinestretch{1.1}

\tikzset{
->, % makes the edges directed
%>=medium, % makes the arrow heads bold
node distance=3cm, % specifies the minimum distance between two nodes. Change if necessary.
every state/.style={thick, fill=gray!10}, % sets the properties for each ’state’ node
initial text=$ $, % sets the text that appears on the start arrow
}


\begin{document}


\begin{tabular}{r||cccc|cccc|cccc|cccc}
Input: && $a$ && & & $b$ && && $c$ && && $\epsilon$ & \\\hline
Stack:& $a$ & $b$ & \$ & $\epsilon$ & $a$ & $b$ & \$ & $\epsilon$ & $a$ & $b$ & \$ & $\epsilon$  & $a$ & $b$ & \$ & $\epsilon$ \\\hline
$q_0$ &&&& &&&& &&&& &&&& \\
$q_1$ &&&& &&&& &&&& & $\{(q_1,c)\}$ &&& \\
$q_2$ &&& $\{(q_2,\epsilon)\}$ & &&&& && $\{(q_0,a)\}$ && &&&& \\
$q_3$ &&&& &&&& &&& $\{(q_2,\epsilon)\}$ & &&&& \\
$q_4$ &&&& &&&& $\{(q_0,a)\}$ &&&& &&&&
\end{tabular}


\end{document}
