\documentclass[11pt]{article}
\usepackage{amsmath, alltt, amssymb, xspace, times, epsfig, color}

\setlength{\evensidemargin}{0in} \setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in} \setlength{\textheight}{8.5in}
\setlength{\topmargin}{0in} \setlength{\headheight}{0in}



\begin{document}


 $\pi_{shipName, className, builtYear}$ ($\sigma_{country ="USA"}$ (S $\Join_{name=className}$  W))\\

$\pi_{shipName}(\sigma_{status='ok'}(R))~\cap~ \pi_{shipName}(\sigma_{status='damaged'}(R))$\\


  R1  $\leftarrow \gamma_{shipName, firstDate <- min(date)}(M \Join R)$\\

  R2  $\leftarrow \pi_{shipName, sunkDate<-date}(\sigma_{status='sunk'}(M \Join R))$\\
  
  Result $\leftarrow(\sigma_{Years(sunkDate, firstDate) <= 2}(R1 \Join R2))$\\	


	$\tau_{shipName}(\sigma_{cnt > 3}(\gamma_{shipName, cnt <- count(*)}(R)))$\\

	
	
\end{document}


%latex hw3; bibtex hw3; latex hw3; latex hw3; dvips hw3 -o hw3.ps; ps2pdf hw3.ps hw3.pdf


