![asseatingbandit](/avatars/1381.jpg)
asseatingbandit
24.12.2019 •
Computers and Technology
Suppose for the worst case, given input size n: algorithm 1 performs f(n) = n2 + n/2 steps algorithm 2 performs f(n) = 12n + 500 steps what is the smallest value of n for which algorithm 2 will be faster than algorithm 1?
Solved
Show answers
More tips
- C Cities and Countries What time does the Metro open in Moscow?...
- T Travel and tourism How to Use a Compass: A Beginner s Guide...
- C Computers and Internet Porn Banner: What It Is and How to Get Rid Of It?...
- F Food and Cooking How many stages of coffee roasting are there?...
- F Food and Cooking From Latte to Espresso: Which Coffee Drink is the Most Popular on Earth?...
- F Food and Cooking Experts Name Top 5 Healthiest Teas...
- C Computers and Internet Google Search Tips and Tricks: Everything You Need to Know...
- H Health and Medicine Discover the Hidden Principles and Real Results of the Japanese Diet...
- H Health and Medicine Liver Cleansing - Rejuvenation for the Body?...
- S Style and Beauty Is Photoepilation the Solution to Unwanted Hair Forever?...
Ответ:
29
Explanation:
for n=28:
Algorithm 1 performs f(n) = n2 + n/2 = 28*28 + 28/2 = 798
Algorithm 2 performs f(n) = 12*28 + 500 = 836
for n=29
Algorithm 1 performs f(n) = n2 + n/2 = 29*29 + 29/2 = 855.5
Algorithm 2 performs f(n) = 12*29 + 500 = 848
so, for n=29, algorithm 2 will be faster than algorithm 1
Ответ:
Transfer Control Protocol and Internet Protocol are the standard protocols which are used when transferring data over a network, and that data arriving to the correct destination.
Hypertext Transfer Protocol, and covers how data travels over the world wide web, such as text, images and videos.
Packet Switching, and covers how data travels across the internet after they have been broken in the small data packets of information, so that they can be reassembled when they reach he destination.