Method for Developing Combinatorial Generation Algorithms Based on AND/OR Trees and Its Application