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

Time complexity: Be sure to show your work. Suppose that a particular algorithm has time complexity T (n) = 10 ∗ 2n, and that ex

ecution of the algorithm on a particular machine takes T seconds for n inputs. Now, suppose you are presented with a machine that is 64 times as fast as your current machine. How many inputs can you process on you new machine in T seconds?Suppose that a particular algorithm has time complexity T (n) = 5 ∗ n3, and that execution of the algorithm on a particular machine takes T seconds for n inputs. Now, suppose you are presented with a machine that is 64 times as fast as your current machine. How many inputs can you process on your new machine in T seconds?Suppose that a particular algorithm has time complexity T (n) = 16n, and that execution of the algorithm on a particular machine takes T seconds for n inputs. Now, suppose you are presented with a machine that is 64 times as fast as your current machine. How many inputs can you process on you new machine in T seconds?Bonus:Suppose that computer A executes 1 billion instructions per second, and computer B executes 10 million instructions per second, i.e, Computer A is 100 times faster than computer B in raw computing power. Suppose an expert programmer implements insertion sort in machine language for computer A, and the resulting code requires 2 * n2 instructions to sort n numbers. Suppose an average programmer implements merge sort, using a high-level language on computer B, with the resulting code taking 5 * n *log2n instruction. How long does computer A and computer B take to sort 10 million numbers respectively?
Computers and Technology
1 answer:
Savatey [412]3 years ago
3 0

Answer:

a. m = 64n

b. m = 4n

c. m = 64n

Explanation:

a) Time complexity in this problem is,

T(n)10 x 2n

For n inputs the old machine takes T seconds,

The new machine is 64 times faster than current machine. Suppose it solves m operation in same time then,

T(m)/T(n) = 64

20m/20n = 64

m = 64n

so it will solve 64n inputs in T Time.

b) Same as above problem, we get,

T(m)/ T(n)= 64

5m^3/5n^3= 64

m^3n^3 =64

m^3 = 64n^3

m = 4n

c) The no of inputs that can be solved on 64 times faster machine is,

T(m)/T(n) = 64

16m/16n = 64

m/n =64

m=64n

You might be interested in
Source code is one particular representation of a software system. It highlights some details and hides others. This is a good e
grigory [225]

Answer:

Abstraction

Explanation:

Under fundamental principles of software engineering, the term "abstraction" is simply defined as the act of highlighting some details and hiding other ones.

Thus, the correct answer among the options is Abstraction.

8 0
3 years ago
Discuss the what is software development​
aleksandr82 [10.1K]

Answer:

software development is the conceiveing, specifying , designing, programing , texting, document and fix involved in creating and application frame work or other software components.

5 0
3 years ago
Help please fast
Pachacha [2.7K]
Bookmark because you can go back to it at any given time to re use it
4 0
3 years ago
Read 2 more answers
Design and implement an algorithm that gets as input a list of k integer values N1, N2,..., Nk as well as a special value SUM. Y
satela [25.4K]

Answer:

Follows are the code to this question:

def FindPair(Values,SUM):#defining a method FindPair  

   found=False;#defining a boolean variable found

   for i in Values:#defining loop for check Value  

       for j in Values:#defining loop for check Value

           if (i+j ==SUM):#defining if block that check i+j=sum

               found=True;#assign value True in boolean variable

               x=i;#defining a variable x that holds i value

               y=j;#defining a variable x that holds j value

               break;#use break keyword

       if(found==True):#defining if block that checks found equal to True

           print("(",x,",",y,")");#print value

       else:#defining else block

           print("Sorry there is no such pair of values.");#print message

Values=[3,8,13,2,17,18,10];#defining a list and assign Values

SUM=20;#defining SUM variable

FindPair(Values,SUM);#calling a method FindPair

Output:

please find the attachment:

Explanation:

In the above python code a method, "FindPair" is defined, which accepts a "list and SUM" variable in its parameter, inside the method "found" a boolean variable is defined, that holds a value "false".

  • Inside the method, two for loop is defined, that holds list element value, and in if block, it checks its added value is equal to the SUM. If the condition is true, it changes the boolean variable value and defines the "x,y" variable, that holds its value.
  • In the next if the block, it checks the boolean variable value, if the condition is true, it will print the "x,y" value, otherwise, it will print a message.  

6 0
3 years ago
Please someone participate in my typing race ...
dsp73

Answer:

what is typing race

this link can not be clicked

8 0
3 years ago
Other questions:
  • How do I delete a class on Edulastic?
    8·2 answers
  • geoffrey is on location for a long shoot. he is worried that the battery power in his camera will not last. which source can he
    5·1 answer
  • The belief that the odds of two events occurring together are greater than the odds of either event occurring alone is the _____
    9·2 answers
  • What is the primary way to access applications in window 10
    7·1 answer
  • Computer __ is any part of the computer that can be seen and touched​
    6·1 answer
  • Unanswered questionl
    12·1 answer
  • How todraw a status bar​
    9·1 answer
  • My uh coding teacher would like the class to do little piggy with code.
    10·1 answer
  • What can a user do using the Contact Group dialog box? Check all that apply.
    10·2 answers
  • The format that you will use on your works cited page when the entry is longer than one line is__________.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!