Git Product home page Git Product logo

buad5042knapsack's Introduction

BUAD5042Knapsack

Programs and Data for the Knapsack Assignment

This repository contains the files necessary for the Knapsack Algorithm Assignment for the BUAD 5042, Heuristic Algorithms, course.

The repository contents include these files:

* knapsack.sql

    - MySQL dump file to be imported into MySQL.  It contains knapsack problem data.
    
* KnapsackDev.py

    - Python program that contains a "stub" area to write a load_knapsack() function which chooses which items 
      to be included in a knapsack.
      
    - This program also applies the algorithm specified in load_knapsack() to all the test problems in the
      knapsack database through existing functions taht access the related MySQL database.
      
    - Set silent_mode = False to get Spyder Console messages
    
    - Leave the problems list unchanged as it is populated from the knapsack database.

The database contains original knapsack problems as well as problems from this web site:

http://people.sc.fsu.edu/~jburkardt/datasets/knapsack_01/knapsack_01.html (accessed 2/21/2017)

Details:

  • The assignment is to write an algorithm in the knapsack_load() function that picks items from the items dictionary that are to be placed in the knapsack

  • Besides the items dictionary, the knapsack_load() function receives the knapsack capacity as its 2nd argument.

  • The knapsack_load() function returns, as its first parameter, a team number number (int or long) or a student id (string) if the assignment is an individual assignment

  • knapsack_load() must return a second value which is a list containing the keys (ints) of the items from the items dictionary to be placed in the knapsack

  • A function will be scored only if the 2nd argument is a list where all the elements are valid items keys and none are repeated

buad5042knapsack's People

Contributors

jrb28 avatar

Watchers

Andrew Leeth 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.