\documentclass[12pt]{article}

\usepackage{epsfig,amsmath,amssymb,latexsym}

\begin{document}

\title{Latex code for writing an LP problem \\ and a dictionary}
%\date{}
\author{Michael Floater}

\maketitle

\noindent Here is an LP problem:
\[ 
  \begin{array}{rrl}
   \hbox{maximize}   &  6x_1 + 8x_2 + 5x_3 + 9x_4 \\
   \hbox{subject to} & 2x_1 + x_2 + x_3 + 3x_4 & \le 5, \\
                     & x_1 + 3x_2 + x_3 + 2x_4 & \le 3, \\
                     & x_1, x_2, x_3, x_4 & \ge 0.
 \end{array}
\]

\noindent We introduce the slack variables
\begin{align*}
w_1 & = 5 - 2x_1 - x_2 - x_3 - 3x_4, \cr
w_2 & = 3 - x_1 - 3x_2 - x_3 - 2x_4,
\end{align*}
and then the initial dictionary is
\begin{table}[ht]
\begin{center}
    \begin{tabular}{rcrcrcrcrcr}
$\eta$ & $=$ & & & $6x_1$ & $+$ & $8x_2$ & $+$ & $5x_3$ & $+$ & $9x_4$ \\
\hline
$w_1$ & $=$ & $5$ & $-$ & $2x_1$ & $-$ & $x_2$ & $-$ & $x_3$ & $-$ & $3x_4$ \\
$w_2$ & $=$ & $3$ & $-$ & $x_1$ & $-$ & $3x_2$ & $-$ & $x_3$ & $-$ & $2x_4$ \\
    \end{tabular}
\end{center}
\end{table}

\end{document}

