Find Jobs
Hire Freelancers

Knapsack Variation

$10-30 USD

Cancelled
Posted almost 4 years ago

$10-30 USD

Paid on delivery
GREEDY APPROXIMATION ALGORITHM & Knapsack Algorithm generate some random data, and compare the results. Specific instructions follow: 1. Our basket will hold a weight of 1000. Using a random number generator, generate 100 possible items for the basket. The items should have random weights between 1 and 300. SUBSET-SUM Input: n, w1,…,wN, for w = 0 to W M[0, w] = 0 for i = 1 to n for w = 1 to W if (wi > w) M[i, w] = M[i-1, w] else M[i, w] = max {M[i-1, w], wi + M[i-1, w-wi ]} return M[n, W] 2. Use the dynamic programming algorithm to compute the exact optimal solution for the set of 100 items. Note that the solution is a weight, wj, where 0 < wj < 1000. 3. Use the greedy approximation algorithm to compute an approximate solution using the same set of items. 4. Run this set of steps 10 times, keeping track of the high, low and average values. Also, keep track of the running times for both algorithms. This project requires a report. The report should contain a table with your experimental results. The table should look like this, but with your own numbers (my numbers are completely made up and should not be used as a guide): Dynamic (Exact) Greedy (approx.) Approximation Factor Highest 997 927 93% Average 823 754 92% Lowest 742 650 88% Report 1. An introduction including your approach to the problem, the theoretical time complexity of each subset-sum-finding method used, programming language used and how this might affect the results, problems encountered, etc. 2. A proof that the greedy algorithm is guaranteed to fill the knapsack at least half full. 3. The table with results, as shown above. 4. A discussion of the results, how close they are to each other, and whether the greedy algorithm always fills the knapsack at least half full. 5. A discussion of the running times. Include a table if it will help. How much faster is the greedy algorithm?
Project ID: 26094870

About the project

5 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
5 freelancers are bidding on average $39 USD for this job
User Avatar
Hey! I'm Vladimir, Computer Science student at the University of Cambridge. I'm totally familiar with all the stuff you have mentioned in the project and I can assure you to do the job fast and neat. Looking forward to collaborating! Vladimir
$75 USD in 1 day
5.0 (20 reviews)
4.6
4.6
User Avatar
Hi, I am a computer science graduate and expert in algorithms. I can complete your job in days. please let me know if you are interested.
$50 USD in 7 days
5.0 (5 reviews)
2.8
2.8
User Avatar
Hi! This task lies in my area of expertise. I have a complete understanding of the task and can guarantee a final solution in 2 days. This a typical task that asks to implement well known algorithms, so it shouldn`t cause any substantial effort and reporting is also looks quite standard.
$30 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello, I read your project requirement carefully and get complete idea about it. I am computer science engineer able to do this job using my dynamic, greedy programming skills. Ping me for further discussion. Thank You.
$30 USD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Edwardsville, United States
0.0
0
Member since Apr 11, 2020

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.