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
Ksju [112]
3 years ago
15

What is the big-O performance estimate of the following function?

Computers and Technology
2 answers:
larisa [96]3 years ago
8 0

Answer:

The time complexity of the code is O(log₇n).

Explanation:

The i is updated by 7*i.On each iteration i is multiplied by 7.So on finding the time complexity of the code given above it will come out to  be log base 7.

When we divide the input by 2 the time complexity is log base 2.

So on dividing it by 7 we get the time complexity of log base 7.

Digiron [165]3 years ago
4 0

Answer:

Since the loop index variable i is initialized to 0, this function will result in infinite execution for all values of n>=0.

If instead the loop index variable is initialized to 1, Big O performance estimate of the code is O(log n) with logarithm base as 7.

Explanation:

Given function:

int f (n) {

int sum = 0;

for (i = 0; i < n; i = 7 * i)

sum += i;

return sum;

} // end f

The complexity is determined by the for loop. Starting value of the index variable i is 0.  At each iteration the value of the index variable i is multiplied by 7 (i=7*i). But multiplication by 7 still leaves the value of the index variable as 0. So loop condition i<n will fail for all n>=0 and the loop will continue indefinitely since the termination condition will never be achieved.

However if the loop index variable i is initialized to 1 instead, the loop will run O(log n) times with 7 as the base of the logarithm due to successive multiplication of index variable by 7 at each iteration.

You might be interested in
In a natural-language processing (NLP) system, the__________activity involves using the computer to read large amounts of text a
OleMash [197]

Answer:

Analysis is the right suitable word to complete the sentence

Explanation:

It is because, Analysis is a concept, which means to judge any subjects and brings some original concept which is needed to take from the subjects.

Here in the above question the paragraph states about the summarize points taken from a large amount of data and analysis also mean the same and analysis is also the activity used in NLP for the same as above discussed.

7 0
3 years ago
What are the functions of information technology?
Gekata [30.6K]

There are six basic functions of IT.

1. Capture: Compiling detailed records of activities.

2. Processing: Converting, analyzing, computing and synthesizing all forms of data and information.

3. Generation: Organizing information into a useful form.

4. Storage: Retaining information for further use.

5. Retrieval: Locating and copying stored data or information for further processing or for transmission to another user.

6. Transmission: Distributing information over a communication network.

3 0
1 year ago
A bulb has a resistance of 15Ω and is rated at 3A. What is the maximum voltage that can be applied across the bulb?
Anastasy [175]

Answer:Wheres the option choice??????????????????????

Explanation:

7 0
2 years ago
mta software development fundamentals You are creating an application that accepts input and displays a response to the user. Yo
Harlamova29_29 [7]

Answer: Console-Based

Explanation:

A console based application is an application that helps in facilitating the reading and the writing of the characters from a console.

It is vital in the provision of a simple user interface for the applications that requires little interaction. Since the application accepts input and displays a response to the user and cannot create a graphical interface for this application, then it's a console based application.

8 0
2 years ago
If a touch screen chrome is not charging what is wrong with it
AysviL [449]
Look it up on a best buy website ion know
5 0
3 years ago
Read 2 more answers
Other questions:
  • Hope wants to add a third use at the end of her
    14·1 answer
  • Write an expression that evaluates to 1 more than the value in the location pointed to by the integer pointer variable ip. Thus,
    8·1 answer
  • Differentiate between third and fourth generation of computer​
    6·1 answer
  • Many programmers today use a(n) _________, which is software that helps them build their computer programs. eula cad sdlc ide
    15·1 answer
  • What is the most common concern with using variable frequency drives?
    6·1 answer
  • Which type of microscope can only be used to view non-living specimens?
    10·2 answers
  • An interface does not have ____.
    13·1 answer
  • Why are mobile apps often easier to develop than desktop apps?
    11·1 answer
  • Tips for staying safe using social media. Using in your own words.
    6·1 answer
  • Can some one help me with this please
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!