Data structures & algorithmsLesson 1 of 3 in the course Search

Search Algorithms: Data Retrieval, State Spaces, and Specialized Methods

5 flashcards · 5 quiz questions · 5 match pairs · 5 fill-in sentences · English

Lesson progress
0 / 5

Your progress is kept in this browser only.Sign up to save it

Summary

A search algorithm finds information or a solution within a collection of data or a problem’s search space. Search appears in tasks ranging from checking whether a value is in a list to finding a route or choosing a move in a game.

A search algorithm is a procedure designed to solve a search problem. It retrieves information stored in a data structure or examines possible values in a problem domain. The values may be discrete, such as records in a database, or continuous, such as possible settings for an industrial process.

All flashcards

How does linear search work?
It checks records in sequence until it finds the target or reaches the end.
What requirement enables binary search to discard half the candidates?
The search structure must be ordered so comparisons indicate which half can be eliminated.
What does O(log⁡n)O(\log n) mean for binary search?
Its maximum theoretical number of steps grows logarithmically with the size of the search space.
What is a heuristic in search?
Information about a problem's structure used to guide the search.
What does Grover's algorithm illustrate?
A theoretical quantum-search method that can outperform linear or brute-force search.

Quiz questions

  1. How does hashing locate a record?Answer: A hash function maps a key to a record's location.
  2. What characterizes brute-force search?Answer: It examines possibilities without using special knowledge about the search space.
  3. How does local search explore a virtual search space?Answer: It moves from one state to a neighboring state.
  4. In a game tree, what do nodes and branches represent?Answer: Nodes represent game situations, and branches represent possible moves.
  5. Which statement about Grover's algorithm is supported by its theoretical description?Answer: It can search faster than linear or brute-force search on a quantum computer.

Based on the Wikipedia article Search algorithm, licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.

All Data structures & algorithms lessons