9. Programs A and B are analyzed and found to have worst-case running time no greater than 150 N log, N and N?, respectively. Answer the following questions, if possible a. Which program has the better guarantee on the running time, for large values of N (N>10,000)? b. Which program has the better guarantee on the running time, for small values of N (N<100)? c. Which program will run faster on average for N=1,000? d. Is it possible that program B will run faster than program A on all possible inputs.

Answers

Answer 1

a) Program B has the better guarantee on the running time, for large values of N (N>10,000).

b) Program A has the better guarantee on the running time, for small values of N (N<100)

.c) Which program will run faster on average for N=1,000 cannot be determined from the given information.

d) It is possible that program B will run faster than program A on all possible inputs.Explanation:

a) For large values of N (N>10,000), Program B has a worst-case running time of N log N which is better than the running time of program A which is 150N log N. Hence, program B has the better guarantee on the running time.

b) For small values of N (N<100), Program A has a worst-case running time of 150N log N which is better than the running time of program B which is N. Hence, program A has the better guarantee on the running time.

c) The average running time of the programs for N=1000 cannot be determined from the given information.

d) It is possible that program B will run faster than program A on all possible inputs. It depends on the input, so it is not possible to make a general statement regarding which program is faster on all possible inputs.

You can read more about program at https://brainly.com/question/23275071

#SPJ11


Related Questions

what is the purpose of the ground symbol used in electrical circuit diagrams? group of answer choices to show that there is a return path for the current between the source of electrical energy and the load. to show the source of electrical energy for the load. to show that there is common bus for connection of the source of electrical energy to the load.

Answers

Answer:

To show that there is a return path for the current between the source of electrical energy and the load.

which safety hazard are firefighters most likely to find in the space between the ceiling and the roof?

Answers

Firefighters are most likely to find the following safety hazards in the space between the ceiling and the roof: accumulation of combustible material, poor ventilation, and exposure to hazardous chemicals.


Accumulation of combustible materials such as wood, paper, insulation, and other debris can provide fuel for a fire, which can be difficult to contain in a confined space like the one between a ceiling and a roof.

Poor ventilation in this space can make it difficult for firefighters to breathe, and they can be exposed to hazardous chemicals such as asbestos, lead, and dust. Firefighters have to be careful with that.

Learn more about Firefighters : https://brainly.com/question/25483991

#SPJ11

the equation used to determine the approximate amount of of critical stress to propagate a crack is known as the friffith equation the griffith equation is

Answers

The Griffith equation is used to calculate the approximate amount of critical stress necessary to propagate a crack. The formula for the equation is K = √(πE/2Y), where E is Young's modulus, and Y is the geometrical factor, which depends on the shape of the crack.

The equation is based on the energy release rate for crack propagation and was developed by A.A. Griffith in 1921. The equation is used to calculate the stress intensity factor (K) for a crack in an elastic material.

The Griffith equation is important for engineers as it can be used to estimate how much stress a material can withstand before it will fracture. This is important when designing components or structures that will be subject to loading or fatigue. Additionally, the equation can be used to calculate the stress concentration factor (Kt) at a point of crack initiation.

In conclusion, the Griffith equation is an important equation used to calculate the approximate amount of critical stress necessary to propagate a crack. This equation can be used by engineers to ensure that their designs are able to withstand the expected loads, as well as calculate stress concentration factors.

You can learn more about Griffith at: brainly.com/question/30188283

#SPJ11

Please give a detail explanation, thank you
1) When solving the impact problems, we should always assume that during an impact between two bodies, there is no permanent deformation in the bodies.
True or false
2) If a semi-truck collides head-on with a mini car, which one will exert more force?
Semi-truck on the mini car
Mini car on the semi-truck
There is no force exerted
Both vehicles will exert equal force

Answers

The given statement "When solving the impact problems, we should always assume that during an impact between two bodies, there is no permanent deformation in the bodies" is False and  there is usually some amount of permanent deformation during an impact when semi-truck collides head-on with a mini car.

The statement is False because In reality, there is usually some amount of permanent deformation that occurs during an impact, especially if the impact is severe. However, in many cases, the amount of deformation may be negligible or can be ignored for simplicity in calculations.Therefore the statement is False.

