Chapter 4: Combinatorics Using SciPy

This chapter is about counting (or combinatorics), which seems simple, but rapidly gains complexity when counting the number of ways to combine, order, or select various finite sets. This includes the study of permutations and combinations, which can be applied to determining the memory required to store various types of data.

We will apply these ideas to measure the efficacy of brute-force algorithms applied to cryptography and the traveling salesman problem.

In this chapter, we will cover the following topics:

  • The fundamental counting rule
  • Counting permutations and combinations of objects
  • Applications to memory allocation
  • Efficacy of brute-force algorithms

By the end of the chapter, you will be able ...

Get Practical Discrete Mathematics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.