Exam 7: Recursive Algorithms

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

On a computer, conditional recursion continues until all available memory is used, or until it triggers some time-out mechanism in the operating system.

(True/False)
4.8/5
(32)

The pattern of seeds on the head of a sunflower, the geometry of a snail's shell, and even DNA gene sequencing all appear to be recursive structures.

(True/False)
4.9/5
(31)

____ occurs when a method calls itself more than once in each pass through a method.

(Multiple Choice)
4.8/5
(32)

At each level of exponential recursion, the number of copies of the program ____.

(Multiple Choice)
4.8/5
(39)

Recursion that is not infinite is called ____.

(Multiple Choice)
4.9/5
(41)

The pseudocode for a recursive method is shown below. What statement is missing from the area labeled (b)? Sailboat.sail to (target) (a) If ( not [sailboat is within 5 meters of target] ) { Do together { Sailboat.turn to face target Sailboat.move forward 2 meters } (b) } (c)

(Multiple Choice)
5.0/5
(37)

The following algorithm is an example of ____. Begin with an equilateral triangle Sierpinski (triangle) Start Find the midpoint of each side of the triangle Draw lines connecting the midpoints, which will form four smaller triangles that can be called triangles A, B, C, and D, with D in the center and the others around it. Color in (or cut out) the center triangle // triangle D Do Sierpinski (triangle A) Do Sierpinski (triangle B) Do Sierpinski (triangle C) Stop

(Multiple Choice)
4.9/5
(39)

A recursive algorithm usually contains a(n) ____ instruction that causes the algorithm to keep calling itself until the base condition is met.

(Multiple Choice)
4.8/5
(37)

An exponential recursion graph looks like a ____.

(Multiple Choice)
4.9/5
(45)

In computer programming, an algorithm that calls itself is said to be ____.

(Multiple Choice)
4.9/5
(43)

The pseudocode for a recursive method is shown below. What statement is missing from the area labeled (a)? Sailboat.sail to (target) (a) If ( not [sailboat is within 5 meters of target] ) { Do together { Sailboat.turn to face target Sailboat.move forward 2 meters } (b) } (c)

(Multiple Choice)
4.8/5
(35)

The condition that stops the recursion is called the ____.

(Multiple Choice)
4.8/5
(38)

For simple tasks that can be described with linear recursion, iteration seems to be a better choice.

(True/False)
4.9/5
(41)

Recursion can describe a very sophisticated process with a simple and efficient set of instructions.

(True/False)
4.9/5
(37)

Blood vessels in the human body have a structure that can be best described by recursion.

(True/False)
4.7/5
(42)

Even after taking into account the overhead, iterative algorithms are usually far more efficient than recursive solutions.

(True/False)
4.9/5
(38)

For complex problems that can be broken down into smaller parts, linear recursion usually works much better.

(True/False)
4.7/5
(40)

The pseudocode for an iterative method is shown below. What statement is missing from the area labeled (a)? Sailboat.sail to (target) (a) ( not [sailboat is within 5 meters of target] ) { Do together { Sailboat.turn to face target Sailboat.move forward 2 meters } } (b)

(Multiple Choice)
4.8/5
(39)

____ occurs when a method calls itself only once each time through the method.

(Multiple Choice)
4.8/5
(36)

The marble floor of the Sistine Chapel has patterns in the tiles that is an example of a mathematical design called a Sierpinski gasket.

(True/False)
4.7/5
(38)
Showing 21 - 40 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)