Exam_03

Exam_03 - ArsDigita University Month 2: Discrete...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
ArsDigita University Month 2: Discrete Mathematics - Professor Shai Simonson Examination 3 – 100 points Show all work for partial credit. You may use two hours for this exam. After one hour, raise your hand if you feel that the time constraint will be too tight. Name: ______________________________________________________________ 1. /30 2. /20 3. /15 4. /15 5. /20 Total: /100
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
1. Recurrence Equations (30 points) a. Solve the following recurrence equation: a n = 2a n-1 - a n-2 , a 0 = 2 , a 1 = 1. b. The scheme function below calculates the sum of a list of elements. (define (sumup alist) (cond ((null? alist) 0) ((null? (cdr alist)) (car alist)) (else (+ (car alist) (cadr alist) (sumup (cddr alist)))))) Write a recurrence equation for the time complexity of the algorithm, and solve it showing a closed form answer. Assume that each car and cdr can be done in one step.
Background image of page 2
2. Recurrence Equations (20 points) a. What is the order of complexity of each of the following recurrence equations?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 10/01/2011.

Page1 / 5

Exam_03 - ArsDigita University Month 2: Discrete...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online