Introduction to Recursive Programming 1st Edition Manuel Rubio-Sanchez - The latest ebook version is now available for instant access
Introduction to Recursive Programming 1st Edition Manuel Rubio-Sanchez - The latest ebook version is now available for instant access
com
https://textbookfull.com/product/introduction-to-recursive-
programming-1st-edition-manuel-rubio-sanchez/
OR CLICK HERE
DOWLOAD EBOOK
https://textbookfull.com/product/introduction-to-recursive-
programming-1st-edition-manuel-rubio-sanchez-2/
textbookfull.com
https://textbookfull.com/product/processing-an-introduction-to-
programming-1st-edition-nyhoff/
textbookfull.com
https://textbookfull.com/product/introduction-to-logic-
programming-1st-edition-michael-genesereth/
textbookfull.com
https://textbookfull.com/product/introduction-to-programming-
with-c-1st-edition-nhce/
textbookfull.com
Pointers in C Programming A Modern Approach to Memory
Management Recursive Data Structures Strings and Arrays
Thomas Mailund
https://textbookfull.com/product/pointers-in-c-programming-a-modern-
approach-to-memory-management-recursive-data-structures-strings-and-
arrays-thomas-mailund/
textbookfull.com
https://textbookfull.com/product/introduction-to-programming-with-
fortran-chivers/
textbookfull.com
https://textbookfull.com/product/introduction-to-programming-with-
fortran-ian-chivers/
textbookfull.com
https://textbookfull.com/product/python-for-kids-a-playful-
introduction-to-programming-1st-edition-briggs/
textbookfull.com
https://textbookfull.com/product/introduction-to-linear-programming-
with-matlab-1st-edition-shashi-kant-mishra/
textbookfull.com
Introduction to
Recursive
Programming
Introduction to
Recursive
Programming
Manuel Rubio-Sánchez
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
This book contains information obtained from authentic and highly regarded sources. Reasonable
efforts have been made to publish reliable data and information, but the author and publisher cannot
assume responsibility for the validity of all materials or the consequences of their use. The authors and
publishers have attempted to trace the copyright holders of all material reproduced in this publication
and apologize to copyright holders if permission to publish in this form has not been obtained. If any
copyright material has not been acknowledged please write and let us know so we may rectify in any
future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information
storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access
www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc.
(CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization
that provides licenses and registration for a variety of users. For organizations that have been granted
a photocopy license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and
are used only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
To the future generations
Contents
PREFACE xv
LIST OF FIGURES xxi
LIST OF TABLES xxxi
LIST OF LISTINGS xxxiii
vii
viii Contents
Index 407
Preface
xv
xvi Preface
INTENDED AUDIENCE
The main goal of the book is to teach students how to think and program
recursively, by analyzing a wide variety of computational problems. It is
intended mainly for undergraduate students in computer science or re-
lated technical disciplines that cover programming and algorithms (e.g.,
bioinformatics, engineering, mathematics, physics, etc.). The book could
also be useful for amateur programmers, students of massive open online
courses, or more experienced professionals who would like to refresh the
material, or learn it in a different or clearer way.
Students should have some basic programming experience in order
to understand the code in the book. The reader should be familiar with
notions introduced in a first programming course such as expressions,
variables, conditional and loop constructs, methods, parameters, or el-
ementary data structures such as arrays or lists. These concepts are
not explained in the book. Also, the code in the book is in accordance
with the procedural programming paradigm, and does not use object
oriented programming features. Regarding Python, a basic background
can be helpful, but is not strictly necessary. Lastly, the student should
be competent in high school mathematics.
Computer science professors can also benefit from the book, not just
as a handbook with a large collection and variety of problems, but also
by adopting the methodology and diagrams described to build recursive
solutions. Furthermore, professors may employ its structure to organize
their classes. The book could be used as a required textbook in introduc-
tory (CS1/2) programming courses, and in more advanced classes on the
design and analysis of algorithms (for example, it covers topics such as
xviii Preface
The advantages of recursion over iteration are mainly due to the use
of “multiple recursion,” where methods invoke themselves several times,
and the algorithms are based on combining several solutions to smaller
instances of the same problem. Chapter 6 introduces multiple recursion
through methods based on the eminent “divide and conquer” algorithm
design paradigm. While some examples can be used in an introductory
programming course, the chapter is especially appropriate in a more ad-
vanced class on algorithms. Alternatively, Chapter 7 contains challenging
problems, related to puzzles and fractal images, which can also be solved
through multiple recursion, but are not considered to follow the divide
and conquer approach.
Recursion is used extensively in combinatorics, which is a branch
of mathematics related to counting that has applications in advanced
analysis of algorithms. Chapter 8 proposes using recursion for solving
combinatorial counting problems, which are usually not covered in pro-
gramming texts. This unique chapter will force the reader to apply the
acquired recursive thinking skills to a different family of problems. Lastly,
although some examples are challenging, many of the solutions will have
appeared in earlier chapters. Thus, some examples can be used in an
introductory programming course.
Chapter 9 introduces “mutual recursion,” where several methods in-
voke themselves indirectly. The solutions are more sophisticated since it
is necessary to think about several problems simultaneously. Neverthe-
less, this type of recursion involves applying the same essential concepts
covered in earlier chapters.
Chapter 10 covers how recursive programs work from a low-level
point of view. It includes aspects such as tracing and debugging, the
program stack, or recursion trees. In addition, it contains a brief intro-
duction to memoization and dynamic programming, which is another
important algorithm design paradigm.
Tail-recursive algorithms can not only be transformed to iterative
versions; some are also designed by thinking iteratively. Chapter 11 ex-
amines the connection between iteration and tail recursion in detail. In
addition, it provides a brief introduction to “nested recursion,” and in-
cludes a strategy for designing simple tail-recursive functions that are
usually defined by thinking iteratively, but through a purely declarative
approach. These last two topics are curiosities regarding recursion, and
should be skipped in introductory courses.
The last chapter presents backtracking, which is another major al-
gorithm design technique that is used for searching for solutions to com-
xx Preface
ACKNOWLEDGEMENTS
The content of this book has been used to teach computer programming
courses at Universidad Rey Juan Carlos, in Madrid (Spain). I am grate-
ful to the students for their feedback and suggestions. I would also like
to thank Ángel Velázquez and the members of the LITE (Laboratory
of Information Technologies in Education) research group for providing
useful insights regarding the content of the book. I would also like to
express my gratitude to Luís Fernández, computer science professor at
Universidad Politécnica de Madrid, for his advice and experience related
to teaching recursion. A special thanks to Gert Lanckriet and members
of the Computer Audition Laboratory at University of California, San
Diego.
Manuel Rubio-Sánchez
July, 2017
List of Figures
xxi
xxii List of Figures
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com