Code Monkey home page Code Monkey logo

vanilla.knapsack's Introduction

Vanilla Knapsack and Its Various Flavors

The Robber Knows You

Introduction

This project explores different approach to the familiar Maximum 0-1 Knapsack problem:

  • Maximum Value Dynamic Programming
  • Minimum Cost Dynamic Programming
  • Greedy 2-Approximation
  • Fully Polynomial-time Approximation Scheme

As a side experiment, we attempt to reduce 3SAT to Decision 0-1 Knapsack problem.

Usage

To run the experiment, use the build script. You can modify various run settings by modifying config.properties. This script also helps building the report written in R. To modify the rendering of the report, refer to configs.R. Make sure that you run the script directly, i.e. launch it from the directory it belongs to.

./build.sh

The report comes in 2 different formats: PDF, HTML (gitbook, bookdown). To view the HTML version, you can view this file or for better functionality, we recommend using the start script which serves the HTML files at a local server, i.e. localhost:2302, on your machine (with this, you can use the search function within the document).

./start.sh

The default port is 2302, which can be changed by modifying configs.R.

Structure

  • data: result of the experiments (in CSV and TXT).
  • document: the report on result of the experiments.
  • src: source codes for the project (Java and R).

vanilla.knapsack's People

Contributors

akphi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.