\documentclass[titlepage,12pt]{article}
\usepackage{times}
\usepackage{listings}

\title{A Sample \LaTeX Document}
\author{Dr. Seuss \and Someone Else}
\date{February 2012}

\begin{document}

\maketitle

\begin{abstract}
This article contains some examples of things that one can do
in \LaTeX. It is all very important.
\end{abstract}

\section{Introduction}

In this paper, we discuss several very important.  Some of them are so 
important that you may not believe they are true, while others are
somewhat less important.  All of them are important enough that you
should keep reading.

\subsection{A Table}

Some really important results are presented in Table~\ref{tab3}.

\begin{table}[htb]
\begin{center}
\begin{tabular}{cccc}
\hline \hline
 OD  &        &             &  Dollar Cost    \\
Pair & Origin & Destination & on Best Path    \\ \hline
1 & Paramus & Atlantic City & 133.21 \\
2 & Princeton & Cape May & 149.01 \\
3 & Tewksbury & Atlantic City & 144.73 \\
4 & Camden & Jersey City & 61.31 \\
5 & Del. Memorial Bridge & Bayonne & 95.85 \\
6 & Princeton & Vernon & 57.98 \\
7 & Princeton & Atlantic City & 81.95 \\
8 & Princeton & Jersey City & 22.64 \\
9 & Newark & Pt. Pleasant & 28.48 \\
10 & Newark & Lambertville & 34.72 \\
11 & Gum Tree Corner & Camden & 31.44 \\
12 & Newark & Long Branch & 24.77 \\
13 & Gum Tree Corner & Atlantic City & 60.69 \\
14 & Princeton & Morristown & 14.50 \\
15 & Paramus & Trenton & 42.82 \\
16 & Paramus & Pt. Pleasant & 39.64 \\
17 & New York City & Atlantic City & 135.39 \\
18 & New York City & Trenton & 39.16 \\
19 & Princeton & Meadowlands & 23.59 \\
20 & Del Mem. Bridge & Princeton & 55.21 \\ 
\hline \hline
\end{tabular}
\end{center}
\caption{OD Pairs Tested}\label{tab3}
\end{table}

\subsection{Courses I Want To Take}

The following courses are the best at JMU and, as a result, I really
want to take them:

\begin{itemize}
\item CS349
\item CS462
\end{itemize}



\section{Some Things From The Talk}

Here's the truth table:

\begin{tabular}{cc|cc}
P & Q & P or Q 
& P xor (P or Q) \\
\hline
T & T & T & F \\
T & F & T & F \\
F & T & T & T \\
F & F & F & F \\
\end{tabular}

\noindent
and here it is using better logical operators:


\begin{tabular}{cc|cc}
$P$ & $Q$ & $P \vee Q$ & $P \oplus (P \vee Q)$ \\
\hline
T & T & T & F \\
T & F & T & F \\
F & T & T & T \\
F & F & F & F \\
\end{tabular}


Here is some math:

\begin{equation}
\sum_{a \in A}\int_0^{f_a} c(x) dx
\end{equation}

\begin{equation}
\prod_{i=0}^{n} x_i
\end{equation}

\begin{equation}
\bigcup_{A \subset X} A
\end{equation}

\begin{equation}
{n+1 \choose k} = {n \choose k} + {n \choose k-1}
\end{equation}

And, here is some code:

\begin{lstlisting}
public int gcd(int a,int b)
{
  int  r, x, y;

  x = Math.abs(a);
  y = Math.abs(b);

  while (y != 0) 
  {
    r = x % y;
    x = y;
    y = r;
  }

  return x;
}
\end{lstlisting}



\section{Some Things That Were Not In The Talk}

\newtheorem{theorem}{Theorem}

\begin{theorem}
$q$ is a Cournot-Nash equilibrium if and only if it is a CP-solution
for $F$.
\label{gm-theorem}
\end{theorem}

{\bf Proof.} We begin by observing that we need only
demonstrate this result for some arbitrary firm, $i$, since 
a sum of non-negative terms is zero iff each term is identically
zero.  Now, consider any firm $i$.

$(\Rightarrow)$ First, since $\lambda_{ij} \geq 0$ for all $j \in
{\cal N}$, we that $[C'_{i}(q) + c_{ij}(q) - R'_{ij}(q)] \geq 0$ for
all $j \in {\cal N}$, and from that $q_{ij} \geq 0$ for all $j \in
{\cal N}$.  Also, if $\lambda_{ij} > 0$ then we must have $q_{ij}=0$.
On the other hand, if $\lambda_{ij} = 0$ then it must be true that
$[C'_{i}(q) + c_{ij}(q) - R'_{ij}(q)] = 0$.  Thus, either $q_{ij}=0$
or $[C'_{i}(q) + c_{ij}(q) - R'_{ij}(q)] = 0$ for all $j \in {\cal
N}$.

$(\Leftarrow)$ First, observe that the positivity condition follows
immediately from (\ref{cp}).  Further, if $q_{ij}>0$ then $[C'_{i}(q)
+ c_{ij}(q) - R'_{ij}(q)] = 0$ and hence... 



\section{Some Other Math}

Consider a \emph{network}, ${\cal G}$, comprised of a finite set of
\emph{nodes}, ${\cal N} = \{ 1 , \ldots , m \}$, and a finite set of
(directed) \emph{arcs} (or links), ${\cal A} = \{ 1 , \ldots , n \}$.
The \emph{node-arc incidence matrix} for ${\cal G}$, which is denoted
by $A$, has components $a_{ij}$ defined as follows: $a_{ij} = 1$ if
link $j$ is directed out of node $i$, $a_{ij} = -1$ if link $j$ is
directed into node $i$, and $a_{ij} = 0$ otherwise.  On this network
there is a single origin node, $O$, and a single destination node,
$D$.  We let $b_O = 1$, $b_D = -1$, and $b_i = 0, i \in {\cal N} -
\{O,D\}$.  Thus, any $x$ that satisfies:
\begin{equation}
\begin{array}{r c l}
A x & = &   b \\
  x & \in & \{0,1\}^n
\end{array}
\end{equation}

\noindent
corresponds to a \emph{path} from $O$ to $D$.

In the traditional formulation of the problem one assumes that the
\emph{cost} on all arcs is known and given by $c = (c_j: j = 1 , \ldots
, n)$, and that path costs are additive. Thus, the cost on a path
corresponding to $x$ is given by:
\begin{equation}
C(x) = c^{T} x  
\end{equation}

\noindent
and the \emph{minimum cost path problem} can be formulated as:
\begin{equation}
\begin{array}{r r c l}
\min_x &  \multicolumn{3}{l}{c^{T} x} \\
\mbox{s.t.}   & A x & = &   b \\
       & x & \geq & 0
\end{array}
\label{sp}
\end{equation}


\noindent
where the constraint $x \in \{0,1\}^n$ can be replaced by the
constraint $x \geq 0$ because of the total unimodularity of $A$.




\end{document}