dynamic_programming.bitmask

This is a Python implementation for questions involving task assignments between people. Here Bitmasking and DP are used for solving this.

Question :- We have N tasks and M people. Each person in M can do only certain of these tasks. Also a person can do only one task and a task is performed only by one person. Find the total no of ways in which the tasks can be distributed.

Attributes

total_tasks

Classes

AssignmentUsingBitmask

Module Contents

class dynamic_programming.bitmask.AssignmentUsingBitmask(task_performed, total)
count_no_of_ways(task_performed)
count_ways_until(mask, task_no)
dp
final_mask
task
total_tasks
dynamic_programming.bitmask.total_tasks = 5