Giter Club home page Giter Club logo

job-assignment-problem's Introduction

Job-Assignment-Problem

Solved the Job Assignment Problem using both brute force as well as branch and bound. The code contains 5 functions:

job_assignment(cost_matrix): Find an optimal solution to the job assignment problem using branch and bound. Input: an nxn matrix where a row represents a person and a column represents the cost each person takes to complete the jobs. Return: the minimal cost, an optimal solution, and the number of partial or full solutions evaluated.

get_csf(cost_matrix, partial_solution): Input: an nxn cost matrix and a partial solution. Return: the partial solution's Cost So Far (CSF). A partial solution is represented as a list of n elements, where an undecided element is denoted by a -1. For instance, a partial solution [2, -1, -1] represents assigning job 2 to person 0 and leaving the assignments of person 1 and person 2 undecided.

get_gfc(cost_matrix, partial_solution): Input: an nxn cost matrix and a partial solution. Return: the partial solution's Guaranteed Future Cost (GFC).

get_ffc(cost_matrix, partial_solution): Input: an nxn cost matrix and a partial solution. Return: the partial solution's Feasible Futre Cost (FFC)

brute_force(cost_matrix): This function finds an optimal solution for the job assignment problem using brute force. Input: an nxn cost matrix. Return: the minimal total cost, an optimal solution, and the number of full solutions investigated.

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.