Question: Suppose that a cybersecurity application requires to add up all the prime numbers with less than 1 0 0 bits in a way that is

Suppose that a cybersecurity application requires to add up all the prime numbers with less than 100 bits in a way that is close to, but does not exceed, 2100. An expert wants to use the Knapsack Dynamic Programming algorithm to accomplish this. How do you proceed?
The Knapsack algohhim does not work since the capacity C is too big
Let the values of the primes be weights and apply the Knapsack problem
It is better to use the greedy algorithm and add primes in order of value as long as they don't exceed the capacity
Instead of the Knapsack algorithm you should use the generalized knapsack
Suppose that a cybersecurity application requires

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The problem asks how to approach the task of adding up prime numbers with less than 100 bits such that the sum is close to but does not exceed 2100 us... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!