\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_{name}$ ($\sigma_{phone ="1-555-444-7777"}$ (Author $\Join_{ID=AuthorID}$  AuthorPhone))\\

	$\sigma_{ISBN= "1112223333444"}$(Book)\\
	
	 R1  $\leftarrow ~\sigma_{date>= ÒJan-01-2007Ó~and~date <= ÒDec-31-2008Ó~and~TotalPayment > 100,000}$(Contract)\\
	 
	R2 $\leftarrow$ (R1 $\Join_{AuthorID= Author.ID}$ Author) $\Join_{PublsiherName=Publisher.Name}$ Publisher\\
	
	Result $\leftarrow \pi_{author.name,~author.address,~ publisher.name,~ publisher.address,~ date}$ (R2)\\


	$\pi_{publisherName}$($\sigma_{cnt > 10}$ ($\gamma_{publisherName,~cnt <- count(ISBN)}(Book)$))\\
	
	
	$\pi_{numPages}$($\sigma_{title="The Country"}(Book) \Join \sigma_{edition= 3}(TextBook)$)\\
	
	
	R1 $\leftarrow \gamma_{ContractID, sumPartial <- sum(PartialPayment)}$(ContractLines)\\
	
	
	$\pi_{R1.ContractID}$($\sigma_{TotalPayment <> sumPartial}$ (R1 $\Join$ Contract))\\
	
	
\end{document}


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


