Programming Assignment 4:  Recursion


/******************************************************************************
 *  Approximate number of hours to complete this assignment
 ******************************************************************************/

Number of hours:



/******************************************************************************
 *  Describe your artistic creation and how you went about writing a program
 *  to produce it. If you found information about a fractal from somewhere
 *  (such as the course textbook, the booksite, or another offline or online
 *  source) cite it here. 
 ******************************************************************************/


/******************************************************************************
 *  To get full credit on your Art.java, you need to have at least 3
 *  functions, including main(). Please list these functions below: 
 ******************************************************************************/

 1. public static void main(String[] args)
 2. 
 3. 



/******************************************************************************
 *  To get full credit on your Art.java, you need to have used at least
 *  two of the criteria below. Please put an 'X' in the checkbox of the
 *   criteria that your submission fulfills, for instance:
 *     [ ] this is an unchecked criteria
 *     [X] this is a checked criteria
 ******************************************************************************/
 
    [ ] call one or more Transform2D method

    [ ] use different parameters than our examples: f(n, x, y, size)

    [ ] use different StdDraw methods than in examples (e.g.,
        ellipses, arcs, text)

    [ ] number of recursive calls not constant per level (e.g.,
        conditional recursion)

    [ ] mutually recursive methods

    [ ] multiple recursive methods

    [ ] doesn't always recur from level n to level n-1

    [ ] draw between recursive calls, not just before/after all
        recursive calls

    [ ] use recursive level for secondary purpose (e.g., level
        dictates color)


/******************************************************************************
 *  Please check the following box if you do not want your Art to be shared
 *  (anonymously) with the rest of the class.
 ******************************************************************************/

    [ ] I do *NOT* want my art to be shared with the class.


/******************************************************************************
 *  Delannoy Analysis
 ******************************************************************************/
1. Based your computational experiments, which function runs faster:
   DelannoyBrute.count() or DelannoyMemo.count()?

   ( )  DelannoyBrute is faster
   ( )  DelannoyMemo is faster
   ( )  No substantial difference in running time


2. Estimate the  order of growth of the running time of DelannoyBrute.count(n, n)
   as a function of n. Put an 'X' in the best matching bubble.

   ( )  Theta(1)        constant
   ( )  Theta(log n)    logarithmic
   ( )  Theta(n)        linear
   ( )  Theta(n log n)  linearithmic
   ( )  Theta(n^2)      quadratic
   ( )  Theta(n^3)      cubic
   ( )  Theta(c^n)      exponential


3. Complete this table for DelannoyMemo:

 n      |  Time (seconds)
-------------------------
  3000  |
  6000  |
 12000  |
 24000  |


4. Estimate the  order of growth of the running time of DelannoyMemo.count(n, n)
   as a function of n. Put an 'X' in the best matching bubble.

   ( )  Theta(1)        constant
   ( )  Theta(log n)    logarithmic
   ( )  Theta(n)        linear
   ( )  Theta(n log n)  linearithmic
   ( )  Theta(n^2)      quadratic
   ( )  Theta(n^3)      cubic
   ( )  Theta(c^n)      exponential


/******************************************************************************
 *  Did you encounter any serious problems? If so, please describe.
 ******************************************************************************/
 
Yes or no?

 
/******************************************************************************
 *  Write any other comments here.
 ******************************************************************************/

