MA-351 Homework 3

Due at 9:50 in class, Tuesday October 5, 1999



Calculations necessary for these problems may be done either by hand or with Maple. Solutions may be submitted in person in class, or you may email an ASCII text, Maple Worksheet (.mws), html, or postscipt/pdf-formatted document to me (kaltofen@math.ncsu.edu).
Note my office hours on my schedule.

  1. Consider the formula
    0 - b + (b2 - 4ac)1/2

    2a
    1. Using the binary operators + (plus), - (minus), * (times), / (divides), and ^ (exponentiation), all of which have exactly 2 operands, draw the expression tree corresponding to this expression.
    2. Convert the expression tree into a fully parenthesized linear infix expression string.
    3. Write the prefix expression string equivalent to the expression tree.
  2. DMM §3.3, Problem 8, page 107. Note: in order to have a unique DFS tree, assume that the order of the neighboring vertices of each vertex is alphabetical.
  3. Consider the formula (u + v)/(l + u*v/(c*c)) (note: the letter ell is used for the constant 1).
    1. Please give the parse tree for this expression according to the context free grammar for expressions given in class.
    2. (Bonus) Please give the MathML presentation mark-up for this expression.