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

Give big-O estimate for the number of operations (multiplication or addition) used in the following algorithm segment (ignore co

mparisons to check while conditions).
i =1
t = 0
while i <= n
i = t+i
t = 2i
Computers and Technology
1 answer:
Novay_Z [31]3 years ago
6 0
<span>'m pretty sure the big O is actually O(log n) Not really a proof but anyway. If you write out the values before each iteration of the loop you get. L - iteration number L i t 1 1 0 2 1 2 3 3 6 4 9 18 5 27 54 6 81 162 So if n was 80 it would take 6 iterations You can see i is growing like 3^(L-2) So if n was 1000 1000 = 3^(L-2) log(1000) [base 3] = L - 2 log(1000) [base 3] + 2 = L 8.287709822868152 = L and if you ceil the answer you get L = 9 and just to check with the table 6 81 162 7 243 486 8 729 1458 9 2187 ... The table isn't perfect but hopefully you get the main idea.</span>
You might be interested in
DECIPHER AND SOLVE THIS<br><br> SCC:R<br> D<br> YJOTE VP=GPIMFRT
blagie [28]
Um.... alrighty then
6 0
2 years ago
What is the function of tab?<br>​
Sholpan [36]

Answer:

The function of the tab is used to advance the cursor to the next tab key.

5 0
1 year ago
A service technician removed the inspection/fill plug from the differential of a rear-wheel- drive vehicle and gear lube started
adell [148]

Answer:

The correct answer is - Technician B is correct.

Explanation:

Because when the service technicians remove inspection plug from a differential of the rear wheel drive vehicles and then the gear lubes is started to flows out and after that, it catches the fluids and allows the fluids to continue to the drain.

So, that's why the technician B is correct.

4 0
3 years ago
What is the best anime that you like the most (give me 3 plz)
Dmitry [639]

Answer:

The rising of shied hero, last hope, and dragon pilot.

4 0
2 years ago
Read 2 more answers
Write a program that prints the following 45 pairs of numbers:
sattari [20]

Answer:

  • Code is in JAVA language. As there is no user input the logic is straightforward.
  • Below is the code along with a detailed explanation of the logic.
  • The class name is Print main save as file as the main class.

Explanation:

Program:-

public class Main{

public static void main(String args[]){

/* There are two for loops...

* First for loop runs from i=1 to i=9

* Second for loop runs from j=1 to j=i.

*

*/

for(int i=1;i<=9;i++){

for(int j=1;j<=i;j++){ // j loop runs from j=1 to j=i

/*Prints I and j next to each other*/

System.out.println(i+""+j);

}//for loop of j ends here

}// for loop of I ends here

}

}

6 0
2 years ago
Other questions:
  • To display or distribute information from a database, programmers or database administrators create ___ .
    12·1 answer
  • In order for Dr. Reynolds to send a CPOE from her office computer system to the computer system at the local hospital, a/an ____
    5·1 answer
  • Alexandria works for a non-profit company that asks for donations to help the homeless people in her community. Recently the dat
    12·1 answer
  • FIGURE A-1—Use the information in this chart to answer Question 1.
    6·1 answer
  • Describe two circumstances where access services might get implemented by organizations please.​
    9·1 answer
  • Describe how to find and replace a text in a document​
    13·1 answer
  • State differences between title bar and menu bar​
    5·1 answer
  • How do you change your name on your brainly profile
    14·2 answers
  • Which statement best defines the Control Pannel?
    12·1 answer
  • A(n) Blank______ database management system allows users to create, read, update, and delete data in a relational database. Mult
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!