\documentclass[12pt]{article}
\pagestyle{plain}
\usepackage[paper=letterpaper,
        left=1in,
        right=1in,
        top=1in,
        bottom=1in] {geometry}
        
\usepackage[parfill]{parskip}
\usepackage{amsmath,amssymb}
\usepackage{tikz}

\begin{document}
\begin{center}
{\large CS 191}\\
Homework 4
\end{center}

\begin{flushright}
Alan Garvey\\
abc1234
\end{flushright}

   \textbf{Section 1.4, Exercise 11}  Draw a picture of a binary search tree containing the three-letter abbreviations
for the 12 months of the year in dictionary order.  Make sure your tree has the least possible depth.\\
  \textbf{Answer:}\\


\begin{center}
\begin{tikzpicture}
\node (1) at (4.5,6) {JUN};
\node (2) at (1.75,4) {MAR};
\node (3) at (7,4) {OCT};
\node (4) at (0.75,2) {FEB};
\node (5) at (3.5,2) {MAY};
\node (6) at (6,2) {AUG};
\node (7) at (9,2) {DEC}; 
\node (8) at (0,0) {JAN};
\node (9) at (2.75, 0) {APR};
\node (10) at (5.5,0) {JUL};
\node (11) at (7,0) {SEP};
\node (12) at (8.5,0) {NOV};
\path[-] (1) edge (2)
                   edge (3);
\path[-] (2) edge (4)
                   edge (5);
\path[-] (3) edge (6)
                    edge (7);
\path[-] (4) edge (8);
\path[-] (5) edge (9);
\path[-] (6) edge (10) edge(11);
\path[-] (7) edge (12);

\end{tikzpicture}
\end{center}

   \textbf{Section 1.4, Exercise 12}  Find and draw two distinct minimum spanning trees for the following weighted graph.\\
  \textbf{Answer:}\\

\begin{center}
\begin{tikzpicture}
\node (1) at (1,4) {a};
\node (2) at (5,4) {b};
\node (3) at (3,2) {c};
\node (4) at (7,2) {d};
\node (5) at (0,0) {e};
\node (6) at (5,0) {f};

\path[-] (1) edge node [below] {2} (2)
                   edge node [right] {1} (3)
                   edge node [left] {2} (5);
\path[-] (2) edge node [right] {1} (4);
\path[-] (3) edge node [above] {2} (4)
                   edge node [below] {2} (5);
\path[-] (6) edge node [below] {2} (5)
                   edge node [right] {1} (4);



\end{tikzpicture}
\end{center}

\end{document}
