Commenced in January 2007
Frequency: Monthly
Edition: International
Paper Count: 2
Search results for: Hayedeh Ahrabian
2 On the Solution of the Towers of Hanoi Problem
Authors: Hayedeh Ahrabian, Comfar Badamchi, Abbass Nowzari-Dalini
Abstract:
In this paper, two versions of an iterative loopless algorithm for the classical towers of Hanoi problem with O(1) storage complexity and O(2n) time complexity are presented. Based on this algorithm the number of different moves in each of pegs with its direction is formulated.Keywords: Loopless algorithm, Binary tree, Towers of Hanoi.
Procedia APA BibTeX Chicago EndNote Harvard JSON MLA RIS XML ISO 690 PDF Downloads 47821 Ranking and Unranking Algorithms for k-ary Trees in Gray Code Order
Authors: Fateme Ashari-Ghomi, Najme Khorasani, Abbas Nowzari-Dalini
Abstract:
In this paper, we present two new ranking and unranking algorithms for k-ary trees represented by x-sequences in Gray code order. These algorithms are based on a gray code generation algorithm developed by Ahrabian et al.. In mentioned paper, a recursive backtracking generation algorithm for x-sequences corresponding to k-ary trees in Gray code was presented. This generation algorithm is based on Vajnovszki-s algorithm for generating binary trees in Gray code ordering. Up to our knowledge no ranking and unranking algorithms were given for x-sequences in this ordering. we present ranking and unranking algorithms with O(kn2) time complexity for x-sequences in this Gray code orderingKeywords: k-ary Tree Generation, Ranking, Unranking, Gray Code.
Procedia APA BibTeX Chicago EndNote Harvard JSON MLA RIS XML ISO 690 PDF Downloads 2059