Computer Science > QUESTIONS & ANSWERS > CSE 551 Design and Analysis of Algorithms Week 3 Unit 4 Quiz Solutions, Problem, Solutions and Ratio (All)

CSE 551 Design and Analysis of Algorithms Week 3 Unit 4 Quiz Solutions, Problem, Solutions and Rationale.

Document Content and Description Below

CSE 551: Foundations of Algorithms - Arizona State University. CSE 551 Design and Analysis of Algorithms Quiz 4 Solutions, April 6, 2020. Problem, Solutions and Rationale. CSE 551: Quiz 4 Solutions J... amison Weber April 6, 2020 1 Problem 1 Solve the following recurrence relation using any method. Provide your answer in big-O notation: T (n) = 2T (n2 ) + log(n) for n > 1; 0 otherwise • T (n) = O(n) • T (n) = O(nlogn) • T (n) = O(n2) • T (n) = O(logn) 1.1 Rationale This recurrence relation can be tricky to solve using iterative substitution or tree-based methods. It’s best to use the Master theorem here. Recall the form: T (n) = aT (n=b) + f(n) Since f(n) = log(n) = n where  < log2(2) = 1, the Master method gives: T (n) = O(nlog2(2)) = O(n) 2 Problem 2 Suppose we have a modified version of Merge-Sort that at each recursive level splits the array into two parts each of size 1 4 and 3 4 respectively. Also, assume the size of any given input array is a power of four. Give the asymptotic time complexity of this Merge-Sort variant. 1• O(nlogn) • O(n) • O(logn) • O(n2) 2.1 Rationale This gives the recurrence relation T(n) = T(3 4) + T(14) + cn. Using the Akra-Bazzi method: We must satisfy kXi =1 aibP i = 1 Where ai is the coefficent in front of recursive call i and bi is the divisor of n in recursive call i. Thus, we have: 1(3 4 ) + 1(1 4 )P = 1 ) P = 1 Now we use the Akra-Bazzi formula to find: T(n) 2 Θ(nP (1 + Z1n ugP(u+1 ) du)) = Θ(n(1 + Z1n cn n2 dn)) = Θ(n(1 + cZ1n n1 dn)) = Θ(n + ncln(n)) = Θ(nlog(n)) 3 Problem 3 Suppose we modify the combine step of the closest pair of points algorithm such that distance δ from dividing line L is updated immediately to δ0 whenever the distance between two points on either side of L is discovered to be less than δ. In this sense, we allow the two-dimensional range about L wherein we compare points to assume multiple areas (getting smaller as δ becomes updated) during the same combine step for each recursive call. Determine whether the following statement is true or false and explain your reasoning: The time complexity of the closest pair of points algorithm is guaranteed to be improved by a constant factor. [Show More]

Last updated: 4 weeks ago

Preview 1 out of 7 pages

Buy Now

Instant download

We Accept:

We Accept
document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

We Accept

Reviews( 0 )

$8.00

Buy Now

We Accept:

We Accept

Instant download

Can't find what you want? Try our AI powered Search

95
0

Document information


Connected school, study & course


About the document


Uploaded On

May 03, 2023

Number of pages

7

Written in

Seller


seller-icon
PAPERS UNLIMITED™

Member since 3 years

509 Documents Sold

Reviews Received
55
20
8
2
8
Additional information

This document has been written for:

Uploaded

May 03, 2023

Downloads

 0

Views

 95

More From PAPERS UNLIMITED™

View all PAPERS UNLIMITED™'s documents »

$8.00
What is Scholarfriends

In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·