Represents the amount of work performed

Assignment Help Basic Computer Science
Reference no: EM132270053

Below, is the answer to an algorithm question I answered.

Below my answer is my Professor's comment on the answer I gave.

I need someone to rework the recurrence equation.

This program returns the factorial of a given number 'n'.

n(n-1) * (n-2) .....

int fact (int n)

{

     if (n==1)

{

       return 1;

}

else

}

              Return n * fact(n-1);

      }

}//end program

The recurrence equation is below

n > 0 = Precondition

T(1) = 1

T(n) = T(n-1) * n

The amount of operations that are counted is the base case in addition to the recursive calls.

The base case stops the recursive calls at n = 1.

This decrements n until the base case.

The time complexity is 0(n) for n calls.

Professor's Comment

The recurrence equation being asked for is the one that represents the amount of work performed, not the one that defines the value of the factorial sequence.

Hence, I just need the recurrence equation reworked to satisfy his comment.

Below is the question I answered.

If I get a new copy paste answer and not a rework of the recurrence equation, you will get a down vote.

Provide an example of a recursive function in which the amount of work on each activation is constant. Provide the recurrence equation and the initial condition that counts the number of operations executed. Specify which operations you are counting and why they are the critical ones to count to assess its execution time. Draw the recursion tree for that function and determine the Big-Θ by determining a formula that counts the number of nodes in the tree as a function of n.

Reference no: EM132270053

Questions Cloud

How do we interpret a fictional character : Discuss how character is conveyed, with particular reference to the portrayal of internal life in the context of Kristen Roupenian's ‘Cat Person'.
Count of negative integers in a sequence : Need a program that can find the minimum number of the sequence, smallest even integer of the sequence, count of negative integers in a sequence
Write method called multiconcat : Write method called multiConcat that takes a String and an integer as parameters. Return a String that consists of the string parameter concatenated
Identify a skill or knowledge that you learned : Identify a skill or knowledge that you learned in this course, and explain how you can apply it to increase success in your career in a real-world scenario.
Represents the amount of work performed : The recurrence equation being asked for is the one that represents the amount of work performed, not the one that defines the value of the factorial sequence.
Determining the database design : Design a database diagram that allows individuals to be assigned membership in one or more groups. Each group can have any number of individuals
Review the popular trade press journals : Using a Web browser or your local library's electronic-journal search tool, review the popular trade press journals to determine whether tape, disk.
Develop work plans in accordance with operational plans : BSBMGT502 Manage People Performance - Canberra Business and Technology College - Develop work plans in accordance with operational plans; allocate work in a way
Developing functional business software : How much effort is needed compared to developing functional business software?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Department does upgrade to windows

If the accounting department does upgrade to windows 10, will the department be able to run a legacy 16 bit billing program that was designed for windows XP?

  Describe this oscillation

The standard parameters result in a temperature slightly below 50. Find a set of parameters that move the temperature closer to 12. This model rarely results in a constant temperature; it usually oscillates. Describe this oscillation.

  Calculate tax saving in year 2 due to depreciation

Calculate tax saving in year 2 due to depreciation; if the double declining method is used for depreciation (tax rate is 30%).

  Is the attack still possible if we use the oaep padding

Oscar eavesdrops on the transferred ciphertext. Describe how he can successfully decrypt the message by exploiting the nonprobabilistic property of RSA.

  Low interest rate environment

We currently have the once-in-a-generation low interest rate environment, and the rates are likely to increase in the next decade.

  Managed or developed in a global context

The purpose of the project is to apply the knowledge and techniques you learn from this class to study real world problems. You will need to research a specific topic in the context of global IT management And write a 6 page paper.

  Configuring wireless connections

You are an administrator for the Contoso Corporation. You have a mobile computer that is used for troubleshooting.

  Brand equity for rei

What is your opinion of the brand equity for REI and its competitive positioning in the marketplace? What competitive factors are in play for REI?

  Traditional applications at companies

So far in systems analysis and design , the main focus has been traditional applications at companies we utilize using laptops/computers.

  The use of borrowed material and utilize original ideas

The paper should be in the range of 1200 - 1500 words with double spacing. It is very important to include proper APA citation (in-text citations with quotation marks and source information, plus a reference list). Please minimize the use of bo..

  Article overview of new technologies

Pick two of the technologies listed on this trajectory graphic in the article and write an original 500 word/one-page minimum response considering the following

  Vendor-provided operating system

Mainframe computers of the past usually ran only a vendor-provided operating system. Older personal computers often ran MS-DOS, CP/M, or a similar system. In addition, specialized operating systems have been created for real-time systems

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd