Give the exact and asymptotic formula for the number f(n) of letters \Z" printed by Algorithm PrintZs below. Your solution must consist of the following steps: (a) First express f(n) using a summation notation(b) Next, give a closed-form formula for f(n). (c) Finally, give the asymptotic value of the number of Z's (using the theta-notation.)
Algorithm PrintZs (n : integer)for i=1 to 3n + 1 do---for j=1 to i^2 + 2
-----do print(\Z")....................
A little computer math problem I need answered.
Each term in the diagram is the sum of numbers from the row above (if going left, the numbers above and to the right) (if going right, the numbers above and to the left). So the next row will start 16, 32, 46
Other people asked questions on similar topics, check out the answers they received:
Other people asked questions on various topics, and are still waiting for answer. Would be great if you can take a sec and answer them