
Classic Computer Science Problems in Python
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
"Highly recommended to everyone interested in deepening their understanding of Python and practical computer science." -Daniel Kenney-Jung, MD, University of Minnesota
Key Features
• Master formal techniques taught in college computer science classes
• Connect computer science theory to real-world applications, data, and performance
• Prepare for programmer interviews
• Recognize the core ideas behind most "new" challenges
• Covers Python 3.7
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About The Book
Programming problems that seem new or unique are usually rooted in well-known engineering principles. Classic Computer Science Problems in Python guides you through time-tested scenarios, exercises, and algorithms that will prepare you for the "new" problems you'll face when you start your next project.
In this amazing book, you'll tackle dozens of coding challenges, ranging from simple tasks like binary search algorithms to clustering data using k-means. As you work through examples for web development, machine learning, and more, you'll remember important things you've forgotten and discover classic solutions that will save you hours of time.
What You Will Learn
• Search algorithms
• Common techniques for graphs
• Neural networks
• Genetic algorithms
• Adversarial search
• Uses type hints throughout
This Book Is Written For
For intermediate Python programmers.
About The Author
David Kopec is an assistant professor of Computer Science and Innovation at Champlain College in Burlington, Vermont. He is the author of Dart for Absolute Beginners (Apress, 2014), Classic Computer Science Problems in Swift (Manning, 2018), and Classic Computer Science Problems in Java (Manning, 2020)
Table of Contents
1. Small problems
2. Search problems
3. Constraint-satisfaction problems
4. Graph problems
5. Genetic algorithms
6. K-means clustering
7. Fairly simple neural networks
8. Adversarial search
9. Miscellaneous problems
More details
Other editions
Additional editions

Person
Content
- Intro
- Copyright
- Dedication
- Brief Table of Contents
- Table of Contents
- Acknowledgments
- About this book
- Trademarks
- Book forum
- About the author
- About the cover illustration
- Introduction
- Why Python?
- What is a classic computer science problem?
- What kinds of problems are in this book?
- Who is this book for?
- Python versioning, source code repository, and type hints
- No graphics, no UI code, just the standard library
- Part of a series
- Chapter 1. Small problems
- 1.1. The Fibonacci sequence
- 1.2. Trivial compression
- 1.3. Unbreakable encryption
- 1.4. Calculating pi
- 1.5. The Towers of Hanoi
- 1.6. Real-world applications
- 1.7. Exercises
- Chapter 2. Search problems
- 2.1. DNA search
- 2.2. Maze solving
- 2.3. Missionaries and cannibals
- 2.4. Real-world applications
- 2.5. Exercises
- Chapter 3. Constraint-satisfaction problems
- 3.1. Building a constraint-satisfaction problem framework
- 3.2. The Australian map-coloring problem
- 3.3. The eight queens problem
- 3.4. Word search
- 3.5. SEND+MORE=MONEY
- 3.6. Circuit board layout
- 3.7. Real-world applications
- 3.8. Exercises
- Chapter 4. Graph problems
- 4.1. A map as a graph
- 4.2. Building a graph framework
- 4.3. Finding the shortest path
- 4.4. Minimizing the cost of building the network
- 4.5. Finding shortest paths in a weighted graph
- 4.6. Real-world applications
- 4.7. Exercises
- Chapter 5. Genetic algorithms
- 5.1. Biological background
- 5.2. A generic genetic algorithm
- 5.3. A naive test
- 5.4. SEND+MORE=MONEY revisited
- 5.5. Optimizing list compression
- 5.6. Challenges for genetic algorithms
- 5.7. Real-world applications
- 5.8. Exercises
- Chapter 6. K-means clustering
- 6.1. Preliminaries
- 6.2. The k-means clustering algorithm
- 6.3. Clustering governors by age and longitude
- 6.4. Clustering Michael Jackson albums by length
- 6.5. K-means clustering problems and extensions
- 6.6. Real-world applications
- 6.7. Exercises
- Chapter 7. Fairly simple neural networks
- 7.1. Biological basis?
- 7.2. Artificial neural networks
- 7.3. Preliminaries
- 7.4. Building the network
- 7.5. Classification problems
- 7.6. Speeding up neural networks
- 7.7. Neural network problems and extensions
- 7.8. Real-world applications
- 7.9. Exercises
- Chapter 8. Adversarial search
- 8.1. Basic board game components
- 8.2. Tic-tac-toe
- 8.3. Connect Four
- 8.4. Minimax improvements beyond alpha-beta pruning
- 8.5. Real-world applications
- 8.6. Exercises
- Chapter 9. Miscellaneous problems
- 9.1. The knapsack problem
- 9.2. The Traveling Salesman Problem
- 9.3. Phone number mnemonics
- 9.4. Real-world applications
- 9.5. Exercises
- Appendix A. Glossary
- Appendix B. More resources
- B.1 Python
- B.2 Algorithms and data structures
- B.3 Artificial intelligence
- B.4 Functional programming
- B.5 Open source projects useful for machine learning
- Appendix C. A brief introduction to type hints
- C.1 What are type hints?
- C.2 What do type hints look like?
- C.3 Why are type hints useful?
- C.4 What are the downsides of type hints?
- C.5 Getting more information
- Index
- List of Figures
- List of Tables
- List of Listings
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.