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)}). Get answer to your question and much more
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?
Get answer to your question and much more
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