© 2001 by British Computer Society
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
On O(1) Time Algorithms for Combinatorial Generation
1 Department of Information Science, Kyushu Sangyo University, 2-3-1 Matsukadai, Higashi-ku, Fukuoka 813-8503, Japan. Email: limin@ip.kyusan-u.ac.jp 2 Institute of Systems and Information Technologies/Kyushu, 2-1-22 Momochihama, Sawara-ku, Fukuoka 814-0001, Japan 3 Corresponding author.
Takaoka has recently proposed two loopless algorithms for generating well formed parenthesis strings with length $2n$ and combinations $\mathcal{C}(r,n)$ of $n$ elements out of $r$ elements, respectively. O(1) time algorithms for generating $\mathcal{C}(r,n)$ in canonical representation that were found in the literature cannot list combinations with the Strong Minimal Change Property (SMCP), Eades and McKay's algorithm can generate $\mathcal{C}(r,n)$ in canonical representation with SMCP, but needs O$(n)$ worst-case time per combination. In this paper, we mainly discuss some orders with SMCP for $\mathcal{C}(r,n)$ in canonical representation, and give a loopless algorithm to generate $\mathcal{C}(r,n)$ in canonical representation with SMCP. We also give a loopless algorithm to list well formed parenthesis strings with length $2n$. Our two algorithms are more efficient in both space and time than Takaoka's two algorithms, respectively. In addition, our algorithms can be modified easily to generate objects in some different orders.
Received 24 April, 2000. Revised 6 March, 2001.