{"title":"定理中基于多集的二叉树合并算法综合","authors":"I. Dramnesc, T. Jebelean","doi":"10.1109/SACI51354.2021.9465619","DOIUrl":null,"url":null,"abstract":"We present the principles and the experiments of deduction based synthesis of merging algorithms for binary trees. Merging is an auxiliary function used in certain algorithms for sorting of binary trees, however we also address concatenation of unsorted trees (the result will also be in general not sorted) as well as merging of sorted trees (both inputs as well as the output are sorted). We follow the classical approach to deductive synthesis: the algorithm is extracted from the proof of a synthesis conjecture, which asserts that the merged object exists. The novelty of our approach consists in using multisets for expressing the fact that two trees have the same content, which also allows us to develop new powerful proof techniques, mostly by using induction based on the Noetherian ordering among trees induced by the strict inclusion of the corresponding multisets. As the synthesis proofs proceed on different alternatives, several versions of the algorithms are produced. The experiments result in 24 concatenation algorithms, 4 merging algorithms, as well as some sub-auxiliary algorithms for insertion of an element into the tree and for splitting a tree into two sub-trees having the elements smaller, respectively bigger, than a certain value.","PeriodicalId":321907,"journal":{"name":"2021 IEEE 15th International Symposium on Applied Computational Intelligence and Informatics (SACI)","volume":"115 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-05-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Synthesis of Merging algorithms on binary trees using multisets in Theorema\",\"authors\":\"I. Dramnesc, T. Jebelean\",\"doi\":\"10.1109/SACI51354.2021.9465619\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We present the principles and the experiments of deduction based synthesis of merging algorithms for binary trees. Merging is an auxiliary function used in certain algorithms for sorting of binary trees, however we also address concatenation of unsorted trees (the result will also be in general not sorted) as well as merging of sorted trees (both inputs as well as the output are sorted). We follow the classical approach to deductive synthesis: the algorithm is extracted from the proof of a synthesis conjecture, which asserts that the merged object exists. The novelty of our approach consists in using multisets for expressing the fact that two trees have the same content, which also allows us to develop new powerful proof techniques, mostly by using induction based on the Noetherian ordering among trees induced by the strict inclusion of the corresponding multisets. As the synthesis proofs proceed on different alternatives, several versions of the algorithms are produced. The experiments result in 24 concatenation algorithms, 4 merging algorithms, as well as some sub-auxiliary algorithms for insertion of an element into the tree and for splitting a tree into two sub-trees having the elements smaller, respectively bigger, than a certain value.\",\"PeriodicalId\":321907,\"journal\":{\"name\":\"2021 IEEE 15th International Symposium on Applied Computational Intelligence and Informatics (SACI)\",\"volume\":\"115 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2021-05-19\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2021 IEEE 15th International Symposium on Applied Computational Intelligence and Informatics (SACI)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/SACI51354.2021.9465619\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 IEEE 15th International Symposium on Applied Computational Intelligence and Informatics (SACI)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SACI51354.2021.9465619","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Synthesis of Merging algorithms on binary trees using multisets in Theorema
We present the principles and the experiments of deduction based synthesis of merging algorithms for binary trees. Merging is an auxiliary function used in certain algorithms for sorting of binary trees, however we also address concatenation of unsorted trees (the result will also be in general not sorted) as well as merging of sorted trees (both inputs as well as the output are sorted). We follow the classical approach to deductive synthesis: the algorithm is extracted from the proof of a synthesis conjecture, which asserts that the merged object exists. The novelty of our approach consists in using multisets for expressing the fact that two trees have the same content, which also allows us to develop new powerful proof techniques, mostly by using induction based on the Noetherian ordering among trees induced by the strict inclusion of the corresponding multisets. As the synthesis proofs proceed on different alternatives, several versions of the algorithms are produced. The experiments result in 24 concatenation algorithms, 4 merging algorithms, as well as some sub-auxiliary algorithms for insertion of an element into the tree and for splitting a tree into two sub-trees having the elements smaller, respectively bigger, than a certain value.