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
Semmy [17]
4 years ago
14

Suppose that a computer can run an algorithm on a problem of size 1,024 in time t. We do not know the complexity of the algorith

m. We note that when we run the same algorithm on a computer 8 times faster, in the same time t, we can solve a problem of size 8,192. We also note that when we run the same algorithm on a computer 8 times slower, in the same time t, we can solve a problem of size 128.
Computers and Technology
1 answer:
Setler79 [48]4 years ago
5 0

Answer:

Time Complexity of Problem - O(n)

Explanation:

When n= 1024 time taken is t. on a particular computer.

When computer is 8 times faster in same time t , n can be equal to 8192. It means on increasing processing speed input grows linearly.

When computer is 8 times slow then with same time t , n will be 128 which is (1/8)th time 1024.

It means with increase in processing speed by x factor time taken will decrease by (1/x) factor. Or input size can be increased by x times. This signifies that time taken by program grows linearly with input size n. Therefore time complexity of problem will be O(n).

If we double the speed of original machine then we can solve problems of size 2n in time t.

You might be interested in
Which one of the following types of statements is an instruction to replace the existing value of a variable with another value?
Greeley [361]

Answer:

The answer is "Option c"

Explanation:

The assignment is the statement used to determine the value of the programming variable. It is also regarded as the same sign indicating the function (=) in the operator. This operand works by allocating the operand's value to the right-hand side, and other choices are not correct that can be described as follows:

  • In option a, It is a keyword that is used to update table details.
  • In option b, It is part of programming, which is used to the declared variable.
  • In option d, It is used to assign value in variable.  
8 0
4 years ago
100 points, PLEASE HELP...To generate numbers between and including -10 to 10 you would use:
Orlov [11]

Answer:

A number line?

6 0
3 years ago
Write a function named swapFrontBack that takes as input a vector of integers. The function should swap the first element in the
kondaur [170]

Answer:

#include <iostream>

#include <vector>

using namespace std;

void swapFrontBack(vector<int>& nums) {

if(nums.size() < 2) {

return;

}

swap(nums[0], nums[nums.size()-1]);

}

void printit(vector<int>& arr) {

for(int i = 0; i < arr.size(); i++) {

cout << arr[i] << " ";

}

cout << endl;

}

int main() {

vector<int> num1;

swapFrontBack(num1);

printit(num1);

num1.push_back(1);

swapFrontBack(num1);

printit(num1);

num1.push_back(2);

swapFrontBack(num1);

printit(num1);

vector<int> num2(10, 1);

num2[9] = 2;

swapFrontBack(num2);

printit(num2);

return 0;

}

Explanation:

4 0
3 years ago
An increase in the Money Supply will increase the Aggregate Price Level and will also increase which of the following?
Pavlova-9 [17]

your answer is b hope this helps


7 0
3 years ago
Which of the following are the functions of an os?
cricket20 [7]
Manage the computer's resources, such as the central processing unit, memory, disk drives, and printers, (2) establish a user interface, and (3) execute and provide services for applications software.
6 0
3 years ago
Other questions:
  • Which of the following is a good choice to help you stay organized when you are away from the office? A. Personal Information ma
    7·1 answer
  • My 2 in 1 laptop/tablet
    13·1 answer
  • Networking device converts analog signals to digital ones?
    8·1 answer
  • The __________ is the system of official channels that carry organizationally approved messages and information.
    15·1 answer
  • John Cleaver is the CEO of Tech World, which is a retail store that sells computers, monitors, cameras, televisions and many oth
    6·1 answer
  • Which of the following is productivity strategy for collaboration?
    6·1 answer
  • Which of the following statements is TRUE of business intelligence (BI) systems? Business intelligence systems are primarily use
    7·1 answer
  • I WILL GIVE MOST BRAINLY
    13·1 answer
  • HELP!!!!!!!!!! I'M SOO STUCK ON EXCEL OFFICE FUNDAMENTALS!!!!!! I'LL GIVE BRAINLIEST TO THE FIRST RIGHT ANSWER!!!! PLEASE, I'M B
    12·1 answer
  • When a person's personal information is collected by other parties, it refers to the issue of
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!