RUS  ENG
Full version
JOURNALS // Matematicheskie Zametki // Archive

Mat. Zametki, 2014 Volume 96, Issue 1, Pages 51–69 (Mi mzm10398)

This article is cited in 1 paper

Fast Enumeration of Words Generated by Dyck Grammars

Yu. S. Medvedeva

Institute of Computing Technologies, Siberian Branch of the Russian Academy of Sciences, Novosibirsk

Abstract: The problem of enumerating and denumerating words generated by Dyck grammars arises in the work of compilers for high-level programming languages and a number of other applications. The present paper proposes an algorithm for the fast enumeration and denumeration of words of Dyck languages; the complexity of this algorithm per one symbol of enumerated words is $O(\log^3 n \log \log n)$ bit operations, provided that the Schönhage–Strassen multiplication and division algorithm is used. The well-known methods applied earlier possess complexity $O(n)$ per one symbol of enumerated words. The construction of the proposed algorithm is based on the Ryabko method.

Keywords: ranking and unranking of words, fast enumeration and denumeration of words, enumerative encoding, Dyck language.

UDC: 519.163+519.72

Received: 15.08.2013
Revised: 25.12.2013

DOI: 10.4213/mzm10398


 English version:
Mathematical Notes, 2014, 96:1, 68–83

Bibliographic databases:


© Steklov Math. Inst. of RAS, 2024