Berlekamp–Massey algorithm
The Berlekamp–Massey algorithm is an algorithm that will find the shortest linear-feedback shift register (LFSR) for a given binary output sequence. The algorithm will also find the minimal polynomial of a linearly recurrent sequence in an arbitrary field.
Source: Wikipedia — Berlekamp–Massey algorithm (CC BY-SA 4.0)