Introduction to recursive programming:
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Boca Raton ; London ; New York
CRC Press, Taylor & Francis Group
[2018]
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | xxxix, 410 Seiten Illustrationen 22 cm |
ISBN: | 9781138105218 9781498735285 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV044927676 | ||
003 | DE-604 | ||
005 | 20181009 | ||
007 | t | ||
008 | 180503s2018 xxua||| |||| 00||| eng d | ||
010 | |a 017016319 | ||
020 | |a 9781138105218 |c hbk. |9 978-1-138-10521-8 | ||
020 | |a 9781498735285 |c pbk. |9 978-1-4987-3528-5 | ||
035 | |a (OCoLC)1014390743 | ||
035 | |a (DE-599)BVBBV044927676 | ||
040 | |a DE-604 |b ger |e rda | ||
041 | 0 | |a eng | |
044 | |a xxu |c US | ||
049 | |a DE-703 |a DE-91G |a DE-739 | ||
050 | 0 | |a QA76.645 | |
082 | 0 | |a 005.1 |2 23 | |
084 | |a ST 230 |0 (DE-625)143617: |2 rvk | ||
084 | |a DAT 539f |2 stub | ||
100 | 1 | |a Rubio Sanchez, Manuel |4 aut | |
245 | 1 | 0 | |a Introduction to recursive programming |c Manuel Rubio-Sánchez |
264 | 1 | |a Boca Raton ; London ; New York |b CRC Press, Taylor & Francis Group |c [2018] | |
300 | |a xxxix, 410 Seiten |b Illustrationen |c 22 cm | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
650 | 4 | |a Recursive programming |v Textbooks | |
650 | 4 | |a Computer programming |v Textbooks | |
650 | 4 | |a Computer algorithms |v Textbooks | |
650 | 0 | 7 | |a Rekursiver Algorithmus |0 (DE-588)4502357-8 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Rekursiver Algorithmus |0 (DE-588)4502357-8 |D s |
689 | 0 | |5 DE-604 | |
856 | 4 | 2 | |m Digitalisierung UB Passau - ADAM Catalogue Enrichment |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=030320818&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-030320818 |
Datensatz im Suchindex
_version_ | 1804178501248483328 |
---|---|
adam_text | Contents
PREFACE xv
LIST OF FIGURES xxi
LIST OF TABLES xxxi
LIST OF LISTINGS xxxiii
Chapter 1 ■ Basic Concepts of Recursive Programming 1
1.1 RECOGNIZING RECURSION 1
1.2 PROBLEM DECOMPOSITION 7
1.3 RECURSIVE CODE 14
1.4 INDUCTION 20
1.4.1 Mathematical proofs by induction 20
1.4.2 Recursive leap of faith 22
1.4.3 Imperative vs. declarative programming 25
1.5 RECURSION VS. ITERATION 25
1.6 TYPES OF RECURSION 27
1.6.1 Linear recursion 27
1.6.2 Tail recursion 27
1.6.3 Multiple recursion 28
1.6.4 Mutual recursion 28
1.6.5 Nested recursion 29
1.7 EXERCISES 29
Chapter 2 ■ Methodology for Recursive Thinking 31
2.1 TEMPLATE FOR DESIGNING RECURSIVE ALGO-
RITHMS
31
viii n Contents
2.2 SIZE OF THE PROBLEM 32
2.3 BASE CASES 34
2.4 PROBLEM DECOMPOSITION 37
2.5 RECURSIVE CASES, INDUCTION, AND DIAGRAMS 41
2.5.1 Thinking recursively through diagrams 41
2.5.2 Concrete instances 45
2.5.3 Alternative notations 47
2.5.4 Procedures 47
2.5.5 Several subproblems 49
2.6 TESTING 52
2.7 EXERCISES 55
Chapter 3 ■ Runtime Analysis of Recursive Algorithms 57
3.1 MATHEMATICAL PRELIMINARIES 57
3.1.1 Powers and logarithms 58
3.1.2 Binomial coefficients 58
3.1.3 Limits and L’Hopital’s rule 59
3.1.4 Sums and products 60
3.1.5 Floors and ceilings 66
3.1.6 Trigonometry 66
3.1.7 Vectors and matrices 67
3.2 COMPUTATIONAL TIME COMPLEXITY 70
3.2.1 Order of growth of functions 71
3.2.2 Asymptotic notation 73
3.3 RECURRENCE RELATIONS 76
3.3.1 Expansion method 80
3.3.2 General method for solving difference equations 89
3.4 EXERCISES 101
Chapter 4 Linear Recursion I: Basic Algorithms 105
4.1 ARITHMETIC OPERATIONS
106
Contents □ ix
4.1.1 Power function 106
4.1.2 Slow addition 110
4.1.3 Double sum 113
4.2 BASE CONVERSION 115
4.2.1 Binary representation of a nonnegative integer 115
4.2.2 Decimal to base b conversion 117
4.3 STRINGS 119
4.3.1 Reversing a string 119
4.3.2 Is a string a palindrome? 120
4.4 ADDITIONAL PROBLEMS 121
4.4.1 Selection sort 121
4.4.2 Horner’s method for evaluating polynomials 124
4.4.3 A row of Pascal’s triangle 125
4.4.4 Ladder of resistors 127
4.5 EXERCISES 129
Chapter 5 ■ Linear Recursion II: Tail Recursion 133
5.1 BOOLEAN FUNCTIONS 134
5.1.1 Does a nonnegative integer contain a partic-
ular digit? 134
5.1.2 Equal strings? 136
5.2 SEARCHING ALGORITHMS FOR LISTS 139
5.2.1 Linear search 139
5.2.2 Binary search in a sorted list 142
5.3 BINARY SEARCH TREES 143
5.3.1 Searching for an item 144
5.3.2 Inserting an item 147
5.4 PARTITIONING SCHEMES 148
5.4.1 Basic partitioning scheme 149
5.4.2 Hoare’s partitioning method 150
5.5 THE QUICKSELECT ALGORITHM 155
5.6 BISECTION ALGORITHM FOR ROOT FINDING 157
x □ Contents
5.7 THE WOODCUTTER PROBLEM 158
5.8 EUCLID S ALGORITHM 164
5.9 EXERCISES 167
Chapter 6 Multiple Recursion I: Divide and Conquer 171
6.1 IS A LIST SORTED IN ASCENDING ORDER? 172
6.2 SORTING 173
6.2.1 The merge sort algorithm 174
6.2.2 The quicksort algorithm 177
6.3 MAJORITY ELEMENT IN A LIST 180
6.4 FAST INTEGER MULTIPLICATION 183
6.5 MATRIX MULTIPLICATION 186
6.5.1 Divide and conquer matrix multiplication 187
6.5.2 Strassen’s matrix multiplication algorithm 190
6.6 THE TROMINO TILING PROBLEM 191
6.7 THE SKYLINE PROBLEM 196
6.8 EXERCISES 203
Chapter 7 ■ Multiple Recursion II: Puzzles, Fractals, and
More. . . 205
7.1 SWAMP TRAVERSAL 205
7.2 TOWERS OF HANOI 209
7.3 TREE TRAVERSALS 213
7.3.1 Inorder traversal 215
7.3.2 Preorder and postorder traversals 216
7.4 LONGEST PALINDROME SUBSTRING 217
7.5 FRACTALS 220
7.5.1 Koch snowflake 220
7.5.2 Sierpinski’s carpet 224
EXERCISES 226
7.6
Contents El xi
Chapter 8 ■ Counting Problems 235
8.1 PERMUTATIONS 236
8.2 VARIATIONS WITH REPETITION 238
8.3 COMBINATIONS 240
8.4 STAIRCASE CLIMBING 242
8.5 MANHATTAN PATHS 244
8.6 CONVEX POLYGON TRIANGULATIONS 245
8.7 CIRCLE PYRAMIDS 248
8.8 EXERCISES 250
Chapter 9 ■ Mutual Recursion 253
9.1 PARITY OF A NUMBER 254
9.2 MULTIPLAYER GAMES 255
9.3 RABBIT POPULATION GROWTH 256
9.3.1 Adult and baby rabbit pairs 257
9.3.2 Rabbit family tree 258
9.4 WATER TREATMENT PLANTS PUZZLE 263
9.4.1 Water flow between cities 263
9.4.2 Water discharge at each city 265
9.5 CYCLIC TOWERS OF HANOI 268
9.6 GRAMMARS AND RECURSIVE DESCENT PARSERS 273
9.6.1 Tokenization of the input string 274
9.6.2 Recursive descent parser 279
9.7 EXERCISES 288
Chapter 10 ■ Program Execution 291
10.1 CONTROL FLOW BETWEEN SUBROUTINES 292
10.2 RECURSION TREES 297
10.2.1 Runtime analysis 303
10.3 THE PROGRAM STACK 305
xii B Contents
10.3.1 Stack frames 306
10.3.2 Stack traces 309
10.3.3 Computational space complexity 310
10.3.4 Maximum recursion depth and stack over-
flow errors 312
10.3.5 Recursion as an alternative to a stack data
structure 313
10.4 MEMOIZATION AND DYNAMIC PROGRAMMING 317
10.4.1 Memoization 317
10.4.2 Dependency graph and dynamic programming 322
10.5 EXERCISES 325
Chapter 11 ■ Tail Recursion Revisited and Nested Recursion 333
11.1 TAIL RECURSION VS. ITERATION 333
11.2 TAIL RECURSION BY THINKING ITERATIVELY 337
11.2.1 Factorial 337
11.2.2 Decimal to base b conversion 340
11.3 NESTED RECURSION 342
11.3.1 The Ackermann function 342
11.3.2 The McCarthy 91 function 342
11.3.3 The digital root 343
11.4 TAIL AND NESTED RECURSION THROUGH FUNC-
TION GENERALIZATION 344
11.4.1 Factorial 345
11.4.2 Decimal to base 6 conversion 348
11.5 EXERCISES 350
Chapter 12 Multiple Recursion III: Backtracking 353
12.1 INTRODUCTION 354
12.1.1 Partial and complete solutions 354
12.1.2 Recursive structure 356
12.2 GENERATING COMBINATORIAL ENTITIES 358
Contents M xiii
12.2.1 Subsets 359
12.2.2 Permutations 364
12.3 THE iV-QUEENS PROBLEM 368
12.3.1 Finding every solution 370
12.3.2 Finding one solution 372
12.4 SUBSET SUM PROBLEM 372
12.5 PATH THROUGH A MAZE 377
12.6 THE SUDOKU PUZZLE 384
12.7 0-1 KNAPSACK PROBLEM 388
12.7.1 Standard backtracking algorithm 389
12.7.2 Branch and bound algorithm 393
12.8 EXERCISES 397
FURTHER READING 403
Index 407
|
any_adam_object | 1 |
author | Rubio Sanchez, Manuel |
author_facet | Rubio Sanchez, Manuel |
author_role | aut |
author_sort | Rubio Sanchez, Manuel |
author_variant | s m r sm smr |
building | Verbundindex |
bvnumber | BV044927676 |
callnumber-first | Q - Science |
callnumber-label | QA76 |
callnumber-raw | QA76.645 |
callnumber-search | QA76.645 |
callnumber-sort | QA 276.645 |
callnumber-subject | QA - Mathematics |
classification_rvk | ST 230 |
classification_tum | DAT 539f |
ctrlnum | (OCoLC)1014390743 (DE-599)BVBBV044927676 |
dewey-full | 005.1 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 005 - Computer programming, programs, data, security |
dewey-raw | 005.1 |
dewey-search | 005.1 |
dewey-sort | 15.1 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01609nam a2200421 c 4500</leader><controlfield tag="001">BV044927676</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20181009 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">180503s2018 xxua||| |||| 00||| eng d</controlfield><datafield tag="010" ind1=" " ind2=" "><subfield code="a">017016319</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781138105218</subfield><subfield code="c">hbk.</subfield><subfield code="9">978-1-138-10521-8</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781498735285</subfield><subfield code="c">pbk.</subfield><subfield code="9">978-1-4987-3528-5</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)1014390743</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV044927676</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rda</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="044" ind1=" " ind2=" "><subfield code="a">xxu</subfield><subfield code="c">US</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-703</subfield><subfield code="a">DE-91G</subfield><subfield code="a">DE-739</subfield></datafield><datafield tag="050" ind1=" " ind2="0"><subfield code="a">QA76.645</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">005.1</subfield><subfield code="2">23</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 230</subfield><subfield code="0">(DE-625)143617:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">DAT 539f</subfield><subfield code="2">stub</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Rubio Sanchez, Manuel</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Introduction to recursive programming</subfield><subfield code="c">Manuel Rubio-Sánchez</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Boca Raton ; London ; New York</subfield><subfield code="b">CRC Press, Taylor & Francis Group</subfield><subfield code="c">[2018]</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">xxxix, 410 Seiten</subfield><subfield code="b">Illustrationen</subfield><subfield code="c">22 cm</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Recursive programming</subfield><subfield code="v">Textbooks</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Computer programming</subfield><subfield code="v">Textbooks</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Computer algorithms</subfield><subfield code="v">Textbooks</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Rekursiver Algorithmus</subfield><subfield code="0">(DE-588)4502357-8</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Rekursiver Algorithmus</subfield><subfield code="0">(DE-588)4502357-8</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">Digitalisierung UB Passau - ADAM Catalogue Enrichment</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=030320818&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-030320818</subfield></datafield></record></collection> |
id | DE-604.BV044927676 |
illustrated | Illustrated |
indexdate | 2024-07-10T08:04:58Z |
institution | BVB |
isbn | 9781138105218 9781498735285 |
language | English |
lccn | 017016319 |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-030320818 |
oclc_num | 1014390743 |
open_access_boolean | |
owner | DE-703 DE-91G DE-BY-TUM DE-739 |
owner_facet | DE-703 DE-91G DE-BY-TUM DE-739 |
physical | xxxix, 410 Seiten Illustrationen 22 cm |
publishDate | 2018 |
publishDateSearch | 2018 |
publishDateSort | 2018 |
publisher | CRC Press, Taylor & Francis Group |
record_format | marc |
spelling | Rubio Sanchez, Manuel aut Introduction to recursive programming Manuel Rubio-Sánchez Boca Raton ; London ; New York CRC Press, Taylor & Francis Group [2018] xxxix, 410 Seiten Illustrationen 22 cm txt rdacontent n rdamedia nc rdacarrier Recursive programming Textbooks Computer programming Textbooks Computer algorithms Textbooks Rekursiver Algorithmus (DE-588)4502357-8 gnd rswk-swf Rekursiver Algorithmus (DE-588)4502357-8 s DE-604 Digitalisierung UB Passau - ADAM Catalogue Enrichment application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=030320818&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Rubio Sanchez, Manuel Introduction to recursive programming Recursive programming Textbooks Computer programming Textbooks Computer algorithms Textbooks Rekursiver Algorithmus (DE-588)4502357-8 gnd |
subject_GND | (DE-588)4502357-8 |
title | Introduction to recursive programming |
title_auth | Introduction to recursive programming |
title_exact_search | Introduction to recursive programming |
title_full | Introduction to recursive programming Manuel Rubio-Sánchez |
title_fullStr | Introduction to recursive programming Manuel Rubio-Sánchez |
title_full_unstemmed | Introduction to recursive programming Manuel Rubio-Sánchez |
title_short | Introduction to recursive programming |
title_sort | introduction to recursive programming |
topic | Recursive programming Textbooks Computer programming Textbooks Computer algorithms Textbooks Rekursiver Algorithmus (DE-588)4502357-8 gnd |
topic_facet | Recursive programming Textbooks Computer programming Textbooks Computer algorithms Textbooks Rekursiver Algorithmus |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=030320818&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT rubiosanchezmanuel introductiontorecursiveprogramming |