Course Hero Logo

HW1 solns.pdf - Homework 1: Solutions ORIE 4520:...

This preview shows page 1 - 3 out of 7 pages.

ORIE 4520: Stochastics at ScaleFall 2015Homework 1: SolutionsSid Banerjee ([email protected])Problem 1: (Practice with Asymptotic Notation)An essential requirement for understanding scaling behavior is comfort with asymptotic (or ‘big-O’)notation. In this problem, you will prove some basic facts about such asymptotics.Part (a)Given any two functionsf(·) andg(·), show thatf(n) +g(n) = Θ(max{f(n), g(n)}).
Part (b)An algorithmALGconsists of twotunablesub-algorithmsALGAandALGB, which have to beexecuted serially (i.e., one run ofALGinvolves first executingALGAfollowed byALGB). Moreover,given any functionf(n), we can tune the two algorithms such that one run ofALGAtakes timeO(f(n)) andALGBtakes timeO(n/f(n)). How should we choosefto minimize the overall runtimeof ALG (i.e., to ensure the runtime of ALG isO(h(n)) for the smallest-growing functionh)?How would your answer change ifALGAandALGBcould be executed in parallel, and we haveto wait for both to finish?
Part (c)We are given a recursive algorithm which, given an input of sizen, splits it into 2 problems of sizen/2, solves each recursively, and then combines the two parts in timeO(n). Thus, ifT(n) denotesthe runtime for the algorithm on an input of sizen, then we have:T(n) = 2T(n/2) +O(n)Prove thatT(n) =O(nlogn).1
ORIE 4520: Stochastics at ScaleFall 2015Homework 1: SolutionsSid Banerjee ([email protected])Hint: Note that for a constant size input, the algorithm takesO(1)time.How many recursionsdoes it require to reduce a problem of sizento constant size subproblems? What is the total runtimeoverhead at each recursive level?

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 7 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Summer
Professor
NoProfessor
Tags
Conditional Probability, Probability theory, Sid Banerjee

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture