2. Overlapping Subproblems: A recursive algorithm revisits the same subproblems repeatedly rather than generating new ones.
FIT2004 - Algorithms & Data Structures (Monash)
Cards in this deck
(20 cards)Preview terms and definitions before starting your study session.
2. Overlapping Subproblems: A recursive algorithm revisits the same subproblems repeatedly rather than generating new ones.
- Top-Down (Memoization): Uses recursion and caches subproblem results in a lookup table (array/hash map) to avoid recomputation.
- Bottom-Up (Tabulation): Uses iteration to fill a lookup table starting from the smallest base cases up to the desired result, avoiding recursion stack overhead.
- Greedy Choice Property: A locally optimal choice leads to a globally optimal solution.
- Exchange Argument: A proof technique where you assume an optimal non-greedy solution exists, then systematically modify (exchange) its choices with greedy choices without decreasing solution quality, proving the greedy solution is also optimal.
- Strategy: Constructs an optimal prefix code for data compression using a greedy approach by repeatedly merging the two lowest-frequency nodes.
- Complexity: using a Min-Heap/Priority Queue, where is the alphabet size.
- Definition: A tree structure where nodes represent characters along shared prefixes of keys.
- Complexity: time for search, insertion, and prefix search, where is the length of the string, independent of the total number of keys stored in the Trie.
- Definition: stores the length of the longest proper prefix of
P[0..i]that is also a suffix ofP[0..i]. - Purpose: Dictates how far to shift the pattern on mismatch without re-evaluating characters in the text already matched.
- Precomputation: to compute the failure function .
- Matching: time.
- Total Complexity: time and extra space.
- Forward Edge: (remaining available capacity).
- Backward Edge: (capacity to push back/cancel existing flow).
Related Flashcard Sets
Explore similar study materials created by the community
MONASH MTH2010 - Multivariable Calculus & Vector Calculus
Master Monash MTH2010 with this high-yield flashcard deck, covering essential multivariable and vector calculus concepts. Dive deep into partial derivatives, multiple integrals, and fundamental theorems like Green's, Stokes', and Divergence Theorem for exam success.
SYDNEY CHEM1111 - Chemical Bonding, Thermochemistry & Chemical Equilibrium
Master core University of Sydney CHEM1111 chemistry topics including VSEPR theory, Hess's Law, Gibbs free energy, and chemical equilibrium. Ideal for high-yield first-year chemistry exam preparation.
GCP Associate Cloud Engineer - Cloud IAM, Compute Engine & Networking
Master Google Cloud IAM, Compute Engine, and Networking essentials for the Associate Cloud Engineer exam. This high-yield deck covers primitive/predefined/custom roles, VPC configurations, `gcloud` deployments, and GKE administration to ensure your exam success.
JLPT N4 - Intermediate Japanese Grammar, Particles & High-Frequency Kanji
Master essential JLPT N4 Japanese grammar, particles, and high-frequency kanji with this comprehensive flashcard deck. Bridge the gap to intermediate fluency by conquering key structures like conditionals, potential forms, and crucial compound vocabulary.