If a semi-truck collides head-on with a mini car then According to Newton's Third Law of Motion, every action has an equal and opposite reaction. Therefore, both the semi-truck and the mini car will exert equal force on each other during a head-on collision. The force experienced by each vehicle will depend on factors such as their mass, speed, and the duration of the impact. However, it is likely that the semi-truck, being much larger and heavier than the mini car, will experience less of a change in velocity than the mini car and therefore will exert more force on the smaller vehicle.

To practice more questions on force:

https://brainly.com/question/12970081

#SPJ11

how does the sovent drainage and waste system operate without the venting piping used in traditional systems?

Answers

The solvent drainage and waste system operates without venting piping by using a combination of air flow and pressure.

Instead of relying on venting piping to exhaust fumes and waste, the system takes in air from the atmosphere and circulates it through the system with a blower or compressor. This creates a pressure difference that drives the solvent out of the system, taking any remaining waste with it. The pressure also keeps odors from escaping and prevents the system from backflowing.

Drainage is the removal of a mass of water either naturally or artificially from the surface or subsurface from a place.

Learn more about drainage : https://brainly.com/question/831589

#SPJ11

Which is a small plain text file that a website might place on your local drive?

Answers

Answer:A cookie

Explanation:To track interests.

3
Biocatalysis helps create flavors and scents through what process?
altering DNA

chemical reactions

purifying components in a formula

aiding with the decomposition process

Answers

Answer:

its B. ima keep it short its B

Explanation

what is an impact, ballistic or creep ripple? what is the length of these ripples relative to their heights? how does this ratio compare to those for aerodynamic and hydrodynamic ripples?

Answers

Impact, ballistic, and creep ripples are all types of surface features that can occur on materials subjected to different types of stresses.

Impact ripples are formed when a material is struck by a projectile or another object. Ballistic ripples are similar but are specifically formed by high-velocity projectiles. Creep ripples, on the other hand, are formed when a material is subjected to a constant stress over a long period of time, causing it to slowly deform.

The length of these ripples relative to their heights can vary depending on the specific material and conditions. However, in general, the ripples tend to have a relatively short wavelength compared to their height.

In comparison, aerodynamic and hydrodynamic ripples are formed by the flow of air or water over a surface. These ripples tend to have a much longer wavelength compared to their height, with the length-to-height ratio typically ranging from several to tens of thousands. This is because the fluid flow over the surface is generally much smoother and less abrupt than the stresses that cause impact, ballistic, and creep ripples.

To learn more about stresses refer to:

brainly.com/question/30128830

#SPJ4

air is compressed steadily and adiabatically from 290k, 90 kpa to 480k, 390 kpa. what is the isentropic efficiency of the compressor? a

Answers

The Isentropic efficiency of the compressor Let's consider the given parameters; Initial conditions: T1 = 290 kP1 = 90 kPa Final conditions: T2 = 480 kP2 = 390 kPa The isentropic efficiency of the compressor can be calculated using the following formula:ηs = (h2s - h1) / (h2 - h1)Whereηs = Isentropic efficiency of the compressorh1 = Enthalpy at the inlet of the compressorh2 = Enthalpy at the outlet of the compressorh2s = Isentropic enthalpy at the outlet of the compressor.

Now let's calculate the enthalpies; From the given conditions, we can find out the state point of the air at the inlet of the compressor using the steam tables: At P1 = 90 kPa, T1 = 290 K Using the steam tables, we find out h1 = 315.83 kJ/kg Similarly, we can find out the state point of the air at the outlet of the compressor using the steam tables: At P2 = 390 kPa, T2 = 480 K Using the steam tables, we find out h2 = 421.45 kJ/kg Now, let's calculate the isentropic enthalpy at the outlet of the compressor: Using the steam tables, we can find out the state point of the air at the outlet of the compressor if it were isentropic. At P2 = 390 kPa and S1 = S2Using the steam tables, we find out h2s = 455.41 kJ/kg Substituting these values in the isentropic efficiency formula, we get;ηs = (h2s - h1) / (h2 - h1)ηs = (455.41 - 315.83) / (421.45 - 315.83)ηs = 0.72Thus, the isentropic efficiency of the compressor is 72%.

for more such questions on parameters.

https://brainly.com/question/30380032

#SPJ11

