answersLogoWhite

0


Best Answer

When sequentially searching n items, the best-case is O(1) and the worst-case is O(n). But when the items are sorted, binary search will improve efficiency. The best case is still O(1), but worst case drops to O(log n) where log n is the binary logarithm of n.

Binary search starts with the middle element of the set. If the set is empty, the item we're looking for does not exist but if the middle element is the item we are looking for then we are done. If not, a simple comparison will tell us in which half of the set to discard (including the middle element). We repeat the process with the remaining half. If there are no elements remaining, the item does not exist.

User Avatar

Wiki User

6y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How you can improve search efficiency of sequential search for a sorted file. Discuss limitations in such?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is a random access file in QBasic?

Random access simply means the ability to read and write anywhere in the file, as opposed to sequential access where data is simply appended to the end of the file and is accessed by traversing from the start of the file in sequential order. Random access is ideally suited to data arrays where every element in the file is exactly the same length, allowing constant-time traversal from one element to any other, in both directions. If the data is also sorted, random access also allows binary search to improve search efficiency.


How did the addition of a condenser improve the steam engine?

It increased the engine's efficiency, making it useful for other kinds of work.


How did scientific management help Henry ford improve the making of automobiles?

Scientific management increased the efficiency of his operation.


Parameters of site selection for solar power plant?

Reach energy cost reduction goals and improve utility efficiency.


How you can improve search efficiency of sequential search for a sorted file?

When sequentially searching n items, the best-case is O(1) and the worst-case is O(n). But when the items are sorted, binary search will improve efficiency. The best case is still O(1), but worst case drops to O(log n) where log n is the binary logarithm of n. Binary search starts with the middle element of the set. If the set is empty, the item we're looking for does not exist but if the middle element is the item we are looking for then we are done. If not, a simple comparison will tell us in which half of the set to discard (including the middle element). We repeat the process with the remaining half. If there are no elements remaining, the item does not exist.

Related questions

How control improve overall efficiency and effectiveness?

one of the functions of the A/S is to provide adequate controls to ensure the safety of organizational assets,including data discuss how well the control can improve efficiency and effectiveness.


How you can improve search efficiency of sequential search for a sorted file. Discuss limitations in such.?

When sequentially searching n items, the best-case is O(1) and the worst-case is O(n). But when the items are sorted, binary search will improve efficiency. The best case is still O(1), but worst case drops to O(log n) where log n is the binary logarithm of n. Binary search starts with the middle element of the set. If the set is empty, the item we're looking for does not exist but if the middle element is the item we are looking for then we are done. If not, a simple comparison will tell us in which half of the set to discard (including the middle element). We repeat the process with the remaining half. If there are no elements remaining, the item does not exist.


How does the ECT feature of Toyota Land Cruiser work?

Improve acceleration and fuel efficiency with six forward gears and Electronically Controlled Transmission (ECT). A sequential-shift feature allows you to select gears with the feel of a manual transmission Shah, Umer


To what extent is HR management able to improve the efficiency of a business?

To what extent is Human Resource Management able to improve the efficiency of the business.


3 Explain how the lockbox system can improve the efficiency of cash management?

Explain how the lockbox system can improve the efficiency of cash management.


What steps would you take to improve the overall efficiency of cash management of a firm?

steps taken to improve the efficiency of cash management


importance of business information system?

to improve paformance to improve service tocustomers to improve efficiency


Important of information system in business?

to improve paformance to improve service tocustomers to improve efficiency


How do you improve efficiency?

increased sa:v ratio


How does spooling improve efficiency of an os?

a lot


Why did factory laborers hated the introduction of methodd to improve efficiency?

Factory laborers hated the introduction of method to improve efficiency because it increased the monotony of work.


How do you improve efficiency in simple machine?

To improve efficiency in simple machines, you can reduce friction by using lubricants, ensure components are properly aligned, and minimize energy losses by selecting appropriate materials. Regular maintenance and overall design optimization can also help improve efficiency.