Simple random sampling of binary forests with fixed number of nodes and trees

IF 1 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS
Stoyan Dimitrov
{"title":"Simple random sampling of binary forests with fixed number of nodes and trees","authors":"Stoyan Dimitrov","doi":"10.1016/j.tcs.2025.115418","DOIUrl":null,"url":null,"abstract":"<div><div>We generalize the classical algorithm of Rémy for random sampling of full binary trees with a given number of leaves. As a result, we give a simple linear time algorithm for random generation of full binary forests with given number of trees and leaves. The algorithm is obtained from a bijection that we construct in order to give a direct proof of the well-known fact that these forests are enumerated by the <em>k</em>-th fold self-convolution of the Catalan numbers. Via some well-known bijections, the given algorithm can be used to sample random objects from several other classes enumerated by self-convolutions of the Catalan numbers, e.g., binary forests with a given number of trees, lists of a given number of balanced strings and others.</div></div>","PeriodicalId":49438,"journal":{"name":"Theoretical Computer Science","volume":"1051 ","pages":"Article 115418"},"PeriodicalIF":1.0000,"publicationDate":"2025-06-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Theoretical Computer Science","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0304397525003561","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0

Abstract

We generalize the classical algorithm of Rémy for random sampling of full binary trees with a given number of leaves. As a result, we give a simple linear time algorithm for random generation of full binary forests with given number of trees and leaves. The algorithm is obtained from a bijection that we construct in order to give a direct proof of the well-known fact that these forests are enumerated by the k-th fold self-convolution of the Catalan numbers. Via some well-known bijections, the given algorithm can be used to sample random objects from several other classes enumerated by self-convolutions of the Catalan numbers, e.g., binary forests with a given number of trees, lists of a given number of balanced strings and others.
具有固定数目节点和树的二叉森林的简单随机抽样
将经典的rsammy算法推广到具有给定叶数的全二叉树的随机抽样。因此,我们给出了一个简单的线性时间算法,用于随机生成具有给定数量的树和叶的完整二叉森林。该算法是由一个双射得到的,我们构造这个双射是为了给出一个众所周知的事实的直接证明,即这些森林是由加泰罗尼亚数的第k次自卷积枚举的。通过一些众所周知的双射,给定的算法可以用来从其他几个由加泰罗尼亚数的自卷积枚举的类中抽样随机对象,例如,具有给定数量的树的二叉森林,给定数量的平衡字符串的列表等等。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Theoretical Computer Science
Theoretical Computer Science 工程技术-计算机:理论方法
CiteScore
2.60
自引率
18.20%
发文量
471
审稿时长
12.6 months
期刊介绍: Theoretical Computer Science is mathematical and abstract in spirit, but it derives its motivation from practical and everyday computation. Its aim is to understand the nature of computation and, as a consequence of this understanding, provide more efficient methodologies. All papers introducing or studying mathematical, logic and formal concepts and methods are welcome, provided that their motivation is clearly drawn from the field of computing.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信