{
  "translations" :{
    "en": {
      "sc1": "Let's see how we can determine the closed form solution of $T(n) = 2T(n/2) + 5n^2, T(1) = 7$ by expanding the recurrence. We simplify the process by assuming that $n$ is a power of 2.",
      "sc2.1": "For a problem of size $n$, we have $5n^2$ units of work plus the work required for two subproblems of size $n/2$ each.",
      "sc2.2": "<br> $T(n) = 5n^2 + 2T(n/2)$",
      "sc3.1": "For each problem of size $n/2$, we have $5(\\frac{n}{2})^2$ units of work. Since there are two of them this is a total of $\\frac{5n^2}{2}$ units. Each problem generates two subproblems, for a total of four subproblems of size $n/4$.",
      "sc3.2": "<br> $T(n) = 5n^2 + 2(5(\\frac{n}{2})^2 + 2T(n/4))$",
      "sc4.1": "For each problem of size $n/4$, we have $5(\\frac{n}{4})^2$ units of work. These total to $\\frac{5n^2}{4}$ units. Each problem of size $n/4$ also now generates two problems of size $n/8$, for a total of eight of these.",
      "sc4.2": "<br> $T(n) = 5n^2 + 2(5(\\frac{n}{2})^2 + 2(5(\\frac{n}{4})^2 + 2T(n/8)))$",
      "sc5.1": "This pattern will continue till we reach a total of $n$ problems of size $1$, each of which requires $7$ units of work for a total of $7n$ units.",
      "sc5.2": "<br> $T(n) = 5n^2 + 2(5(\\frac{n}{2})^2 + 2(5(\\frac{n}{4})^2 + 2(5(\\frac{n}{8})^2 + 2((...))))$",
      "sc6": "We end up having $\\log{n} + 1$ levels. The amount of work at the last level is  $7n$. The amount of work at the rest of the levels is modelled by the summation $\\displaystyle\\sum_{i=0}^{\\log{n}-1}\\frac{5n^2}{2^i}$",
      "sc7": "Accordingly, the total amount of work is $5n^2\\displaystyle\\sum_{i=0}^{\\log{n}-1}\\frac{1}{2^i} + 7n$",  
      "sc8": "By substituting the summation $\\displaystyle\\sum_{i=0}^{\\log{n}-1}\\frac{1}{2^i}$ with its closed form $2-\\frac{2}{n}$, we will end up having a final closed form of $T(n) = 2T(n/2) + 5n^2, T(1) = 7$ as $10n^2 - 3n$",
      "sc9": "This is the <b>exact</b> solution to the recurrence when $n$ is a power of two. At this point, we should use a simple induction proof to verify that our solution was indeed calculated correctly."
    }
  }
}
