\documentstyle{report}
\pagestyle{myheadings}
\def\headlineaux{\sc Math 220/317: Programming II/Data Structures 
\hrulefill
}
\markboth{\headlineaux}{\headlineaux}


\setlength{\textwidth}{6.0in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
                                 
\newcommand{\assignmentNumber}{7}
\newcommand{\outdate}{8 November, 1994}
\newcommand{\duedate}{22 November, 1994}

\begin{document}
\begin{titlepage}\begin{centerline}{\Huge \framebox{Burt Rosenberg}}
\end{centerline}\end{titlepage}

\section*{Problem Set \assignmentNumber \hfill{\parbox{3in}
    {\small\sc\begin{flushright} Out: \outdate
     \\ Due: \duedate\end{flushright}}}}

\subsection*{Goals}
Practice with self-balancing tree.

\subsection*{Reading Assignment}
For this homework, you should have read all chapters in {\em Condensed
Pascal} up to 18.
Please also read Chapter 18, in order to follow this week's
class discussion.

\subsection*{Programming Assignment}
Write a 2-4 tree program. It should take keyboard input,
break it into words, and insert new words into your 2-4 tree.
Repeated words will increment a count associated with each word.
You will be able to use large amounts of your previously written
code. In particular, MyString software is relevant to the current
project. However, MyString software must be modified to a NuString,
which is a pointer to a MyString. This is generally how
data is passed in working programs --- using pointers to data
rather than actual copies of the data.

\noindent
{\sc Extra Credit:} Write Delete and Pretty-Print for your 2-4 tree
program.

\subsection*{Example Output}

\begin{verbatim}
Input: ROMEO AND JULIET, ACT II, SCENE II.
[JULIET appears above at a window.]
      But, soft! what light through yonder window breaks?
      It is the east, and Juliet is the sun!-
      Arise, fair sun, and kill the envious moon,
      Who is already sick and pale with grief,
      That thou her maid art far more fair than she:
\end{verbatim}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]-- 1:_min
     1:but
     1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]-- 1:_min
     1:but
     1:soft
     1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+--- 1:_min
    |    1:but
    +--- 1:soft
         1:what
         1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+--- 1:_min
    |    1:but
    +--- 1:light
         1:soft
         1:what
         1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+--- 1:_min
    |    1:but
    +--- 1:light
    |    1:soft
    +--- 1:through
         1:what
         1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+--- 1:_min
    |    1:but
    +--- 1:light
    |    1:soft
    +--- 1:through
         1:what
         1:yonder
         1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+--- 1:_min
    |    1:but
    +--- 1:light
    |    1:soft
    +--- 1:through
    |    1:what
    +--- 1:window
         1:yonder
         1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:breaks
    |   |    1:but
    |   +--- 1:light
    |        1:soft
    +---+--- 1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:breaks
    |   |    1:but
    |   +--- 1:it
    |        1:light
    |        1:soft
    +---+--- 1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:breaks
    |   |    1:but
    |   +--- 1:is
    |        1:it
    |        1:light
    |        1:soft
    +---+--- 1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:breaks
    |   |    1:but
    |   +--- 1:is
    |        1:it
    |        1:light
    |        1:soft
    +---+--- 1:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:breaks
    |   |    1:but
    |   +--- 1:east
    |   |    1:is
    |   |    1:it
    |   +--- 1:light
    |        1:soft
    +---+--- 1:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:and
    |   |    1:breaks
    |   |    1:but
    |   +--- 1:east
    |   |    1:is
    |   |    1:it
    |   +--- 1:light
    |        1:soft
    +---+--- 1:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:and
    |   |    1:breaks
    |   |    1:but
    |   +--- 1:east
    |   |    1:is
    |   |    1:it
    |   +--- 1:juliet
    |        1:light
    |        1:soft
    +---+--- 1:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:and
    |   |    1:breaks
    |   |    1:but
    |   +--- 1:east
    |   |    2:is
    |   |    1:it
    |   +--- 1:juliet
    |        1:light
    |        1:soft
    +---+--- 1:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:and
    |   |    1:breaks
    |   |    1:but
    |   +--- 1:east
    |   |    2:is
    |   |    1:it
    |   +--- 1:juliet
    |        1:light
    |        1:soft
    +---+--- 2:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:and
    |   |    1:breaks
    |   |    1:but
    |   +--- 1:east
    |   |    2:is
    |   |    1:it
    |   +--- 1:juliet
    |        1:light
    |        1:soft
    +---+--- 1:sun
        |    2:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:and
    |   +--- 1:arise
    |   |    1:breaks
    |   |    1:but
    |   +--- 1:east
    |   |    2:is
    |   |    1:it
    |   +--- 1:juliet
    |        1:light
    |        1:soft
    +---+--- 1:sun
        |    2:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:and
    |   +--- 1:arise
    |        1:breaks
    |        1:but
    +---+--- 1:east
    |   |    1:fair
    |   |    2:is
    |   |    1:it
    |   +--- 1:juliet
    |        1:light
    |        1:soft
    +---+--- 1:sun
        |    2:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    1:and
    |   +--- 1:arise
    |        1:breaks
    |        1:but
    +---+--- 1:east
    |   |    1:fair
    |   |    2:is
    |   |    1:it
    |   +--- 1:juliet
    |        1:light
    |        1:soft
    +---+--- 2:sun
        |    2:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    2:and
    |   +--- 1:arise
    |        1:breaks
    |        1:but
    +---+--- 1:east
    |   |    1:fair
    |   |    2:is
    |   |    1:it
    |   +--- 1:juliet
    |        1:light
    |        1:soft
    +---+--- 2:sun
        |    2:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    2:and
    |   +--- 1:arise
    |        1:breaks
    |        1:but
    +---+--- 1:east
    |   |    1:fair
    |   |    2:is
    |   |    1:it
    |   +--- 1:juliet
    |        1:kill
    |        1:light
    |        1:soft
    +---+--- 2:sun
        |    2:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    2:and
    |   +--- 1:arise
    |        1:breaks
    |        1:but
    +---+--- 1:east
    |   |    1:fair
    |   |    2:is
    |   |    1:it
    |   +--- 1:juliet
    |        1:kill
    |        1:light
    |        1:soft
    +---+--- 2:sun
        |    3:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    2:and
    |   +--- 1:arise
    |        1:breaks
    |        1:but
    +---+--- 1:east
    |   |    1:envious
    |   |    1:fair
    |   +--- 2:is
    |   |    1:it
    |   +--- 1:juliet
    |        1:kill
    |        1:light
    |        1:soft
    +---+--- 2:sun
        |    3:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    2:and
    |   +--- 1:arise
    |        1:breaks
    |        1:but
    +---+--- 1:east
    |   |    1:envious
    |   |    1:fair
    |   +--- 2:is
    |   |    1:it
    |   +--- 1:juliet
    |   |    1:kill
    |   +--- 1:light
    |        1:moon
    |        1:soft
    +---+--- 2:sun
        |    3:the
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    2:and
    |   +--- 1:arise
    |        1:breaks
    |        1:but
    +---+--- 1:east
    |   |    1:envious
    |   |    1:fair
    |   +--- 2:is
    |   |    1:it
    |   +--- 1:juliet
    |   |    1:kill
    |   +--- 1:light
    |        1:moon
    |        1:soft
    +---+--- 2:sun
        |    1:that
        |    3:the
        +--- 1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    2:and
    |   +--- 1:arise
    |        1:breaks
    |        1:but
    +---+--- 1:east
    |   |    1:envious
    |   |    1:fair
    |   +--- 2:is
    |   |    1:it
    |   +--- 1:juliet
    |   |    1:kill
    |   +--- 1:light
    |        1:moon
    |        1:soft
    +---+--- 2:sun
        |    1:that
        |    3:the
        +--- 1:thou
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+--- 1:_min
    |   |    2:and
    |   +--- 1:arise
    |        1:breaks
    |        1:but
    +---+--- 1:east
    |   |    1:envious
    |   |    1:fair
    |   +--- 1:her
    |        2:is
    |        1:it
    +---+--- 1:juliet
    |   |    1:kill
    |   +--- 1:light
    |        1:moon
    |        1:soft
    +---+--- 2:sun
        |    1:that
        |    3:the
        +--- 1:thou
        |    1:through
        |    1:what
        +--- 1:window
             1:yonder
             1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+---+--- 1:_min
    |   |   |    2:and
    |   |   +--- 1:arise
    |   |        1:breaks
    |   |        1:but
    |   +---+--- 1:east
    |       |    1:envious
    |       |    1:fair
    |       +--- 1:her
    |            2:is
    |            1:it
    +---+---+--- 1:juliet
        |   |    1:kill
        |   +--- 1:light
        |        1:maid
        |        1:moon
        |        1:soft
        +---+--- 2:sun
            |    1:that
            |    3:the
            +--- 1:thou
            |    1:through
            |    1:what
            +--- 1:window
                 1:yonder
                 1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+---+--- 1:_min
    |   |   |    2:and
    |   |   +--- 1:arise
    |   |        1:art
    |   |        1:breaks
    |   |        1:but
    |   +---+--- 1:east
    |       |    1:envious
    |       |    1:fair
    |       +--- 1:her
    |            2:is
    |            1:it
    +---+---+--- 1:juliet
        |   |    1:kill
        |   +--- 1:light
        |        1:maid
        |        1:moon
        |        1:soft
        +---+--- 2:sun
            |    1:that
            |    3:the
            +--- 1:thou
            |    1:through
            |    1:what
            +--- 1:window
                 1:yonder
                 1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+---+--- 1:_min
    |   |   |    2:and
    |   |   +--- 1:arise
    |   |        1:art
    |   |        1:breaks
    |   |        1:but
    |   +---+--- 1:east
    |       |    1:envious
    |       |    1:fair
    |       +--- 1:far
    |            1:her
    |            2:is
    |            1:it
    +---+---+--- 1:juliet
        |   |    1:kill
        |   +--- 1:light
        |        1:maid
        |        1:moon
        |        1:soft
        +---+--- 2:sun
            |    1:that
            |    3:the
            +--- 1:thou
            |    1:through
            |    1:what
            +--- 1:window
                 1:yonder
                 1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+---+--- 1:_min
    |   |   |    2:and
    |   |   +--- 1:arise
    |   |        1:art
    |   |        1:breaks
    |   |        1:but
    |   +---+--- 1:east
    |       |    1:envious
    |       |    1:fair
    |       +--- 1:far
    |            1:her
    |            2:is
    |            1:it
    +---+---+--- 1:juliet
        |   |    1:kill
        |   +--- 1:light
        |   |    1:maid
        |   +--- 1:moon
        |        1:more
        |        1:soft
        +---+--- 2:sun
            |    1:that
            |    3:the
            +--- 1:thou
            |    1:through
            |    1:what
            +--- 1:window
                 1:yonder
                 1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+---+--- 1:_min
    |   |   |    2:and
    |   |   +--- 1:arise
    |   |        1:art
    |   |        1:breaks
    |   |        1:but
    |   +---+--- 1:east
    |       |    1:envious
    |       |    2:fair
    |       +--- 1:far
    |            1:her
    |            2:is
    |            1:it
    +---+---+--- 1:juliet
        |   |    1:kill
        |   +--- 1:light
        |   |    1:maid
        |   +--- 1:moon
        |        1:more
        |        1:soft
        +---+--- 2:sun
            |    1:that
            |    3:the
            +--- 1:thou
            |    1:through
            |    1:what
            +--- 1:window
                 1:yonder
                 1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+---+--- 1:_min
    |   |   |    2:and
    |   |   +--- 1:arise
    |   |        1:art
    |   |        1:breaks
    |   |        1:but
    |   +---+--- 1:east
    |       |    1:envious
    |       |    2:fair
    |       +--- 1:far
    |            1:her
    |            2:is
    |            1:it
    +---+---+--- 1:juliet
        |   |    1:kill
        |   +--- 1:light
        |   |    1:maid
        |   +--- 1:moon
        |        1:more
        |        1:soft
        +---+--- 2:sun
            |    1:than
            |    1:that
            |    3:the
            +--- 1:thou
            |    1:through
            |    1:what
            +--- 1:window
                 1:yonder
                 1:~max

\end{verbatim}
\end{minipage}
\begin{minipage}[t]{2in}
\begin{verbatim}
[]--+---+---+--- 1:_min
    |   |   |    2:and
    |   |   +--- 1:arise
    |   |        1:art
    |   |        1:breaks
    |   |        1:but
    |   +---+--- 1:east
    |       |    1:envious
    |       |    2:fair
    |       +--- 1:far
    |            1:her
    |            2:is
    |            1:it
    +---+---+--- 1:juliet
        |   |    1:kill
        |   +--- 1:light
        |   |    1:maid
        |   +--- 1:moon
        |        1:more
        |        1:she
        |        1:soft
        +---+--- 2:sun
            |    1:than
            |    1:that
            |    3:the
            +--- 1:thou
            |    1:through
            |    1:what
            +--- 1:window
                 1:yonder
                 1:~max

\end{verbatim}
\end{minipage}
\end{document}
