

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
BLOOM FILTER, GREEDY ALGORITHMS, AND DYNAMIC PROGRAMMING CONCEPTS| 2026 QUIZZES BLOOM FILTER, GREEDY ALGORITHMS, AND DYNAMIC PROGRAMMING CONCEPTS| 2026 QUIZZES
Typology: Exams
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Bloom Filter - Answer -A data structure that tests whether an element is a member of a set. Items needed for Bloom Filter - Answer -m size array and k hash functions. Insertion in Bloom Filter - Answer -Perform k hashes with the item and assign bit array indexes to 1. Insertion runtime for Bloom Filter - Answer -O(k). Search in Bloom Filter - Answer -Check if array value is 0 for each hash result. Search runtime for Bloom Filter - Answer -O(k). Probability of a False Positive - Answer -p(E) = (1 - (1-1/m)^nk)^k. Space complexity of Bloom Filter - Answer -O(m). Greedy Algorithms - Answer -Make the best decision at the moment, but does not guarantee an optimal solution. Change Making Problem - Answer -Given a coinage system, find how many coins to give for a value n. Fractional Knapsack Problem - Answer -A thief wants to maximize value while carrying at most W pounds. Interval Scheduling Problem - Answer -Determine a schedule such that there are no overlapping executions of jobs. Dynamic Programming - Answer -A technique applied to optimization problems when subproblems overlap. Steps to develop a Dynamic Programming solution - Answer -Characterize structure, define value, compute value, construct solution.
Tabulation vs. Memorization - Answer -Tabulation is bottom-up; memorization is top- down. Dynamic Programming vs. Greedy - Answer -DP is slower but solves subproblems; Greedy makes local choices. 0/1 Knapsack Problem - Answer -Can only take all or nothing; involves recursion and tabulation. Longest Common Subsequence (LCS) - Answer -Find the maximum length common subsequence of two sequences. Sequence Alignment - Answer -Align two sequences with costs for gaps and mismatches. Greedy Problems - Answer -Fractional knapsack, interval scheduling, minimum spanning tree, Huffman coding, Dijkstra's algorithm. Dynamic Programming Problems - Answer -0/1 knapsack, longest common subsequence, edit distance, matrix chain multiplication, Bellman-Ford shortest path.