Other Questions
rachel johnson has net monthly income of $2,500. she has a monthly auto loan payment of $275, a student loan payment of $150, and a credit card minimum payment of $50. what is her debt-payments-to-income ratio? you need to review the logs on a windows machine that's experiencing a lot of crashes. from powershell, you plan on using the get-eventlog command but need to use an option to see which logs are available. what is the full command you should use? Alex used his grandmothers recipe to make 11 3/7 pounds of granola. If he fills as many bags as he can with 2 2/3 pounds of granola in each bag, how many pounds will he have left over? A 16/21 poundB 2 20/21 poundsC 4 2/7 poundsD 8 16/21 pounds What does Einstein's famous equation say that all matter is?concentrated supernovas that have condensed into dwarfsconcentrated energy that has condensed into the atomsconcentrated atoms that have condensed into protonsconcentrated nebulas that have been condensed into red giants Music is the rhythm of the soul oral A rental car company charges $74. 90 per day to rent a car and $0. 13 for every mile driven. Tyee wants to rent a car, knowing that:He plans to drive 175 miles. He has at most $210 to spend. Write and solve an inequality which can be used to determine x, the number of days Tyee can afford to rent while staying within his budget NEEDD HELP URGENTLY, NOBODY ELSE IS HELPING FFS2.0 mol of Ca(OH)2 are mixed with 2.0 mol of HCl according to the following equation:Ca(OH)2+2HCl=CaCl2+2H2Oa. Which chemical is in excess and which is limiting reactant?b. What is the excess in grams?c.Theoretically,how many moles of H20 will be produced? what is the study to see how likely people are to change their attitudes once they find out that their partner disagrees with them diego wants to package all 48 brownies and 64 cookies so that each bag has the same combination of items. how many bags can he make, and how many of each will be in each bag? determine at least one way to package both items. the idea that our human emphasis on sex differences blinds us to the reality that the two sexes have far more in common than traditional theories recognize is referred to as . group of answer choices The US economy depends heavily on the retail sector because of all of the following EXCEPT:-the US retail industry significantly increases the gross domestic product (GDP)-retailing adds over a trillion dollars in value added to the economy-retail sales do not add to the nominal GDP-retailing accounts for a large percThe US economy depends heavily on the retail sector because of all of the following EXCEPT:-the US retail industry significantly increases the gross domestic product (GDP)-retailing adds over a trillion dollars in value added to the economy-retail sales do not add to the nominal GDP-retailing accounts for a large percent of total non-farm workers in the economyretail sales do not add to the nominal GDP_______ is an emerging retailing strategy that employs market data to best serve customers as they prepare to make a purchase. It focuses on understanding how a brand's target customers behave as shoppers.Shopper marketingSport Time Inc., a multinational retail corporation, uses a device that sends customers a marketing message via email or text when they are near a store. This is an example of:a beaconTuesday Morning offers close-outs of well-known brands and other discounted products such as jams and chocolate. The successful retailing model that Tuesday Morning uses is based on providing high-quality products and excellent customer service to attract customers to the store but never replenishing specific inventory items. This strategy does all of the following EXCEPT:-allow for a very lean operation-allow for a very costly operation-create an aura of exclusivity around each item-draw customers back to the store to look for new productsallow for a very costly operation What is the theme of "Does Time Pass" by Peter Dizikes a large bag contains marbles of different colors. there are 10 red marbles, 5 blue marbles and 7 yellow marbles. when selecting 3 marbles without replacement, find the probability of selecting 3 red marbles How many atoms are in 32.10 g of He For another researcher's data the starting mass of apparatus + solid was 113.249 g. After the reaction was complete the apparatus was reweighed. The resulting mass was 113.276 g. Which of the following could have caused the mass gain?Select all that applyGroup of answer choicesThe apparatus had a gas leak and room air could enter the apparatus.The apparatus picked up extra water droplets between weighingsThey forgot to weigh the mass of the gas-generating solid before the reaction.Matter was created in the reaction. explain the use of air bags and seat belts in terms of momentum and impulse. please provide examples (and calculations) to elaborate your concepts. an attacker sets up 100 drone computers that flood a dns server with invalid requests. this is an example of which kind of attack? answer spamming replay ddos backdoor Can someone helpme? what factors facilitated the expansion of national power later, during the great society period of policymaking? a haberdashery conducts an exhaustive analysis and calculates their profit function as 4x2 3x - 57. what is their fixed cost?