![barloase5747](/avatars/18623.jpg)
barloase5747
26.06.2021 •
Computers and Technology
Which of followings are true or false?
a. Swapping two adjacent elements that are out of place removes only one inversion.
b. Any algorithm that sorts by exchanging adjacent elements requires O(n log n)
c. Shellsort with a proper distance function is faster than mergesort for a very large input (like sorting 1 billion numbers).
d. The average-case performance of quick sort is O(NlogN), but the best-case performance of quick sort is O(N) for a pre-sorted input.
e. The number of leaves in a decision tree for sorting n numbers by comparisons must be 2n.
f. The height of a decision tree for sorting gives the minimum number of comparisons in the best case.
g. Any decision tree that can sort n elements must have height Big-Omega (n log n).
h. Bucket-sort can be modeled by a decision tree.
Solved
Show answers
More tips
- C Computers and Internet How to Delete Your Account on Odnoklassniki...
- H Health and Medicine What to Do When Your Jaw Locks Up?...
- G Goods and services What Are the Most Popular Services?...
- P Philosophy How did the concept of module arise in computer science?...
- F Food and Cooking How to Cook Julienne? Recipes and Tips...
- D Dating, Love, Relationships 10 Useful Tips on How to Survive a Breakup?...
- F Food and Cooking Apple Cider Vinegar: The Ultimate Health and Beauty Solution...
- C Computers and Internet Е-head: How it Simplifies Life for Users?...
- F Family and Home How to Choose the Best Diapers for Your Baby?...
Answers on questions: Computers and Technology
- C Computers and Technology This elementary problem begins to explore propagation delay and transmission delay, two central concepts in data networking. Consider two hosts, A and B, connected by a single...
- B Biology Even though Earth s South Pole receivesno sunlight during winter in the SouthernHemisphere, the area is not totally without heat.Explain this phenomenon,a Energy is reflected...
- C Chemistry Select the statements below that are correct.a) If a chemical reaction is spontaneous then the ?Ssys must always be positive. b)If a chemical reaction with a negative ?Ssys...
- B Business The classifications of a lease by the lessee area. operating and finance leases.b. operating, sales, and finance leases.c. operating and leveraged leases.d. None of these answers...
- C Chemistry 1. The diene and the dienophile react in a 1:1 ratio in this experiment. However, in the procedure, you add one of the reagents in excess. Which one is in excess and why is...
- E English 4. Which places does Samantha enjoy going to?5. What does Erin think about Alaska?...
- M Mathematics (A) Find the general solution to y + 2y =0. Give your answer as y = In your answer, use C_1 and C_2 to denote arbitrary constants and x the independent variable. Enter C_1 as...
- E Engineering (a) Compute the electrical conductivity of a cylindrical silicon specimen 7.0 mm (0.28 in.) diameter and 57 mm (2.25 in.) in length in which a current of 0.25 A passes in an...
- M Mathematics Jar A contains two marbles(green and white). Jar B contains three marbles(blue,yellow,and red).Jar C contains two marbles (purple and pink). How many outcomes are possible if...
- M Mathematics A bakery offers a sale price of $3.15 for 4 muffins. What is the price per dozen?...
Ответ:
Explanation:
a. Swapping two adjacent elements that are out of place removes only one inversion.
True
b. Any algorithm that sorts by exchanging adjacent elements requires O(n log n)
False
c. Shellsort with a proper distance function is faster than mergesort for a very large input (like sorting 1 billion numbers).
True
d. The average-case performance of quick sort is O(NlogN), but the best-case performance of quick sort is O(N) for a pre-sorted input.
True
e. The number of leaves in a decision tree for sorting n numbers by comparisons must be 2n.
False
f. The height of a decision tree for sorting gives the minimum number of comparisons in the best case.
True
g. Any decision tree that can sort n elements must have height Big-Omega (n log n).
h. Bucket-sort can be modeled by a decision tree.
True
Ответ:
thank you
Explanation: