  Using greedy algorithms to generate de Bruijn sequences is a classical
approach that has produced numerous interesting theoretical results. This paper
investigates an algorithm which we call the Generalized Prefer-Opposite (GPO).
It includes all prior greedy algorithms, with the exception of the Fleury
Algorithm applied on the de Bruijn graph, as specific instances. The GPO
Algorithm can produce any binary periodic sequences with nonlinear complexity
at least two on input a pair of suitable feedback function and initial state.
In particular, a sufficient and necessary condition for the GPO Algorithm to
generate binary de Bruijn sequences is established. This requires the use of
feedback functions with a unique cycle or loop in their respective state
graphs. Moreover, we discuss modifications to the GPO Algorithm to handle more
families of feedback functions whose state graphs have multiple cycles or
loops. These culminate in a graph joining method. Several large classes of
feedback functions are subsequently used to illustrate how the GPO Algorithm
and its modification into the Graph Joining Prefer-Opposite (GJPO) Algorithm
work in practice.
