algorithm - Recursive tree with constant - T(n) = T(n/3) + T(2n/3) + cn -


I have a task and there is a slight problem with it, but I could not find the answer.

Explain that solution using the recurring tree: T (n) = t (n / 3) + t (2n / 3) + cn where is constant, omega (n lg n) < / P>

My solution: 1. T (n) = t (n / 3) + t (2n / 3) + cn

The shortest route will be left most because it is running at the lowest price, and the longest most accurate , Which means that Ed is not balanced.

The lowest path can be defined: n -> 1/3 n -> (1/3) ^ 2 n -> ...-> 1

  1. CN value on recurring tree:

The sum of each full level is equal to CN.

  1. Divisor from the lowest path is being divided by 3, the length of this path will be equal to logon. So if the full level of the recurring tree for the least route Logon is equal to n, then it means that the cost of algorithms for this path will be: T (n) = cn logon n = omega (cn lg n)

Is this solution correct? is? How to get rid of "C" in the form of a task to explain Omega (N \ LG N) and Omega (CNG LG N)? I thought the big omega marking would help and I could just ignore "C", but my teacher said that "continuously [I do not know what definition] is important according to the definition"

Yes, your solution is correct and yes, you can ignore continuous omega (c * n * log n) is the same as omega (n * log n) if c is a constant (according to f (n) = omega (g) If there is such a C0> 0 and N0 exist, then N> = N0 f (n)> = C0 * G (n) . If we have g (n) = c * g (n) , we can just choose C0 '= C0 * c ) Are there.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -