{"title":"有度界的有序树的生成、排序和取消排序","authors":"M. Amani, A. Nowzari-Dalini","doi":"10.4204/EPTCS.204.4","DOIUrl":null,"url":null,"abstract":"We study the problem of generating, ranking and unranking of unlabeled ordered trees whose nodes have maximum degree of $\\Delta$. This class of trees represents a generalization of chemical trees. A chemical tree is an unlabeled tree in which no node has degree greater than 4. By allowing up to $\\Delta$ children for each node of chemical tree instead of 4, we will have a generalization of chemical trees. Here, we introduce a new encoding over an alphabet of size 4 for representing unlabeled ordered trees with maximum degree of $\\Delta$. We use this encoding for generating these trees in A-order with constant average time and O(n) worst case time. Due to the given encoding, with a precomputation of size and time O(n^2) (assuming $\\Delta$ is constant), both ranking and unranking algorithms are also designed taking O(n) and O(nlogn) time complexities.","PeriodicalId":88470,"journal":{"name":"Dialogues in cardiovascular medicine : DCM","volume":"230 1","pages":"31-45"},"PeriodicalIF":0.0000,"publicationDate":"2016-03-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":"{\"title\":\"Generation, Ranking and Unranking of Ordered Trees with Degree Bounds\",\"authors\":\"M. Amani, A. Nowzari-Dalini\",\"doi\":\"10.4204/EPTCS.204.4\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We study the problem of generating, ranking and unranking of unlabeled ordered trees whose nodes have maximum degree of $\\\\Delta$. This class of trees represents a generalization of chemical trees. A chemical tree is an unlabeled tree in which no node has degree greater than 4. By allowing up to $\\\\Delta$ children for each node of chemical tree instead of 4, we will have a generalization of chemical trees. Here, we introduce a new encoding over an alphabet of size 4 for representing unlabeled ordered trees with maximum degree of $\\\\Delta$. We use this encoding for generating these trees in A-order with constant average time and O(n) worst case time. Due to the given encoding, with a precomputation of size and time O(n^2) (assuming $\\\\Delta$ is constant), both ranking and unranking algorithms are also designed taking O(n) and O(nlogn) time complexities.\",\"PeriodicalId\":88470,\"journal\":{\"name\":\"Dialogues in cardiovascular medicine : DCM\",\"volume\":\"230 1\",\"pages\":\"31-45\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2016-03-02\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"5\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Dialogues in cardiovascular medicine : DCM\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.4204/EPTCS.204.4\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Dialogues in cardiovascular medicine : DCM","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4204/EPTCS.204.4","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Generation, Ranking and Unranking of Ordered Trees with Degree Bounds
We study the problem of generating, ranking and unranking of unlabeled ordered trees whose nodes have maximum degree of $\Delta$. This class of trees represents a generalization of chemical trees. A chemical tree is an unlabeled tree in which no node has degree greater than 4. By allowing up to $\Delta$ children for each node of chemical tree instead of 4, we will have a generalization of chemical trees. Here, we introduce a new encoding over an alphabet of size 4 for representing unlabeled ordered trees with maximum degree of $\Delta$. We use this encoding for generating these trees in A-order with constant average time and O(n) worst case time. Due to the given encoding, with a precomputation of size and time O(n^2) (assuming $\Delta$ is constant), both ranking and unranking algorithms are also designed taking O(n) and O(nlogn) time complexities.