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
Nikolay [14]
3 years ago
13

What is the f(n) runtime of the following pseudocode: sum-0 for A = N/2 downto 1 for B-1 t increment sum by B Explain: exactly w

hat is wrong with the following diagram why it is incorrect how to fix it NP NP- Complete
Computers and Technology
1 answer:
Romashka [77]3 years ago
3 0

The diagram part of the question is incomplete but the mathematical part has been solved below for you . However when the diagram will be attached it will be answered too.

Answer:

Following is the solution for the Time complexity/ Run Time:

Given that:

A = N/2 to 1

B = 1 to 4N

By summation:

Time Complexity = Lower bound of A * Upper Bound of B

Time Complexity = (N/2) * (4N)

By simplifying:

Time Complexity = N * 2N

Time Complexity = 2N^2

Hence the runtime f(n) for given pseudocode will be 2N^2

i hope it will help you!

You might be interested in
Why should information technology NOT be taught in school?​
tatiyna

Explanation:

Technology should not be used to teach in school as it can lead to distractions. With kids wanting to explore other sights, cheating, and communicating with others. Also, it can be expensive to purchase the technology for everyone as it can be a major investment with hundreds or thousands going into it. Technology also requires a lot of training by having to adapt lessons compatible with the systems and making sure the software is secure.

5 0
3 years ago
What is Computer categories
MA_775_DIABLO [31]
Computer Categories are like

Supercomputers, mainframe computers, microcomputers, mobile computers, minicomputers.

I hope that this is the type of answer that you were looking for.
5 0
3 years ago
What are the main types of reading tools? Check all that apply. please HELP​
vovangra [49]

Answer:

Comprehension

reference

3 0
2 years ago
If someone wouldn’t mind answering the first question for me
kompoz [17]

1.

  • Keep the title bold
  • <u>Underline</u> important statements
  • Colour the words (but the document shouldn't be too colourful)
8 0
3 years ago
What was Leonardo da Vinci an expert in
Ipatiy [6.2K]

Leonardo da Vinci was a very famous painter. I would assume that he is an expert in painting.

Hope this helped

5 0
3 years ago
Other questions:
  • How do you ask someone for help?
    6·1 answer
  • How can i use css/html coding to create links
    15·1 answer
  • \Read the sentence.
    12·1 answer
  • What did Francis Ford Coppola and George Lucas create?
    10·1 answer
  • Which type of microscope can only be used to view non-living specimens?
    10·2 answers
  • I need a good science fair name I’m doing a homemade water filter and I have no idea what the title should be plz help
    14·1 answer
  • Select the correct answer
    5·2 answers
  • 4.12 LAB: Using math methods Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to
    10·1 answer
  • Essay about evolution of media shaped the values and norms of the society
    11·1 answer
  • If a computer uses 500 characters, how many bits this system requires to give different code to all characters?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!