Beam search is a best-first search algorithm that maintains a fixed-size set, the beam width (k), of the most promising partial solutions at each step of the search tree. It expands only the k best nodes according to a heuristic evaluation function, pruning all others to manage computational cost. This makes it a memory-efficient and time-efficient approximation of breadth-first search, trading optimality for speed in vast state spaces like those encountered in machine translation and sequence generation tasks.
