Broken Profile DP (Plug DP)

Grid tiling with dominoes. Process row by row, using a bitmask for the boundary between rows.

42 lessons
138 min
Codeforces: 2100-2700LeetCode: 2300-2700

Lessons

1. Intro

Grid tiling with profiles

3m

2. The Profile Concept

Column boundary states

3m

3. Quiz: Profile Concept

Understanding the boundary

3m1 problems

4. Why Bitmasks Work

Compact state

3m

5. Bitmask Encoding - Walkthrough

How to represent states

4m

6. State Transitions

Column to column

3m

7. State Transitions - Walkthrough

How masks change

4m

8. Quiz: Profile Encoding

Knowledge check

3m1 problems

9. Counting Tilings - Problem Statement

CSES 2181

3m1 problems

10. Counting Tilings - State Definition

What DP tracks

3m

11. Counting Tilings - Filling a Column

Recursive placement

3m

12. Counting Tilings - Transition Formula

Combining paths

3m

13. Counting Tilings - Implementation

Full solution

3m1 problems

14. Counting Tilings - Walkthrough

Tracing the classic problem

4m

15. Challenge: Transition Enumeration

Generating valid transitions

4m

16. Quiz: Transition Count

Knowledge check

3m1 problems

17. Tri Tiling - Problem Statement

UVa 10918

3m1 problems

18. Tri Tiling - Small Cases

Manual enumeration

3m

19. Tri Tiling - Recurrence Discovery

Pattern from profiles

3m

20. Tri Tiling - Implementation

Recurrence solution

3m1 problems

21. Tri Tiling - Walkthrough

Non-standard grid

4m

22. When Width Is Fixed

Recurrence vs DP

3m

23. Quiz: Why Small Width

Complexity considerations

3m1 problems

24. LeetCode 790 Domino and Tromino Tiling - Problem Statement

LeetCode 790

3m1 problems

25. Domino and Tromino - Profile States

Three profile types

3m

26. Domino and Tromino - Transitions

Tile placement choices

3m

27. Domino and Tromino - Simplified Recurrence

Final formula

3m

28. Simplified Recurrence - Walkthrough

Finding the pattern

4m

29. Domino and Tromino - Implementation

DP or recurrence

3m1 problems

30. Domino and Tromino - Walkthrough

Mixed tile shapes

4m

31. Quiz: Profile Count

Knowledge check

3m1 problems

32. Chessboard Coloring - Problem Statement

Non-tiling variant

3m

33. Hamiltonian Paths - Problem Statement

Path DP variant

3m

34. Challenge: Larger Tiles

Beyond dominoes

4m

35. When to Use Broken Profile DP

Problem recognition

3m

36. Pattern - Broken Profile Recognition

When to apply this technique

4m

37. Course Conclusion

You've completed the DP course

4m

38. Complexity Analysis

Time and space

3m

39. Complexity Analysis - Walkthrough

Understanding the bounds

4m

40. Common Mistakes

Pitfalls to avoid

3m

41. Common Mistakes - Walkthrough

Debugging tips

4m

42. Section Recap

What we learned

3m

Practice Problems

1.

Covered with full walkthrough in this section.

2.

Covered with full walkthrough in this section.

3.

Covered with full walkthrough in this section.

4.
ParquetCodeforceshard

Classic domino tiling with broken profile. Foundation for all plug DP problems.

5.
Coloring BracketsCodeforceshard

Profile DP on bracket sequence. State encodes coloring of visible bracket pairs.

6.
Corn FieldsCodeforcesmedium

Bitmask DP on grid rows. Simpler broken profile before full plug DP complexity.

7.
Beautiful SequenceCodeforceshard

Bracket sequence with profile state. Counting valid configurations column by column.

8.
Queens on BoardCodeforceshard

Chess piece placement with broken profile. Tests understanding of diagonal state encoding.

9.

Introduction to tiling DP. Simpler profile before full broken profile complexity.

10.

Rectangle tiling with backtracking/DP. Tests profile state enumeration skills.

11.
Cherry PickupLeetCodehard

Two-path grid DP. Related state-space thinking to broken profile approaches.

12.
Cherry Pickup IILeetCodehard

Two robots grid DP. Column-by-column processing similar to profile DP paradigm.

Ready to start learning?

Access all 42 lessons with interactive content and progress tracking.