1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
777dan777 [17]
3 years ago
5

Use a recursion tree to determine a good asymptotic upper bound on the recurrence T(n) = 4T(n/2 + 2) + n. Use the substitution m

ethod to verify your answer.
Computers and Technology
1 answer:
Shalnov [3]3 years ago
7 0

Answer:

Follows are the solution to this question:

Explanation:

The scale of the subproblem for a node is \frac{n}{2^i}  at depth.  

The tree then has lg n + 1 and 4^{lg n} = n^2leaves.  

Complete costs for all depth I nodes for I = 0. 1 , 2, ......, lg n-1 is:4^i ( \frac{n}{2^i}+ 2 ) = 2^i n + 2\times  4^i.

T(n)= \sum_{ i = 0}\lg n - 1( 2^i n + 2 . 4^i )+ \Theta  (n^2)\\\\

        = \sum_ {i = 0} \lg n - 1 2^i n + \sum_{i = 0} \lg n - 12 \times  4^i + \Theta  (n^2)\\\\= [ \frac{ 2\lg n - 1}{ 2 - 1} ]n + 2 \times [ \frac{ 4\lg n - 1}{ 4 - 1} ]n + \Theta  (n^2)\\\\= ( 2\lg n - 1) n] + (\frac{2}{3})( 4\lg n - 1)+ \Theta (n^2)\\\\= (n-1)n - \frac{2}{3} (n^2 -1) +\Theta  (n^2)\\\\= \Theta  (n2)\\

verfify the value:

\to  T(n) \leq c (n^2 - dn) \\\\T(n) = T(n) = 4T((\frac{n}{2}) + 2) + n \\\\ \leq 4c [ ((\frac{n}{2}) + 2)2 - d((\frac{n}{2}) + 2) ]+ n \\\\ \leq 4c  [ (\frac{n^2}{4} + 2n + 4) - \frac{dn}{2} - 2d)]+ n \\\\\leq cn2 + 8cn + 16c - 2cdn - 8cd + n\\\\\leq cn2 -cdn +  8cn + 16c - cdn - 8cd + n\\\\\leq c(n2 -dn) - (cd- 8c - 1)n - (d - 2). 8c\\\\\leq c(n2 -dn),\\\\

Where there is the last stage for  \to cd - 8c -1 \geq 0.

You might be interested in
Which of the following statements about moving averages is not true?
AleksAgata [21]

Answer:

The answer is "Option D"

Explanation:

The term moving average is known as a time series of information, which is widely used to reduce quick-term variations and demonstrate deep-term patterns or intervals. It is a type of matrices numerically, thus it could be considered as either an example of a tiny-pass filter for data processing, and correct options can be described as follows:

  • In option A,  It is used in a smooth series.
  • In option B, In this process, all the values are used in the calculation are equal in weight.
  • In option C, It is the simplest method, which is used in exponential smoothing.
7 0
3 years ago
How to answer others questions on Brainly but on a website.
aniked [119]

Answer:

searching do brainly website

3 0
1 year ago
What shooting position is commonly used when hunting with a shotgun?
amid [387]
Standing well for me I never miss a shot in that position

6 0
4 years ago
Read 2 more answers
What happens if two functions are defined with the same name, even if they are in different arguments within the same .py files?
yan [13]

Answer:

Following are the code to this question:

def data(a):#defining method data that accepts parameter

   print (a)#print parameter value

def data(b):#defining method data that accepts parameter

   print (b)#print parameter value

x=input("enter value: ")#defining variable x that5 input value from user

print(data(x))#call method data

Output:

enter value: hello..

hello..

None

Explanation:

  • As the above code, it is clear defines that python doesn't support the method overloading because More than one method can't be specified in a python class with the same name and python method arguments have no type.
  • The single argument method may be named using an integer, a series, or a double value, that's why we can say that it is not allowed.
7 0
3 years ago
Set of general format used to write program in any programming language?​
Pavlova-9 [17]
I think It might be Algorithms , algorithmic are a set of instructions that are used to solve a certain problem which of we create many programs…etc
4 0
3 years ago
Other questions:
  • You are a high school counselor with 9 students who applied for 3 different summer jobs: Job A, Job B, and Job C. Each of the su
    5·1 answer
  • What effect does screen resolution have on how graphics are displayed?
    7·1 answer
  • What is different between attaching a file on an email program versus a smartphone?
    12·2 answers
  • What are two most common video file formats
    11·1 answer
  • An adjustable wrench's movable jaw is positioned <br> by​
    5·1 answer
  • You’ve found the file you’ll be working with. Next, you decide to move the file to your Desktop so it will be easier to get to i
    14·1 answer
  • Write the header file Stadium.h for a Stadium class. The Stadium class has the following data members: 1) an array of 1000 Seat
    7·1 answer
  • Write a program to input value of three sides, to check triangle is triangle is possible to form of not​
    11·1 answer
  • Join the class <br> The class code is hello112
    5·2 answers
  • Which statement best describes one reason why assembly language is easier
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!