12.07.2015 Views

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sec. 14.5 Exercises 50114.4 Use subtract-<strong>and</strong>-guess or divide-<strong>and</strong>-guess <strong>to</strong> find the closed form solutionfor the following summation. You must first find a pattern from which <strong>to</strong>deduce a potential closed form solution, <strong>and</strong> then prove that the proposedsolution is correct.n∑i/2 ii=114.5 Use the shifting method <strong>to</strong> solve the summationn∑i 2 .i=114.6 Use the shifting method <strong>to</strong> solve the summationn∑2 i .i=114.7 Use the shifting method <strong>to</strong> solve the summationn∑i2 n−i .i=114.8 Consider the following code fragment.sum = 0; inc = 0;for (i=1; i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!