subject

Consider the following description of two algorithms, A and B, each with the same Big-O. In A's actual growth function there is a larger constant being added than in B's. In B's actual growth function the dominant factor has a larger constant multiplier than in A's. Assume that the functions are alike in every other way. When looking at actual run-times (rather than Big-Oh), is one likely to be better than the other in all circumstances? If so, which? Explain. A. Neither is better than the other in any circumstance, because the two algorithms have the same Big-Oh and will always have exactly the same performance.
B. B is the better algorithm because the larger constant addend in A means that A will always have more overhead than B.
C. A is the better algorithm because the larger constant multiplier in B means that A will always be more efficient than B.
D. None of these is correct.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 08:30
@josethesolis i need can anyone text me and follow me
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
An npn transistor is correctly biased and turned on if the a. base is negative. b. collector is negative. c. collector is positive with respect to the emitter and negative with respect to the base. d. collector is the most positive lead followed by the base.
Answers: 1
question
Computers and Technology, 25.06.2019 07:30
What does the hard disk drive do? it stores all of the information on a computer. it controls a computer’s operating system. it enables visual interaction with a computer. it contains all of a computer’s internal parts.
Answers: 1
question
Computers and Technology, 25.06.2019 10:20
Write a program that lets the user play the game of rock, paper, scissors against the computer. the program should work as follows. 1. when the program begins, a random number in the range of 1 through 3 is generated. if the number is 1, then the computer has chosen rock. if the number is 2, then the computer has chosen paper. if the number is 3, then the computer has chosen scissors. (don’t display the computer’s choice yet.) 2. the user enters his or her choice of “rock”, “paper”, or “scissors” at the keyboard. (you can use a menu if you prefer.) 3. the computer’s choice is displayed. 4. a winner is selected according to the following rules: • if one player chooses rock and the other player chooses scissors, then rock wins. (the rock breaks the scissors.) • if one player chooses scissors and the other player chooses paper, then scissors wins. (scissors cuts paper.) • if one player chooses paper and the other player chooses rock, then paper wins. (paper wraps rock.) • if both players make the same choice, the game must be played again to determine the winner. be sure to divide the program into functions that perform each major task. include the code and the console output from running your program with test inputs in your report.
Answers: 3
You know the right answer?
Consider the following description of two algorithms, A and B, each with the same Big-O. In A's actu...
Questions
question
Mathematics, 02.04.2020 22:26
question
Mathematics, 02.04.2020 22:26
question
Mathematics, 02.04.2020 22:26
question
Mathematics, 02.04.2020 22:26
Questions on the website: 13722362