کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
436498 690009 2013 18 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
Non-redundant random generation algorithms for weighted context-free grammars
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
پیش نمایش صفحه اول مقاله
Non-redundant random generation algorithms for weighted context-free grammars
چکیده انگلیسی

We address the non-redundant random generation of k words of length n in a context-free language. Additionally, we want to avoid a predefined set of words. We study a rejection-based approach, whose worst-case time complexity is shown to grow exponentially with k for some specifications and in the limit case of a coupon collector. We propose two algorithms respectively based on the recursive method and on an unranking approach. We show how careful implementations of these algorithms allow for a non-redundant generation of k words of length n in O(k⋅n⋅logn) arithmetic operations, after a precomputation of Θ(n) numbers. The overall complexity is therefore dominated by the generation of k words, and the non-redundancy comes at a negligible cost.

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Theoretical Computer Science - Volume 502, 2 September 2013, Pages 177-194