MHB Confusion with variables when solving a recurrence equation

JimmyK
Messages
7
Reaction score
0
If I have a recurrence equation of the following form:

$$T(n) = T(km) = a, m = 1$$
$$T(n) = T(km) = T(k) + T(k(m-1)) + cn, m > 1$$

Where a is simply a constant, and k is an integer constant > 0.

Now I begin substituting to find the pattern:
$$T(k) = a$$
$$T(2k) = a + [a] + c2k$$
$$T(2k) = 2a + 2ck$$
$$T(3k) = a + [2a + 2ck] + c3k$$
$$T(3k) = T(3k) = 3a + 5ck$$
$$T(4k) = a + [3a + 5ck] + c4k$$
$$T(4k) = 4a + 9ck$$

So it looks like the solution is:
$$T(n) = T(mk) = ma + ((\sum\limits_{i=1}^mi)-1)ck$$
$$T(n) = T(mk) = ma + (\frac{m}{2}(m+1)-1)ck$$

Now what I want to do is show that $$T(n) = \Theta(n^{2})$$

I can see in my solution that expanding it out, we end with a leading term of: $$m^{2}$$

Now my problem is, I have myself completely confused due to the variable names. T(n) = T(mk) and then the leading term is m^2, but I want to show that T(n) = Theta(n^2) and I don't think I've fully shown that because while m is dependent on n, it's not n. Any explanation of how I go about relating the two would be appreciated.
 
Physics news on Phys.org
marobin said:
If I have a recurrence equation of the following form:

$$T(n) = T(km) = a, m = 1$$
$$T(n) = T(km) = T(k) + T(k(m-1)) + cn, m > 1$$

Where a is simply a constant, and k is an integer constant > 0.

Now I begin substituting to find the pattern:
$$T(k) = a$$
$$T(2k) = a + [a] + c2k$$
$$T(2k) = 2a + 2ck$$
$$T(3k) = a + [2a + 2ck] + c3k$$
$$T(3k) = T(3k) = 3a + 5ck$$
$$T(4k) = a + [3a + 5ck] + c4k$$
$$T(4k) = 4a + 9ck$$

So it looks like the solution is:
$$T(n) = T(mk) = ma + ((\sum\limits_{i=1}^mi)-1)ck$$
$$T(n) = T(mk) = ma + (\frac{m}{2}(m+1)-1)ck$$

Now what I want to do is show that $$T(n) = \Theta(n^{2})$$

I can see in my solution that expanding it out, we end with a leading term of: $$m^{2}$$

Now my problem is, I have myself completely confused due to the variable names. T(n) = T(mk) and then the leading term is m^2, but I want to show that T(n) = Theta(n^2) and I don't think I've fully shown that because while m is dependent on n, it's not n. Any explanation of how I go about relating the two would be appreciated.

Hi marobin, :)

It seems that your recurrence relation is in fact a constant sequence since \(T(n) = T(km)=a\mbox{ for }m\geq 1\).

Kind Regards,
Sudharaka.
 
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Namaste & G'day Postulate: A strongly-knit team wins on average over a less knit one Fundamentals: - Two teams face off with 4 players each - A polo team consists of players that each have assigned to them a measure of their ability (called a "Handicap" - 10 is highest, -2 lowest) I attempted to measure close-knitness of a team in terms of standard deviation (SD) of handicaps of the players. Failure: It turns out that, more often than, a team with a higher SD wins. In my language, that...

Similar threads

Back
Top