Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

TIL VUIK 2 Type your answers to the following questions and submit it as a PDF file on cougar courses 1. Give the asymptotic bounds

image text in transcribed
TIL VUIK 2 Type your answers to the following questions and submit it as a PDF file on cougar courses 1. Give the asymptotic bounds for each of the recurrences below and explain your answers. Assume T(1) = 0(1). Try to make your bounds as tight as possible. If you use the master method, you should specifye bounds, but only need to specify O if you use another approach. a) T() = (n/3) + b) () - 27/2) + c) T() = 37(1/2) + ulogn d) () - T -2) + .) T) 4 /2) + V 1)T() ( ) +1 2. For the following problems, write pseudocode algorithms and state the worst- ce running time in terms of or where appropriate). You will be graded on the efficiency of your solutions a) Given two lists of numbers A and B of lengths mand in respectively, return the intersection of the lists, all these numbers in A that also occur in B. You can assume that in any given Bist, the numbers are unique b) Given a sorted list of unique integers A n determine if an entry exists such that All) - . If sestry exists, return the index, otherwise, return null (Hint: You can do better than on Think divide-and-conquer) TIL VUIK 2 Type your answers to the following questions and submit it as a PDF file on cougar courses 1. Give the asymptotic bounds for each of the recurrences below and explain your answers. Assume T(1) = 0(1). Try to make your bounds as tight as possible. If you use the master method, you should specifye bounds, but only need to specify O if you use another approach. a) T() = (n/3) + b) () - 27/2) + c) T() = 37(1/2) + ulogn d) () - T -2) + .) T) 4 /2) + V 1)T() ( ) +1 2. For the following problems, write pseudocode algorithms and state the worst- ce running time in terms of or where appropriate). You will be graded on the efficiency of your solutions a) Given two lists of numbers A and B of lengths mand in respectively, return the intersection of the lists, all these numbers in A that also occur in B. You can assume that in any given Bist, the numbers are unique b) Given a sorted list of unique integers A n determine if an entry exists such that All) - . If sestry exists, return the index, otherwise, return null (Hint: You can do better than on Think divide-and-conquer)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions