O'Reilly logo

Introduction to Recursive Programming by Manuel Rubio-Sanchez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 8

Counting Problems

Music is the pleasure the human mind experiences from counting without being aware that it is counting.

—Gottfried Leibniz

RECURSION is used extensively in combinatoricsCombinatorics, which is a subfield of mathematics that studies counting, and plays an important role in advanced algorithm analysis. This chapter focuses on recursive solutions to computational counting problemsCounting problem, whose goal consists of adding up a certain number of elements, entities, choices, concepts, etc. A common strategy consists of grouping the items to be counted into several disjoint subsets, and adding the number of elements in each one. In terms of recursion, an original problem will be decomposed into several subproblems, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required