From Basics to Expert Proficiency
Copyright © 2024 by HiTeX Press
All rights reserved. No part of this publication may be reproduced,
distributed, or transmitted in any form or by any means, including
photocopying, recording, or other electronic or mechanical methods,
without the prior written permission of the publisher, except in the case
of brief quotations embodied in critical reviews and certain other
noncommercial uses permitted by copyright law.
,Contents
1 Introduction to Dynamic Programming and Python
1.1 What is Dynamic Programming?
1.2 History and Origins of Dynamic Programming
1.3 Key Concepts and Terminologies
1.4 Why Use Dynamic Programming?
1.5 Introduction to Python Programming
1.6 Setting Up Your Python Environment
1.7 Basic Python Syntax and Data Structures
1.8 First Steps: Writing Your First Python Program
1.9 Understanding the Pythonic Way of Thinking
1.10 Comparing Dynamic Programming with Other Techniques
1.11 Examples of Real-World Problems Solved by Dynamic
Programming
1.12 Overview of the Book Structure
2 Fundamentals of Recursion
2.1 Introduction to Recursion
2.2 How Recursion Works
2.3 Base Case and Recursive Case
2.4 Simple Recursive Functions
2.5 Recursive vs. Iterative Solutions
2.6 Understanding Stack Frames
2.7 Common Pitfalls in Recursion
2.8 Recursion Examples with Python
2.9 Debugging Recursive Programs
2.10 Tail Recursion
2.11 Recursion in Data Structures
2.12 Recursion in Problem Solving
3 Principles of Dynamic Programming
3.1 Introduction to the Principles of Dynamic Programming
3.2 Understanding Overlapping Subproblems
, 3.3 Exploring Optimal Substructure
3.4 Breaking Down Problems
3.5 Identifying Subproblems
3.6 Recursive Formulations
3.7 State Transition and Recurrence Relations
3.8 Defining Base Cases
3.9 Evaluating Time Complexity
3.10 Comparing Recursion and DP Formulations
3.11 Examples of Principle Applications
3.12 Common Mistakes and How to Avoid Them
4 Top-Down vs. Bottom-Up Approaches
4.1 Introduction to Top-Down and Bottom-Up Approaches
4.2 Understanding Top-Down Approach
4.3 Understanding Bottom-Up Approach
4.4 Comparing Top-Down and Bottom-Up
4.5 Pros and Cons of Each Approach
4.6 When to Use Top-Down Approach
4.7 When to Use Bottom-Up Approach
4.8 Memoization in Top-Down Approach
4.9 Tabulation in Bottom-Up Approach
4.10 Case Studies on Top-Down Approach
4.11 Case Studies on Bottom-Up Approach
4.12 Converting Between Approaches
5 Implementing DP Solutions in Python
5.1 Introduction to Implementing DP Solutions in Python
5.2 Basic DP Patterns in Python
5.3 Top-Down Approach with Memoization
5.4 Bottom-Up Approach with Tabulation
5.5 Using Arrays for DP
5.6 Using Dictionaries for DP
5.7 Handling Multiple States
5.8 DP with Multidimensional Arrays
5.9 Space Optimization Techniques
5.10 Dynamic Programming in Jupyter Notebooks