0

I have tried to solve the 2nd problem b and d subproblems from this exercise: http://courses.engr.illinois.edu/cs473/sp2010/homework/hw1.pdf

I solved the b to the following way:2/b problem solution

My first question is that: Is my solution correct for the problem 2/b? My second question is: What I supposed to do the in problem 2/d? This a bit strange for me.

Thanks for your time and help.

flatronka
  • 1,061
  • 25
  • 51

1 Answers1

0

From reading the second paragraph of the problem, it seems to me that your answer is not correct for part 2b. My reading was that a 2^n rotate would take 5 blits of 2^(n-1). If this is correct, then your equation should be

B(2^n) = 5 * B(2^(n-1)) = 25 * B(2^(n-2)) = ... = 5^n * B(1)

Where B(x) is the number of blits for x. (Sorry for not knowing how to do fancy equations.)

For 2d, I read it as saying what is the time complexity of B(2^n). Give it a try and let's see what comes out of it.

Let me know what you think.

No One in Particular
  • 2,846
  • 4
  • 27
  • 32
  • Thank you for your answer, but unfortunately I think that you are a completely wrong way. – flatronka Apr 14 '13 at 12:03
  • You've left me hanging. Do you think that 2b is not about counting blits? It explicitly asks for the number of blits, not the blits and recursion steps together. I took that to mean only look at the blue arrows for this subset of the problem. Your calculation seems to look at everything together. As with all things in life, I could be totally wrong, but the problem interests me. I would be curious as to the final answer when you find out. Thanks. – No One in Particular Apr 14 '13 at 13:12