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
____ are diagrams used in mathematics and logic to help describe the truth of an entire expression based on the truth of its par
Bad White [126]
<span>Truth tables are diagrams used in mathematics and logic to help describe the truth of an entire expression based on the truth of its parts.

A truth table shows all the possible combinations (outputs) that can be produced from the given inputs. They are mainly used in Boolean algebra.</span>
4 0
2 years ago
Supposethatyoubet$5oneachofasequenceof50independentfairgames. Usethecentrallimittheorem to approximate the probability that you
lions [1.4K]

Answer:

0.119

Explanation:

50 independent fair games

Mean will be 50/2 = 25

Standard deviation of the loosing probability is :

\sqrt{50*0.5*0.5} * 10 = 33.536

we have to loose 33 times out of 50 games.

To find the approximate probability we use z- value table.

z value =  \frac{33-25}{3.35}

z - value = 2.2659

Looking at the z-value table we get 0.119.

8 0
3 years ago
Which of the following refers to the bottom pane of the Wireshark window where all of the information in the packet is displayed
Lorico [155]

Answer:

D) Hex Pane.

Explanation:

Hex Pane  is the bottom pane where whole information in the packet is shown in hexadecimal format on the left and also in character when possible and decimal also.It is the bottom pane of Wireshark window.

So we can say that Hex pane is referred to the bottom pane of the Wireshark window which displays the information in hexadecimal on the left .

5 0
2 years ago
When did the silent movie era end?<br> A.1919<br> B.1929<br> C.1939<br> D.1949
11111nata11111 [884]

Answer:

The answer is 1929.

5 0
3 years ago
Read 2 more answers
Write a function named power that accepts two parameters containing integer values (x and n, in that order) and recursively calc
lianna [129]

Answer:

Following are the code to the given question:

int power(int x, int n)//defining a method power that accepts two integer parameters

{

if (n == 0)//defining if block to check n equal to 0

{

return 1; //return value 1

}

else//defining else block

{

x = x * power(x, --n); //use x variable to call method recursively

}

return x; //return x value

}

Explanation:

In the above-given code, a method power is defined that accepts two integer variable in its parameter, in the method a conditional statement is used which can be defined as follows:

  • In the if block, it checks "n" value, which is equal to 0. if the condition is true it will return value 1.
  • In the else block, an integer variable x is defined that calls the method recursively and return x value.
8 0
2 years ago
Other questions:
  • The main activity area or the brain of the computer is called the ________
    15·1 answer
  • What does computer means?
    13·2 answers
  • Write a class named Episode. An instance of this episode class will represent a single episode of a TV show, with a title, a sea
    12·1 answer
  • Wired network are the most reliable and provide the highest speed?
    7·1 answer
  • Muultimedia Promo try answer this question and explaining them or give examples of that topic Thanks
    10·1 answer
  • What is the purpose of file extensions? A. They execute the mail merge function, B. They tell the operating system what kind of
    15·2 answers
  • 1.
    9·1 answer
  • What is the main advantage that a website builder offers for web development?
    9·2 answers
  • Function of pons for class 7​
    15·1 answer
  • One of the most notable impacts of IT on business is improved
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!