Question

PART 2 - Comparing the orders of growth between two algorithms (4pts) Say we have two different algorithms with respective runtimes of f(n) and g(n). Given the following cases, prove whether or not f(n) is O(g(n)) in each case. You need to show your work with the crucial steps, e.g. finding the necessary constant c in the definition of Big-O. You may utilize the pull-up/pull-down or the l'Hopital's trick discussed in class whenever needed. You will be penalized for up to 1 pt in total if all your work for this entire PART exceeds a whole A4/US letter page in 12px font size (assuming you start from the top of the page). P.S. sqrt(n) means the square root of n, aka n^(1/2). Case f(n) g(n) cos(n)+1 sin(n)+10

          PART 2 - Comparing the orders of growth between two algorithms (4pts)
Say we have two different algorithms with respective runtimes of f(n) and g(n). Given the following cases, prove whether or not f(n) is O(g(n)) in each case. 
You need to show your work with the crucial steps, e.g. finding the necessary constant c in the definition of Big-O. You may utilize the pull-up/pull-down or the l'Hopital's trick discussed in class whenever needed.
You will be penalized for up to 1 pt in total if all your work for this entire PART exceeds a whole A4/US letter page in 12px font size (assuming you start from the top of the page).
P.S. sqrt(n) means the square root of n, aka n^(1/2).
Case
f(n)
g(n)
cos(n)+1
sin(n)+10
        
Show more…

Added by Kelsey S.

Computer Science and Information Technology
Computer Science and Information Technology
Trishna Knowledge Systems 2018 Edition
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
PART 2 - Comparing the orders of growth between two algorithms (4pts) Say we have two different algorithms with respective runtimes of f(n) and g(n). Given the following cases, prove whether or not f(n) is O(g(n)) in each case. You need to show your work with the crucial steps, e.g. finding the necessary constant c in the definition of Big-O. You may utilize the pull-up/pull-down or the l'Hopital's trick discussed in class whenever needed. You will be penalized for up to 1 pt in total if all your work for this entire PART exceeds a whole A4/US letter page in 12px font size (assuming you start from the top of the page). P.S. sqrt(n) means the square root of n, aka n^(1/2). Case f(n) g(n) cos(n)+1 sin(n)+10
Close icon
Play audio
Feedback
Powered by NumerAI
Danielle Fairburn Jennifer Stoner
Ivan Kochetkov verified

Sri K and 59 other subject AP CS educators are ready to help you.

Ask a new question

*

Labs

-

Want to see this concept in action?

NEW

Explore this concept interactively to see how it behaves as you change inputs.

View Labs

*

Key Concepts

-
Key Concept
Premium Feature
Explore the core concept behind this problem.
Play button
Key Concept
Premium Feature
Explore the core concept behind this problem.
Your browser does not support the video tag.

*

Recommended Videos

-
place-these-functions-in-increasing-order-of-asymptotic-growth-rate-you-do-not-have-to-prove-your-order-is-correct-fon-fi-n-fzn-fzn-22n-logz5n-4n-n-sn-4-2034un-n-2n1-n1-v6n5-4n3-7-fin-fsn-fe-08913

Place these functions in increasing order of asymptotic growth rate. You do not have to prove your order is correct. f0(n) = 2^{2n} f1(n) = log_2(5n^2 + 4n) f2(n) = n^2 + 5n - 4 f3(n) = 2^{log_4(n)} f4(n) = (n^2 + 2n + 1) / (n + 1) f5(n) = sqrt(6n^5 + 4n^3 + 7) f6(n) = n / log_2(n) f7(n) = 100! f8(n) = 3^n f9(n) = log_2(log_2(n) + 4) 2. Prove the following theorems using the definitions of O, Omega, Theta. a) Theorem 1. (3n^3 + 2n^2 - 5n)^5 ∈ Θ(n^15) b) Theorem 2. (3n^3 + n^2)(log_2(n) + 1)^2 ∈ Θ(n^3(log_2(n))^2) c) Theorem 3. If f(n) ∈ O(g(n)) then g(n) ∈ Ω(f(n)). d) Theorem 4. If f(n) ∈ O(g(n)) and g(n) ∈ O(f(n)) then f(n) ∈ Θ(g(n)). e) Theorem 5. If f(n) ∈ Θ(g(n)) and g(n) ∈ Θ(h(n)) then f(n) ∈ Θ(h(n)).

Sri K.

suppose-that-you-have-two-different-algorithms-for-solving-a-problem-to-solve-a-problem-of-size-n-2

Suppose that you have two different algorithms for solving a problem. To solve a problem of size $n,$ the first algorithm uses exactly $n^{2} 2^{n}$ operations and the second algorithm uses exactly $n !$ operations. As $n$ grows, which algorithm uses fewer operations?

Discrete Mathematics and its Applications

Algorithms

The Growth of Functions

10-points-place-these-functions-in-order-from-slowest-asymptotic-growth-to-fastest-asymptotic-growth-you-will-want-to-simplify-them-algebraically-before-comparing-them-give-a-short-justifica-57678

Place these functions in order from slowest asymptotic growth to fastest asymptotic growth. You will want to simplify them algebraically before comparing them. Give a short justification (a proof is not necessary) of how you came to this ordering. The notation lg n stand for log2 n. f0(n) = n^lg n f1(n) = 16^lg n f2(n) = 32^(n/5) f3(n) = (n / lg n)^8 f4(n) = ln n + 2021 f5(n) = n^8 - n^6 + n^4 - n^2 + 1 f6(n) = 3^(3n) f7(n) = ln ln ln n f8(n) = 2021^(cbrt(n)) f9(n) = n^2021

Adi S.


*

Recommended Textbooks

-
Computer Science and Information Technology

Computer Science and Information Technology

Trishna Knowledge Systems 2018 Edition
achievement 1,321 solutions
Introduction to Programming Using Python

Introduction to Programming Using Python

Y. Daniel Liang 1st Edition
achievement 1,032 solutions
Computer Science - An Overview

Computer Science - An Overview

Glenn Brookshear, Dennis Brylow 12th Edition
achievement 1,883 solutions

*

Transcript

-
00:01 So from here in this part, firstly we need to provide that 3 of n dash plus 2 of n2 minus s of n from here is equal to 0.
00:09 And we know that 3 of n dash plus 2 of n2 minus of s n is equal to 3 of n is less than equals to 3 of n dash plus 2 of n 2, which is further less than equals to 5 of n of 2.
00:24 So from here, therefore we can say that 3 of n dash plus 2 of n2 minus of s n that is equal to 0...
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Join the community

18,000,000+

Students on Numerade


Trusted by students at 8,000+ universities

Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever