用尾递归改进常用教材递归算法

Sami Ullah
{"title":"用尾递归改进常用教材递归算法","authors":"Sami Ullah","doi":"10.1109/ICRAI57502.2023.10089594","DOIUrl":null,"url":null,"abstract":"Iteration and recursion are two of the important programming techniques used to develop algorithms and software. Recursive programs are generally not considered as advantageous as iterative functions in the introductory curriculum of computer science. This is because the course books focuses primarily on branched top to bottom versions of recursion which is an inefficient way to create algorithms while iterations have low memory overhead. Recursive algorithms calculate values for the same perimeters repeatedly resulting in wastage of processor time and memory. However, different variants of recursions exist such as linear, tail and branched which are hardly mentioned in conventional studies and are more efficient than branched recursive. Like dynamic programming, tail recursion can provide remedy for such redundant processing. This paper will focus on alternative recursive solutions for some of the most popular known mathematical problems such as factorial, Fibonacci and binomial coefficient with same efficiency as iterative code that is widely discussed in the course books.","PeriodicalId":447565,"journal":{"name":"2023 International Conference on Robotics and Automation in Industry (ICRAI)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-03-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Improving Popular Textbook Recursive Algorithms with Tail Recursion\",\"authors\":\"Sami Ullah\",\"doi\":\"10.1109/ICRAI57502.2023.10089594\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Iteration and recursion are two of the important programming techniques used to develop algorithms and software. Recursive programs are generally not considered as advantageous as iterative functions in the introductory curriculum of computer science. This is because the course books focuses primarily on branched top to bottom versions of recursion which is an inefficient way to create algorithms while iterations have low memory overhead. Recursive algorithms calculate values for the same perimeters repeatedly resulting in wastage of processor time and memory. However, different variants of recursions exist such as linear, tail and branched which are hardly mentioned in conventional studies and are more efficient than branched recursive. Like dynamic programming, tail recursion can provide remedy for such redundant processing. This paper will focus on alternative recursive solutions for some of the most popular known mathematical problems such as factorial, Fibonacci and binomial coefficient with same efficiency as iterative code that is widely discussed in the course books.\",\"PeriodicalId\":447565,\"journal\":{\"name\":\"2023 International Conference on Robotics and Automation in Industry (ICRAI)\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-03-03\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2023 International Conference on Robotics and Automation in Industry (ICRAI)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICRAI57502.2023.10089594\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2023 International Conference on Robotics and Automation in Industry (ICRAI)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICRAI57502.2023.10089594","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

迭代和递归是用于开发算法和软件的两种重要编程技术。在计算机科学的入门课程中,通常认为递归程序不如迭代函数有优势。这是因为教科书主要关注从上到下的分支递归版本,这是一种低效的创建算法的方式,而迭代具有较低的内存开销。递归算法反复计算相同周长的值,导致处理器时间和内存的浪费。然而,递归也有不同的变体,如线性递归、尾部递归和分支递归,它们在传统的研究中很少被提及,而且比分支递归更有效。与动态规划一样,尾递归可以弥补这种冗余处理。本文将重点讨论一些最流行的已知数学问题的替代递归解决方案,如阶乘,斐波那契和二项式系数,其效率与教材中广泛讨论的迭代代码相同。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Improving Popular Textbook Recursive Algorithms with Tail Recursion
Iteration and recursion are two of the important programming techniques used to develop algorithms and software. Recursive programs are generally not considered as advantageous as iterative functions in the introductory curriculum of computer science. This is because the course books focuses primarily on branched top to bottom versions of recursion which is an inefficient way to create algorithms while iterations have low memory overhead. Recursive algorithms calculate values for the same perimeters repeatedly resulting in wastage of processor time and memory. However, different variants of recursions exist such as linear, tail and branched which are hardly mentioned in conventional studies and are more efficient than branched recursive. Like dynamic programming, tail recursion can provide remedy for such redundant processing. This paper will focus on alternative recursive solutions for some of the most popular known mathematical problems such as factorial, Fibonacci and binomial coefficient with same efficiency as iterative code that is widely discussed in the course books.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
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学术官方微信