Give two asymptotically different functions

Assignment Help Data Structure & Algorithms
Reference no: EM132291038

Design and Analysis of Algorithms Homework -

Question 1 - In the following, let f and g be positive increasing functions. Answer each question and briefly justify your answers. You get no points if you do not give a justification.

(a) Given that f(n) = O(g(n)), is it possible that f(n) = Θ(g(n))? Is it always true that f(n) = Θ(g(n))?

(b) Given that f(n) = ω(g(n)), is it possible that f(n) = Ω(g(n))? Is it always true that f(n) = Ω(g(n))?

(c) Given that f(n) = O(g(n)), is it possible that f (n) = o(g(n))? Is it always true that f (n) = o(g(n))?

(d) Is it possible that f (n) = ω(g(n)) and also f(n) = O(g(n))?

(e) Is it possible that f (n) + g(n) = O(min(f(n), g(n)))? Is it always true that f (n) + g(n) = O(min(f(n), g(n)))?

Question 2 - Give two asymptotically different functions, each of which belongs to both ω(n) and o(n2). Briefly justify your answers.

Question 3 - Problem 3-2 of the Textbook (p.61), (c) - (f). Note that "A is O of B" means A = O(B), and similarly for other notations (o, Ω, ω, Θ). In your write up, copy and fill up the table with "Yes" or "No" in each table entry; after the table, briefly justify your answer for each sub-question. You get no points if you do not give a justification.

Question 4 - Let S1(n) = k=1n k, S2(n) = k=1n k2 and S3(n) = k=1n k3. In class, we already showed how to calculate S1(n) and S2(n). Your task here is to apply similar methods for S3(n).

(a) Without calculating the closed form, use rough estimations to derive a lower bound and an upper bound for S3(n), so that you can use them to express S3(n) in the Θ() notation. Give this Θ() notation in the simplest form (e.g., Θ(n) is in the simplest form but Θ(2n) is not).

(b) Use the perturbation method (as discussed in class) to derive the closed form for S3(n).

(Background Information: You would need the formula of S1(n) and S2(n), which we already know: S1(n) = n(n + 1)/2 and S2(n) = n(n + 1)(2n + 1)/6.)

Question 5 - Given a sequence of it unordered real numbers, design and analyze an algorithm that finds both the smallest and the second smallest numbers among them using at most 3⌊n/2⌋ comparisons. Your algorithm should describe what to do when n is even and when n is odd. You need to show that your algorithm gives the correct answers, and that it uses at most 3⌊n/2⌋ comparisons.

Reference no: EM132291038

Questions Cloud

Negative externality of water pollution : Describe how the government has dealt with the negative externality of water pollution. Be specific in dates and examples
Internal economies of scale : Why is an increase in the number of varieties of a good regarded as a gain from trade? Use a diagram to demonstrate.
What is the purpose of maquiladoras : This exercise is designed to allow you to understand and research Maquiladoras. What is the purpose of Maquiladoras?
Promoting policies to encourage saving : What problem would a politician face when promoting policies to encourage saving?
Give two asymptotically different functions : CS6033 Design and Analysis of Algorithms Homework - Give two asymptotically different functions, Briefly justify your answers
Write the equation of the budget constraint faced : Emmanuel has K100 to spend on Fanta and doughnut. Fanta and doughnut each cost K5 respectively. Assume Fanta=good Y and doughnut=good X.
Implications of considering customer as partial employee : What are the organizational and marketing implications of considering a customer as a "partial employee"?
Discuss the challenges and barriers to electronic charting : MN569: FNP I Clinical - Life Span Health Focus - Purdue University Global - Health information technology - What is meant by meaningful use regulations
Income from tariffs increased or decreased overall : Remember that these tariffs are new (or a new increase), has the government's income from tariffs increased or decreased overall?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd