MBA Notes

How to Solve the Assignment Problem: A Complete Guide

Table of Contents

Assignment problem is a special type of linear programming problem that deals with assigning a number of resources to an equal number of tasks in the most efficient way. The goal is to minimize the total cost of assignments while ensuring that each task is assigned to only one resource and each resource is assigned to only one task. In this blog, we will discuss the solution of the assignment problem using the Hungarian method, which is a popular algorithm for solving the problem.

Understanding the Assignment Problem

Before we dive into the solution, it is important to understand the problem itself. In the assignment problem, we have a matrix of costs, where each row represents a resource and each column represents a task. The objective is to assign each resource to a task in such a way that the total cost of assignments is minimized. However, there are certain constraints that need to be satisfied – each resource can be assigned to only one task and each task can be assigned to only one resource.

Solving the Assignment Problem

There are various methods for solving the assignment problem, including the Hungarian method, the brute force method, and the auction algorithm. Here, we will focus on the steps involved in solving the assignment problem using the Hungarian method, which is the most commonly used and efficient method.

Step 1: Set up the cost matrix

The first step in solving the assignment problem is to set up the cost matrix, which represents the cost of assigning a task to an agent. The matrix should be square and have the same number of rows and columns as the number of tasks and agents, respectively.

Step 2: Subtract the smallest element from each row and column

To simplify the calculations, we need to reduce the size of the cost matrix by subtracting the smallest element from each row and column. This step is called matrix reduction.

Step 3: Cover all zeros with the minimum number of lines

The next step is to cover all zeros in the matrix with the minimum number of horizontal and vertical lines. This step is called matrix covering.

Step 4: Test for optimality and adjust the matrix

To test for optimality, we need to calculate the minimum number of lines required to cover all zeros in the matrix. If the number of lines equals the number of rows or columns, the solution is optimal. If not, we need to adjust the matrix and repeat steps 3 and 4 until we get an optimal solution.

Step 5: Assign the tasks to the agents

The final step is to assign the tasks to the agents based on the optimal solution obtained in step 4. This will give us the most cost-effective or profit-maximizing assignment.

Solution of the Assignment Problem using the Hungarian Method

The Hungarian method is an algorithm that uses a step-by-step approach to find the optimal assignment. The algorithm consists of the following steps:

  • Subtract the smallest entry in each row from all the entries of the row.
  • Subtract the smallest entry in each column from all the entries of the column.
  • Draw the minimum number of lines to cover all zeros in the matrix. If the number of lines drawn is equal to the number of rows, we have an optimal solution. If not, go to step 4.
  • Determine the smallest entry not covered by any line. Subtract it from all uncovered entries and add it to all entries covered by two lines. Go to step 3.

The above steps are repeated until an optimal solution is obtained. The optimal solution will have all zeros covered by the minimum number of lines. The assignments can be made by selecting the rows and columns with a single zero in the final matrix.

Applications of the Assignment Problem

The assignment problem has various applications in different fields, including computer science, economics, logistics, and management. In this section, we will provide some examples of how the assignment problem is used in real-life situations.

Applications in Computer Science

The assignment problem can be used in computer science to allocate resources to different tasks, such as allocating memory to processes or assigning threads to processors.

Applications in Economics

The assignment problem can be used in economics to allocate resources to different agents, such as allocating workers to jobs or assigning projects to contractors.

Applications in Logistics

The assignment problem can be used in logistics to allocate resources to different activities, such as allocating vehicles to routes or assigning warehouses to customers.

Applications in Management

The assignment problem can be used in management to allocate resources to different projects, such as allocating employees to tasks or assigning budgets to departments.

Let’s consider the following scenario: a manager needs to assign three employees to three different tasks. Each employee has different skills, and each task requires specific skills. The manager wants to minimize the total time it takes to complete all the tasks. The skills and the time required for each task are given in the table below:

Task 1 Task 2 Task 3
Emp 1 5 7 6
Emp 2 6 4 5
Emp 3 8 5 3

The assignment problem is to determine which employee should be assigned to which task to minimize the total time required. To solve this problem, we can use the Hungarian method, which we discussed in the previous blog.

Using the Hungarian method, we first subtract the smallest entry in each row from all the entries of the row:

Task 1 Task 2 Task 3
Emp 1 0 2 1
Emp 2 2 0 1
Emp 3 5 2 0

Next, we subtract the smallest entry in each column from all the entries of the column:

Task 1 Task 2 Task 3
Emp 1 0 2 1
Emp 2 2 0 1
Emp 3 5 2 0
0 0 0

We draw the minimum number of lines to cover all the zeros in the matrix, which in this case is three:

Since the number of lines is equal to the number of rows, we have an optimal solution. The assignments can be made by selecting the rows and columns with a single zero in the final matrix. In this case, the optimal assignments are:

  • Emp 1 to Task 3
  • Emp 2 to Task 2
  • Emp 3 to Task 1

This assignment results in a total time of 9 units.

I hope this example helps you better understand the assignment problem and how to solve it using the Hungarian method.

Solving the assignment problem may seem daunting, but with the right approach, it can be a straightforward process. By following the steps outlined in this guide, you can confidently tackle any assignment problem that comes your way.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you! 😔

Let us improve this post!

Tell us how we can improve this post?

Operations Research

1 Operations Research-An Overview

  • History of O.R.
  • Approach, Techniques and Tools
  • Phases and Processes of O.R. Study
  • Typical Applications of O.R
  • Limitations of Operations Research
  • Models in Operations Research
  • O.R. in real world

2 Linear Programming: Formulation and Graphical Method

  • General formulation of Linear Programming Problem
  • Optimisation Models
  • Basics of Graphic Method
  • Important steps to draw graph
  • Multiple, Unbounded Solution and Infeasible Problems
  • Solving Linear Programming Graphically Using Computer
  • Application of Linear Programming in Business and Industry

3 Linear Programming-Simplex Method

  • Principle of Simplex Method
  • Computational aspect of Simplex Method
  • Simplex Method with several Decision Variables
  • Two Phase and M-method
  • Multiple Solution, Unbounded Solution and Infeasible Problem
  • Sensitivity Analysis
  • Dual Linear Programming Problem

4 Transportation Problem

  • Basic Feasible Solution of a Transportation Problem
  • Modified Distribution Method
  • Stepping Stone Method
  • Unbalanced Transportation Problem
  • Degenerate Transportation Problem
  • Transhipment Problem
  • Maximisation in a Transportation Problem

5 Assignment Problem

  • Solution of the Assignment Problem
  • Unbalanced Assignment Problem
  • Problem with some Infeasible Assignments
  • Maximisation in an Assignment Problem
  • Crew Assignment Problem

6 Application of Excel Solver to Solve LPP

  • Building Excel model for solving LP: An Illustrative Example

7 Goal Programming

  • Concepts of goal programming
  • Goal programming model formulation
  • Graphical method of goal programming
  • The simplex method of goal programming
  • Using Excel Solver to Solve Goal Programming Models
  • Application areas of goal programming

8 Integer Programming

  • Some Integer Programming Formulation Techniques
  • Binary Representation of General Integer Variables
  • Unimodularity
  • Cutting Plane Method
  • Branch and Bound Method
  • Solver Solution

9 Dynamic Programming

  • Dynamic Programming Methodology: An Example
  • Definitions and Notations
  • Dynamic Programming Applications

10 Non-Linear Programming

  • Solution of a Non-linear Programming Problem
  • Convex and Concave Functions
  • Kuhn-Tucker Conditions for Constrained Optimisation
  • Quadratic Programming
  • Separable Programming
  • NLP Models with Solver

11 Introduction to game theory and its Applications

  • Important terms in Game Theory
  • Saddle points
  • Mixed strategies: Games without saddle points
  • 2 x n games
  • Exploiting an opponent’s mistakes

12 Monte Carlo Simulation

  • Reasons for using simulation
  • Monte Carlo simulation
  • Limitations of simulation
  • Steps in the simulation process
  • Some practical applications of simulation
  • Two typical examples of hand-computed simulation
  • Computer simulation

13 Queueing Models

  • Characteristics of a queueing model
  • Notations and Symbols
  • Statistical methods in queueing
  • The M/M/I System
  • The M/M/C System
  • The M/Ek/I System
  • Decision problems in queueing

Hungarian Method

Class Registration Banner

The Hungarian method is a computational optimization technique that addresses the assignment problem in polynomial time and foreshadows following primal-dual alternatives. In 1955, Harold Kuhn used the term “Hungarian method” to honour two Hungarian mathematicians, Dénes Kőnig and Jenő Egerváry. Let’s go through the steps of the Hungarian method with the help of a solved example.

Hungarian Method to Solve Assignment Problems

The Hungarian method is a simple way to solve assignment problems. Let us first discuss the assignment problems before moving on to learning the Hungarian method.

What is an Assignment Problem?

A transportation problem is a type of assignment problem. The goal is to allocate an equal amount of resources to the same number of activities. As a result, the overall cost of allocation is minimised or the total profit is maximised.

Because available resources such as workers, machines, and other resources have varying degrees of efficiency for executing different activities, and hence the cost, profit, or loss of conducting such activities varies.

Assume we have ‘n’ jobs to do on ‘m’ machines (i.e., one job to one machine). Our goal is to assign jobs to machines for the least amount of money possible (or maximum profit). Based on the notion that each machine can accomplish each task, but at variable levels of efficiency.

Hungarian Method Steps

Check to see if the number of rows and columns are equal; if they are, the assignment problem is considered to be balanced. Then go to step 1. If it is not balanced, it should be balanced before the algorithm is applied.

Step 1 – In the given cost matrix, subtract the least cost element of each row from all the entries in that row. Make sure that each row has at least one zero.

Step 2 – In the resultant cost matrix produced in step 1, subtract the least cost element in each column from all the components in that column, ensuring that each column contains at least one zero.

Step 3 – Assign zeros

  • Analyse the rows one by one until you find a row with precisely one unmarked zero. Encircle this lonely unmarked zero and assign it a task. All other zeros in the column of this circular zero should be crossed out because they will not be used in any future assignments. Continue in this manner until you’ve gone through all of the rows.
  • Examine the columns one by one until you find one with precisely one unmarked zero. Encircle this single unmarked zero and cross any other zero in its row to make an assignment to it. Continue until you’ve gone through all of the columns.

Step 4 – Perform the Optimal Test

  • The present assignment is optimal if each row and column has exactly one encircled zero.
  • The present assignment is not optimal if at least one row or column is missing an assignment (i.e., if at least one row or column is missing one encircled zero). Continue to step 5. Subtract the least cost element from all the entries in each column of the final cost matrix created in step 1 and ensure that each column has at least one zero.

Step 5 – Draw the least number of straight lines to cover all of the zeros as follows:

(a) Highlight the rows that aren’t assigned.

(b) Label the columns with zeros in marked rows (if they haven’t already been marked).

(c) Highlight the rows that have assignments in indicated columns (if they haven’t previously been marked).

(d) Continue with (b) and (c) until no further marking is needed.

(f) Simply draw the lines through all rows and columns that are not marked. If the number of these lines equals the order of the matrix, then the solution is optimal; otherwise, it is not.

Step 6 – Find the lowest cost factor that is not covered by the straight lines. Subtract this least-cost component from all the uncovered elements and add it to all the elements that are at the intersection of these straight lines, but leave the rest of the elements alone.

Step 7 – Continue with steps 1 – 6 until you’ve found the highest suitable assignment.

Hungarian Method Example

Use the Hungarian method to solve the given assignment problem stated in the table. The entries in the matrix represent each man’s processing time in hours.

\(\begin{array}{l}\begin{bmatrix} & I & II & III & IV & V \\1 & 20 & 15 & 18 & 20 & 25 \\2 & 18 & 20 & 12 & 14 & 15 \\3 & 21 & 23 & 25 & 27 & 25 \\4 & 17 & 18 & 21 & 23 & 20 \\5 & 18 & 18 & 16 & 19 & 20 \\\end{bmatrix}\end{array} \)

With 5 jobs and 5 men, the stated problem is balanced.

\(\begin{array}{l}A = \begin{bmatrix}20 & 15 & 18 & 20 & 25 \\18 & 20 & 12 & 14 & 15 \\21 & 23 & 25 & 27 & 25 \\17 & 18 & 21 & 23 & 20 \\18 & 18 & 16 & 19 & 20 \\\end{bmatrix}\end{array} \)

Subtract the lowest cost element in each row from all of the elements in the given cost matrix’s row. Make sure that each row has at least one zero.

\(\begin{array}{l}A = \begin{bmatrix}5 & 0 & 3 & 5 & 10 \\6 & 8 & 0 & 2 & 3 \\0 & 2 & 4 & 6 & 4 \\0 & 1 & 4 & 6 & 3 \\2 & 2 & 0 & 3 & 4 \\\end{bmatrix}\end{array} \)

Subtract the least cost element in each Column from all of the components in the given cost matrix’s Column. Check to see if each column has at least one zero.

\(\begin{array}{l}A = \begin{bmatrix}5 & 0 & 3 & 3 & 7 \\6 & 8 & 0 & 0 & 0 \\0 & 2 & 4 & 4 & 1 \\0 & 1 & 4 & 4 & 0 \\2 & 2 & 0 & 1 & 1 \\\end{bmatrix}\end{array} \)

When the zeros are assigned, we get the following:

Hungarian Method

The present assignment is optimal because each row and column contain precisely one encircled zero.

Where 1 to II, 2 to IV, 3 to I, 4 to V, and 5 to III are the best assignments.

Hence, z = 15 + 14 + 21 + 20 + 16 = 86 hours is the optimal time.

Practice Question on Hungarian Method

Use the Hungarian method to solve the following assignment problem shown in table. The matrix entries represent the time it takes for each job to be processed by each machine in hours.

\(\begin{array}{l}\begin{bmatrix}J/M & I & II & III & IV & V \\1 & 9 & 22 & 58 & 11 & 19 \\2 & 43 & 78 & 72 & 50 & 63 \\3 & 41 & 28 & 91 & 37 & 45 \\4 & 74 & 42 & 27 & 49 & 39 \\5 & 36 & 11 & 57 & 22 & 25 \\\end{bmatrix}\end{array} \)

Stay tuned to BYJU’S – The Learning App and download the app to explore all Maths-related topics.

Frequently Asked Questions on Hungarian Method

What is hungarian method.

The Hungarian method is defined as a combinatorial optimization technique that solves the assignment problems in polynomial time and foreshadowed subsequent primal–dual approaches.

What are the steps involved in Hungarian method?

The following is a quick overview of the Hungarian method: Step 1: Subtract the row minima. Step 2: Subtract the column minimums. Step 3: Use a limited number of lines to cover all zeros. Step 4: Add some more zeros to the equation.

What is the purpose of the Hungarian method?

When workers are assigned to certain activities based on cost, the Hungarian method is beneficial for identifying minimum costs.

MATHS Related Links

Leave a Comment Cancel reply

Your Mobile number and Email id will not be published. Required fields are marked *

Request OTP on Voice Call

Post My Comment

solving an assignment problem

Register with BYJU'S & Download Free PDFs

Register with byju's & watch live videos.

Google OR-Tools

  • Google OR-Tools
  • Español – América Latina
  • Português – Brasil
  • Tiếng Việt

One of the most well-known combinatorial optimization problems is the assignment problem . Here's an example: suppose a group of workers needs to perform a set of tasks, and for each worker and task, there is a cost for assigning the worker to the task. The problem is to assign each worker to at most one task, with no two workers performing the same task, while minimizing the total cost.

You can visualize this problem by the graph below, in which there are four workers and four tasks. The edges represent all possible ways to assign workers to tasks. The labels on the edges are the costs of assigning workers to tasks.

An assignment corresponds to a subset of the edges, in which each worker has at most one edge leading out, and no two workers have edges leading to the same task. One possible assignment is shown below.

The total cost of the assignment is 70 + 55 + 95 + 45 = 265 .

The next section shows how solve an assignment problem, using both the MIP solver and the CP-SAT solver.

Other tools for solving assignment problems

OR-Tools also provides a couple of other tools for solving assignment problems, which can be faster than the MIP or CP solvers:

  • Linear sum assignment solver
  • Minimum cost flow solver

However, these tools can only solve simple types of assignment problems. So for general solvers that can handle a wide variety of problems (and are fast enough for most applications), we recommend the MIP and CP-SAT solvers.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-01-02 UTC.

  • MapReduce Algorithm
  • Linear Programming using Pyomo
  • Networking and Professional Development for Machine Learning Careers in the USA
  • Predicting Employee Churn in Python
  • Airflow Operators

Machine Learning Geek

Solving Assignment Problem using Linear Programming in Python

Learn how to use Python PuLP to solve Assignment problems using Linear Programming.

In earlier articles, we have seen various applications of Linear programming such as transportation, transshipment problem, Cargo Loading problem, and shift-scheduling problem. Now In this tutorial, we will focus on another model that comes under the class of linear programming model known as the Assignment problem. Its objective function is similar to transportation problems. Here we minimize the objective function time or cost of manufacturing the products by allocating one job to one machine.

If we want to solve the maximization problem assignment problem then we subtract all the elements of the matrix from the highest element in the matrix or multiply the entire matrix by –1 and continue with the procedure. For solving the assignment problem, we use the Assignment technique or Hungarian method, or Flood’s technique.

The transportation problem is a special case of the linear programming model and the assignment problem is a special case of transportation problem, therefore it is also a special case of the linear programming problem.

In this tutorial, we are going to cover the following topics:

Assignment Problem

A problem that requires pairing two sets of items given a set of paired costs or profit in such a way that the total cost of the pairings is minimized or maximized. The assignment problem is a special case of linear programming.

For example, an operation manager needs to assign four jobs to four machines. The project manager needs to assign four projects to four staff members. Similarly, the marketing manager needs to assign the 4 salespersons to 4 territories. The manager’s goal is to minimize the total time or cost.

Problem Formulation

A manager has prepared a table that shows the cost of performing each of four jobs by each of four employees. The manager has stated his goal is to develop a set of job assignments that will minimize the total cost of getting all 4 jobs.  

Assignment Problem

Initialize LP Model

In this step, we will import all the classes and functions of pulp module and create a Minimization LP problem using LpProblem class.

Define Decision Variable

In this step, we will define the decision variables. In our problem, we have two variable lists: workers and jobs. Let’s create them using  LpVariable.dicts()  class.  LpVariable.dicts()  used with Python’s list comprehension.  LpVariable.dicts()  will take the following four values:

  • First, prefix name of what this variable represents.
  • Second is the list of all the variables.
  • Third is the lower bound on this variable.
  • Fourth variable is the upper bound.
  • Fourth is essentially the type of data (discrete or continuous). The options for the fourth parameter are  LpContinuous  or  LpInteger .

Let’s first create a list route for the route between warehouse and project site and create the decision variables using LpVariable.dicts() the method.

Define Objective Function

In this step, we will define the minimum objective function by adding it to the LpProblem  object. lpSum(vector)is used here to define multiple linear expressions. It also used list comprehension to add multiple variables.

Define the Constraints

Here, we are adding two types of constraints: Each job can be assigned to only one employee constraint and Each employee can be assigned to only one job. We have added the 2 constraints defined in the problem by adding them to the LpProblem  object.

Solve Model

In this step, we will solve the LP problem by calling solve() method. We can print the final value by using the following for loop.

From the above results, we can infer that Worker-1 will be assigned to Job-1, Worker-2 will be assigned to job-3, Worker-3 will be assigned to Job-2, and Worker-4 will assign with job-4.

In this article, we have learned about Assignment problems, Problem Formulation, and implementation using the python PuLp library. We have solved the Assignment problem using a Linear programming problem in Python. Of course, this is just a simple case study, we can add more constraints to it and make it more complicated. You can also run other case studies on Cargo Loading problems , Staff scheduling problems . In upcoming articles, we will write more on different optimization problems such as transshipment problem, balanced diet problem. You can revise the basics of mathematical concepts in  this article  and learn about Linear Programming  in this article .

  • Solving Blending Problem in Python using Gurobi
  • Transshipment Problem in Python Using PuLP

You May Also Like

solving an assignment problem

Solving Staff Scheduling Problem using Linear Programming

solving an assignment problem

Python Iterators Examples

solving an assignment problem

Merging and Joining in Pandas

Principedia

Principedia

Principedia

Successful Strategies for Solving Problems on Assignments

Solving complex problems is a challenging task and warrants ongoing effort throughout your career. A number of approaches that expert problem-solvers find useful are summarized below, and you may find these strategies helpful in your own work. Any quantitative problem, whether in economics, science, or engineering, requires a two-step approach: analyze, then compute. Jumping directly to “number-crunching” without thinking through the logic of the problem is counter-productive. Conversely, analyzing a problem and then computing carelessly 
will not result in the right answer either. So, think first, calculate, and always check your results. And remember, attitude matters. Approach solving a problem as something that you know you can do, rather than something you think that you can’t do. Very few of us can see the answer to a problem without working through various approaches first.

Analysis Stage

  • Read the problem carefully at least twice, aloud if possible, then restate the problem in your own words.
  • Write down all the information that you know in the problem and separate, if necessary, the “givens” from the “constraints.”
  • Think about what can be done with the information that is given. What are some relationships within the information given? What does this particular problem have in common conceptually with course material or other questions that you have solved?
  • Draw pictures or graphs to help you sort through what’s really going on in the problem. These will help you recall related course material that will help you solve the problem. However, be sure to check that the assumptions underlying the picture or graph you have drawn are the same as the assumptions made in the problem. If they are not, you will need to take this into consideration when setting up your approach.

Computing Stage

  • If the actual numbers involved in the problem are too large, small, or abstract and seem to be getting in the way of your thinking, substitute simple numbers and plan your approach. Then, once you get an understanding of the concepts in the problem, you can go back to the numbers given.
  • Once you have a plan, do the necessary calculations. If you think of a simpler or more elegant approach, you can try it afterwards and use it as a check of your logic. Be careful about changing your approach in the middle of a problem. You can inadvertently include some incorrect or inapplicable assumptions from the prior plan.
  • Throughout the computing stage, pause periodically to be sure that you understand the intuition behind each concept in the problem. Doing this will not only strengthen your understanding of the material, but it will also help you in solving other problems that also focus on those concepts.
  • Resist the temptation to consult the answer key before you have finished the problem. Problems often look logical when someone else does them; that recognition does not require the same knowledge as solving the problem yourself. Likewise, when soliciting help from the AI or course head, ask for direction or a helpful tip only—avoid having them work the problem for you. This approach will help ensure that you really understand the problem—an essential prerequisite for successfully solving problems on exams and quizzes where no outside help is available.
  • Check your results. Does the answer make sense given the information you have and the concepts involved? Does the answer make sense in the real world? Are the units reasonable? Are the units the ones specified in the problem? If you substitute your answer for the unknown in the problem, does it fit the criteria given? Does your answer fit within the range of an estimate that you made prior to calculating the result? One especially effective way to check your results is to work with a study partner or group. Discussing various options for a problem can help you uncover both computational errors and errors in your thinking about the problem. Before doing this, of course, make sure that working with someone else is acceptable to your course instructor.
  • Ask yourself why this question is important. Lectures, precepts, problem sets, and exams are all intended to increase your knowledge of the subject. Thinking about the connection between a problem and the rest of the course material will strengthen your overall understanding.

If you get stuck, take a break. Research has shown that the brain works very productively on problems while we sleep—so plan your problem-solving sessions in such a way that you do a “first pass.” Then, get a night’s rest, return to the problem set the next day, and think about approaching the problem in an entirely different way.

References and Further Reading:

Adapted in part from Walter Pauk. How to Study in College , 7th edition, Houghton Mifflin Co., 2001

  • ← Questions to Ask Yourself When Problem Solving
  • Breaking Down Large Projects Into Manageable Pieces →

Assignment Problem: Meaning, Methods and Variations | Operations Research

solving an assignment problem

After reading this article you will learn about:- 1. Meaning of Assignment Problem 2. Definition of Assignment Problem 3. Mathematical Formulation 4. Hungarian Method 5. Variations.

Meaning of Assignment Problem:

An assignment problem is a particular case of transportation problem where the objective is to assign a number of resources to an equal number of activities so as to minimise total cost or maximize total profit of allocation.

The problem of assignment arises because available resources such as men, machines etc. have varying degrees of efficiency for performing different activities, therefore, cost, profit or loss of performing the different activities is different.

Thus, the problem is “How should the assignments be made so as to optimize the given objective”. Some of the problem where the assignment technique may be useful are assignment of workers to machines, salesman to different sales areas.

Definition of Assignment Problem:

ADVERTISEMENTS:

Suppose there are n jobs to be performed and n persons are available for doing these jobs. Assume that each person can do each job at a term, though with varying degree of efficiency, let c ij be the cost if the i-th person is assigned to the j-th job. The problem is to find an assignment (which job should be assigned to which person one on-one basis) So that the total cost of performing all jobs is minimum, problem of this kind are known as assignment problem.

The assignment problem can be stated in the form of n x n cost matrix C real members as given in the following table:

solving an assignment problem

Index     Assignment problem     Hungarian algorithm     Solve online    

Solve an assignment problem online

Fill in the cost matrix of an assignment problem and click on 'Solve'. The optimal assignment will be determined and a step by step explanation of the hungarian algorithm will be given.

Fill in the cost matrix ( random cost matrix ):

Don't show the steps of the Hungarian algorithm Maximize the total cost

HungarianAlgorithm.com © 2013-2024

Assignment Problem: Maximization

There are problems where certain facilities have to be assigned to a number of jobs, so as to maximize the overall performance of the assignment.

The Hungarian Method can also solve such assignment problems , as it is easy to obtain an equivalent minimization problem by converting every number in the matrix to an opportunity loss.

The conversion is accomplished by subtracting all the elements of the given matrix from the highest element. It turns out that minimizing opportunity loss produces the same assignment solution as the original maximization problem.

  • Unbalanced Assignment Problem
  • Multiple Optimal Solutions

Example: Maximization In An Assignment Problem

At the head office of www.universalteacherpublications.com there are five registration counters. Five persons are available for service.

Person
Counter A B C D E
1 30 37 40 28 40
2 40 24 27 21 36
3 40 32 33 30 35
4 25 38 40 36 36
5 29 62 41 34 39

How should the counters be assigned to persons so as to maximize the profit ?

Here, the highest value is 62. So we subtract each value from 62. The conversion is shown in the following table.

On small screens, scroll horizontally to view full calculation

Person
Counter A B C D E
1 32 25 22 34 22
2 22 38 35 41 26
3 22 30 29 32 27
4 37 24 22 26 26
5 33 0 21 28 23

Now the above problem can be easily solved by Hungarian method . After applying steps 1 to 3 of the Hungarian method, we get the following matrix.

Person
Counter A B C D E
1 10 3 8
2 16 13 15 4
3 8 7 6 5
4 15 2 4
5 33 21 24 23

Draw the minimum number of vertical and horizontal lines necessary to cover all the zeros in the reduced matrix.

Select the smallest element from all the uncovered elements, i.e., 4. Subtract this element from all the uncovered elements and add it to the elements, which lie at the intersection of two lines. Thus, we obtain another reduced matrix for fresh assignment. Repeating step 3, we obtain a solution which is shown in the following table.

Final Table: Maximization Problem

Use Horizontal Scrollbar to View Full Table Calculation

Person
Counter A B C D E
1 14 3 8
2 12 9 11
3 4 3 2 1
4 19 2 4
5 37 21 24 23

The total cost of assignment = 1C + 2E + 3A + 4D + 5B

Substituting values from original table: 40 + 36 + 40 + 36 + 62 = 214.

Share This Article

Operations Research Simplified Back Next

Goal programming Linear programming Simplex Method Transportation Problem

Your Article Library

Assignment problem in linear programming : introduction and assignment model.

solving an assignment problem

ADVERTISEMENTS:

Assignment problem is a special type of linear programming problem which deals with the allocation of the various resources to the various activities on one to one basis. It does it in such a way that the cost or time involved in the process is minimum and profit or sale is maximum. Though there problems can be solved by simplex method or by transportation method but assignment model gives a simpler approach for these problems.

In a factory, a supervisor may have six workers available and six jobs to fire. He will have to take decision regarding which job should be given to which worker. Problem forms one to one basis. This is an assignment problem.

1. Assignment Model :

Suppose there are n facilitates and n jobs it is clear that in this case, there will be n assignments. Each facility or say worker can perform each job, one at a time. But there should be certain procedure by which assignment should be made so that the profit is maximized or the cost or time is minimized.

job of Work

In the table, Co ij is defined as the cost when j th job is assigned to i th worker. It maybe noted here that this is a special case of transportation problem when the number of rows is equal to number of columns.

Mathematical Formulation:

Any basic feasible solution of an Assignment problem consists (2n – 1) variables of which the (n – 1) variables are zero, n is number of jobs or number of facilities. Due to this high degeneracy, if we solve the problem by usual transportation method, it will be a complex and time consuming work. Thus a separate technique is derived for it. Before going to the absolute method it is very important to formulate the problem.

Suppose x jj is a variable which is defined as

1 if the i th job is assigned to j th machine or facility

0 if the i th job is not assigned to j th machine or facility.

Now as the problem forms one to one basis or one job is to be assigned to one facility or machine.

Assignment Model

The total assignment cost will be given by

clip_image005

The above definition can be developed into mathematical model as follows:

Determine x ij > 0 (i, j = 1,2, 3…n) in order to

Assignment Model

Subjected to constraints

Assignment Model

and x ij is either zero or one.

Method to solve Problem (Hungarian Technique):

Consider the objective function of minimization type. Following steps are involved in solving this Assignment problem,

1. Locate the smallest cost element in each row of the given cost table starting with the first row. Now, this smallest element is subtracted form each element of that row. So, we will be getting at least one zero in each row of this new table.

2. Having constructed the table (as by step-1) take the columns of the table. Starting from first column locate the smallest cost element in each column. Now subtract this smallest element from each element of that column. Having performed the step 1 and step 2, we will be getting at least one zero in each column in the reduced cost table.

3. Now, the assignments are made for the reduced table in following manner.

(i) Rows are examined successively, until the row with exactly single (one) zero is found. Assignment is made to this single zero by putting square □ around it and in the corresponding column, all other zeros are crossed out (x) because these will not be used to make any other assignment in this column. Step is conducted for each row.

(ii) Step 3 (i) in now performed on the columns as follow:- columns are examined successively till a column with exactly one zero is found. Now , assignment is made to this single zero by putting the square around it and at the same time, all other zeros in the corresponding rows are crossed out (x) step is conducted for each column.

(iii) Step 3, (i) and 3 (ii) are repeated till all the zeros are either marked or crossed out. Now, if the number of marked zeros or the assignments made are equal to number of rows or columns, optimum solution has been achieved. There will be exactly single assignment in each or columns without any assignment. In this case, we will go to step 4.

4. At this stage, draw the minimum number of lines (horizontal and vertical) necessary to cover all zeros in the matrix obtained in step 3, Following procedure is adopted:

(iii) Now tick mark all the rows that are not already marked and that have assignment in the marked columns.

(iv) All the steps i.e. (4(i), 4(ii), 4(iii) are repeated until no more rows or columns can be marked.

(v) Now draw straight lines which pass through all the un marked rows and marked columns. It can also be noticed that in an n x n matrix, always less than ‘n’ lines will cover all the zeros if there is no solution among them.

5. In step 4, if the number of lines drawn are equal to n or the number of rows, then it is the optimum solution if not, then go to step 6.

6. Select the smallest element among all the uncovered elements. Now, this element is subtracted from all the uncovered elements and added to the element which lies at the intersection of two lines. This is the matrix for fresh assignments.

7. Repeat the procedure from step (3) until the number of assignments becomes equal to the number of rows or number of columns.

Related Articles:

  • Two Phase Methods of Problem Solving in Linear Programming: First and Second Phase
  • Linear Programming: Applications, Definitions and Problems

No comments yet.

Leave a reply click here to cancel reply..

You must be logged in to post a comment.

web statistics

  • Data Structures
  • Linked List
  • Binary Tree
  • Binary Search Tree
  • Segment Tree
  • Disjoint Set Union
  • Fenwick Tree
  • Red-Black Tree
  • Advanced Data Structures

Hungarian Algorithm for Assignment Problem | Set 2 (Implementation)

Given a 2D array , arr of size N*N where arr[i][j] denotes the cost to complete the j th job by the i th worker. Any worker can be assigned to perform any job. The task is to assign the jobs such that exactly one worker can perform exactly one job in such a way that the total cost of the assignment is minimized.

Input: arr[][] = {{3, 5}, {10, 1}} Output: 4 Explanation: The optimal assignment is to assign job 1 to the 1st worker, job 2 to the 2nd worker. Hence, the optimal cost is 3 + 1 = 4. Input: arr[][] = {{2500, 4000, 3500}, {4000, 6000, 3500}, {2000, 4000, 2500}} Output: 4 Explanation: The optimal assignment is to assign job 2 to the 1st worker, job 3 to the 2nd worker and job 1 to the 3rd worker. Hence, the optimal cost is 4000 + 3500 + 2000 = 9500.

Different approaches to solve this problem are discussed in this article .

Approach: The idea is to use the Hungarian Algorithm to solve this problem. The algorithm is as follows:

  • For each row of the matrix, find the smallest element and subtract it from every element in its row.
  • Repeat the step 1 for all columns.
  • Cover all zeros in the matrix using the minimum number of horizontal and vertical lines.
  • Test for Optimality : If the minimum number of covering lines is N , an optimal assignment is possible. Else if lines are lesser than N , an optimal assignment is not found and must proceed to step 5.
  • Determine the smallest entry not covered by any line. Subtract this entry from each uncovered row, and then add it to each covered column. Return to step 3.

Consider an example to understand the approach:

Let the 2D array be: 2500 4000 3500 4000 6000 3500 2000 4000 2500 Step 1: Subtract minimum of every row. 2500, 3500 and 2000 are subtracted from rows 1, 2 and 3 respectively. 0   1500  1000 500  2500   0 0   2000  500 Step 2: Subtract minimum of every column. 0, 1500 and 0 are subtracted from columns 1, 2 and 3 respectively. 0    0   1000 500  1000   0 0   500  500 Step 3: Cover all zeroes with minimum number of horizontal and vertical lines. Step 4: Since we need 3 lines to cover all zeroes, the optimal assignment is found.   2500   4000  3500  4000  6000   3500   2000  4000  2500 So the optimal cost is 4000 + 3500 + 2000 = 9500

For implementing the above algorithm, the idea is to use the max_cost_assignment() function defined in the dlib library . This function is an implementation of the Hungarian algorithm (also known as the Kuhn-Munkres algorithm) which runs in O(N 3 ) time. It solves the optimal assignment problem. 

Below is the implementation of the above approach:

Time Complexity: O(N 3 ) Auxiliary Space: O(N 2 )

Please Login to comment...

Similar reads.

  • Mathematical

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

CodeAvail

7 Most Effective Ways For How To Solve Assignment Problems

7 Most Effective Ways For How To Solve Assignment Problems

Here in this blog, CodeAvail experts will explain to you 7 most effective ways for how to solve assignment problems step by step in detail.

How To Solve Assignment Problems

Table of Contents

The most common question asked by many students is how to solve assignment problems. There are many students who are having a hard time with their assignments thats why they are looking for proper guidelines to solve those problems. The assignment is one of the most critical parts of the students’ academic journey, and one always states that I have a lot of assignments to do. Besides this, there is not a single student in the world who has never done any assignment in their academic life. But the students always want to find the best and most effective ways for how to solve assignment problems . In this blog, we have given all the necessary information to help you solve your assignment problems.

How To Solve Assignment Problems-Stepwise Guide

To solve assignment problems, you need to understand the question carefully first. Because if you don’t understand the question, you will not know the information you need to complete your assignments. Follow these steps to know How To Solve assignment Problems :

1) Proper Planning Is Required 

This is the first step when you start solving your assignment, you’ll most likely jump directly into the main thing. The primary thing you will do is pull out of your beg, at that point work your way through the remainder of your assignment. There’s a superior way. Know how much time you need to do an assignment. At that point list down all the various chores that you need to do. Check to what extent it will take you to finish every task to check whether you have to permit yourself additional time. Be practical. When your note down everything then the next step is to find the best place for work.

2) Collect All the required Data Before You Start  

This is the biggest problem of many students, they don’t really follow this step. Make sure you have all the required information to solve assignment problems. Don’t start your assignment without the proper information. Because after starting your assignment when you come back it may be hard to get once again and write with the same flow. It will just destroy your assignment writing flow. If you have planned efficiently, you should know what exactly you want to complete your assignment and set up everything in your study table you’ll require.

3) Set A Timetable For Certain Assignment

Set a proper timetable to achieve each part of your assignment based on how long you think each part of your assignment will take and how much time you have. Give yourself enough time to complete each part and do other nightly routines. Set a proper time and be honest with it. The less time you waste on checking your laptop or mobile, the more quickly you can complete your assignment. If you believe you can complete everything in a half-hour, set a timer and work honestly to complete it.

4) Stay Away From Distractions

You need a quiet place when you are working on your assignment problems. Problems like Maths assignment problems, Computer science problems needs a quiet place to complete. Keep your telephone away from you, stay away from your PC, and make your surroundings as peaceful as possible. Because to solve assignment problems it requires a lot of focus. Giving work your full focus will really make it simpler, in light of the fact that your brain won’t balance various tasks simultaneously. 

Usually, students will attempt to perform multiple tasks, sitting in front of the TV or tuning in to the radio or proceeding to visit on Facebook or Instagram while additionally attempting to do assignments. It will be a lot more enjoyable to do those things after you are done completing your assignment.

5) Taking Breaks is Necessary

If your professor assigns you a lot of assignments to complete, then You want to work straight through hours and hours of assignment if you have a lot to do. But it would probably end up slowing you down and prolonging the whole session.

Get the work done in short periods. Go hard on an assignment, then take a short break to stretch and walk. To keep going, it will re-energize your mind and your body. This strategy will help you solve your assignment problems quickly and help you maintain your assignment’s quality. Try to do your assignment for 1 hour and then take a 10 minutes break.

6) Isolate Yourself

It is one of the best ways to do assignment problems. Because when we isolate ourselves from the outside world, we can do a better concentration on our assignment. The reason is, many outside elements distract our mind from our assignment. When we are going to do our assignment, we should isolate ourselves from our family, social media, and other social activities. 

7) Take Help From Online Service Providers

There are many Excel problems that are hard to solve at that time you can take help from online service providers. The reason for taking help from these online service providers because they have years of experience in their respective field. Plus if you need any help you can contact them because they are always available to deal with your problems. They are well aware of the guidelines provided by universities and colleges and know how to solve assignment problems .

Follow all the steps we mentioned above will help in solving your assignment problems. In this article, we have given all the required information that will help you find the answer on how to solve assignment problems . The assignment problems like Maths and Computer science required a lot of focus and proper time management. Time is everything if you manage your time effectively then you will not find any problem solving your assignment problems before the allotted time. Just put away the thing which you think can distract your mind. And give yourself a break after you complete every task because if you give your rain rest then it will be helpful for you to focus on your next task.

If you are facing a problem with completing your assignment or any other assignment, you can take help from us. Our Assignment providers have helped students across the world in completing their assignments on time, get good grades, and at the same time. There’s no doubt that many teachers are handing out assignments that are hard to complete on time. Some assignments can be about an unknown subject. But the truth is, often, the students need assignment help. It is your best decision when you have a lot of tasks to complete but still want to have free time.

As a result, Our computer science assignment help and programming assignment help experts are available for you to 24*7.

Related Posts

How to Hire someone to do my Statistics Homework for Me?

How to Hire someone to do my Statistics Homework for Me?

Students ask to do my statistics homework for me. Although there are many online tutors or statistics homework service providing websites available to help you…

Professional Experts Tips On How to Get Good Grades in Exams

How to Get Good Grades in Exams Tips by Experts

Here in this blog, Codeavail professional experts will help you to understand how to get good grades in Exams. Notice that not all the material…

#1 Excel tutorial on the net

  • Assignment Problem

Formulate the Model | Trial and Error | Solve the Model

Use the solver in Excel to find the assignment of persons to tasks that minimizes the total cost.

Formulate the Model

The model we are going to solve looks as follows in Excel.

Assignment Problem in Excel

1. To formulate this assignment problem , answer the following three questions.

a. What are the decisions to be made? For this problem, we need Excel to find out which person to assign to which task (Yes=1, No=0). For example, if we assign Person 1 to Task 1, cell C10 equals 1. If not, cell C10 equals 0.

b. What are the constraints on these decisions? Each person can only do one task (Supply=1). Each task only needs one person (Demand=1).

c. What is the overall measure of performance for these decisions? The overall measure of performance is the total cost of the assignment, so the objective is to minimize this quantity.

2. To make the model easier to understand, create the following named ranges .

Range Name Cells
Cost C4:E6
Assignment C10:E12
PersonsAssigned C14:E14
Demand C16:E16
TasksAssigned G10:G12
Supply I10:I12
TotalCost I16

3. Insert the following functions.

Insert Functions

Explanation: The SUM functions calculate the number of tasks assigned to a person and the number of persons assigned to a task. Total Cost equals the sumproduct of Cost and Assignment.

Trial and Error

With this formulation, it becomes easy to analyze any trial solution.

For example, if we assign Person 1 to Task 1, Person 2 to task 2 and Person 3 to Task 3, Tasks Assigned equals Supply and Persons Assigned equals Demand. This solution has a total cost of 147.

Trial Solution

It is not necessary to use trial and error. We shall describe next how the Excel Solver can be used to quickly find the optimal solution.

Solve the Model

To find the optimal solution, execute the following steps.

1. On the Data tab, in the Analyze group, click Solver.

Click Solver

Note: can't find the Solver button? Click here to load the Solver add-in .

Enter the solver parameters (read on). The result should be consistent with the picture below.

Solver Parameters

You have the choice of typing the range names or clicking on the cells in the spreadsheet.

2. Enter TotalCost for the Objective.

3. Click Min.

4. Enter Assignment for the Changing Variable Cells.

5. Click Add to enter the following constraint.

Binary Constraint

Note: binary variables are either 0 or 1.

6. Click Add to enter the following constraint.

Demand Constraint

7. Click Add to enter the following constraint.

Supply Constraint

8. Check 'Make Unconstrained Variables Non-Negative' and select 'Simplex LP'.

9. Finally, click Solve.

Solver Results

The optimal solution:

Assignment Problem Result

Conclusion: it is optimal to assign Person 1 to task 2, Person 2 to Task 3 and Person 3 to Task 1. This solution gives the minimum cost of 129. All constraints are satisfied.

Learn more, it's easy

  • Transportation Problem
  • Shortest Path Problem
  • Maximum Flow Problem
  • Capital Investment
  • Sensitivity Analysis
  • System of Linear Equations

Download Excel File

  • assignment-problem.xlsx

Next Chapter

  • Analysis ToolPak

Follow Excel Easy

Excel Easy on Facebook

Become an Excel Pro

  • 300 Examples

Assignment Problem • © 2010-2024 Excel is Awesome, we'll show you: Introduction • Basics • Functions • Data Analysis • VBA

  • Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
  • OverflowAI GenAI features for Teams
  • OverflowAPI Train & fine-tune LLMs
  • Labs The future of collective knowledge sharing
  • About the company Visit the blog

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

The Assignment Problem, a NumPy function?

Since an assignment problem can be posed in the form of a single matrix, I am wondering if NumPy has a function to solve such a matrix. So far I have found none. Maybe one of you guys know if NumPy/SciPy has an assignment-problem-solve function?

Edit: In the meanwhile I have found a Python (not NumPy/SciPy) implementation at http://software.clapper.org/munkres/ . Still I suppose a NumPy/SciPy implementation could be much faster, right?

  • optimization
  • combinatorics

fuglede's user avatar

  • What a shame it was not implemented with numpy. Not only might it be faster, but the algorithm must be much easier to express with numpy as well. –  u0b34a0f6ae Commented Sep 9, 2009 at 12:33

7 Answers 7

There is now a numpy implementation of the munkres algorithm in scikit-learn under sklearn/utils/linear_assignment_.py its only dependency is numpy. I tried it with some approximately 20x20 matrices, and it seems to be about 4 times as fast as the one linked to in the question. cProfiler shows 2.517 seconds vs 9.821 seconds for 100 iterations.

Sean Johnson's user avatar

  • 6 This will be included in scipy as scipy.optimize.linear_sum_assignment from version 0.18. –  joeln Commented Jan 14, 2016 at 3:41
  • 1 The linear_assignment_ module is deprecated in 0.21 and will be removed from 0.23. Use scipy.optimize.linear_sum_assignment instead. –  min2bro Commented Dec 7, 2019 at 8:56

I was hoping that the newer scipy.optimize.linear_sum_assignment would be fastest, but (perhaps not surprisingly) the Cython library (which does not have pip support) is significantly faster, at least for my use case:

UPDATE: using munkres v1.1.2 and scipy v1.5.0 achieves the following results:

tdMJN6B2JtUe's user avatar

  • I just tried the library for my case and got 25x speedup using the Cython version! –  Marcus V. Commented Apr 5, 2018 at 13:25
  • I also tried the cython version and got a massive speedup. Just had to learn to install from source since it apparently lacks pip support –  kevinkayaks Commented Sep 12, 2018 at 23:43
  • 2 The implementation of scipy.optimize.linear_sum_assignment has been revised and implemented from scratch in C++. The new implementation will be available in SciPy 1.4.0 and should provide substantial improvements in speed. –  fuglede Commented Jul 19, 2019 at 12:32
  • Yes..Newer implementation of scipy.optimize.linear_sum_assignment is very fast. A 1000 x 1000 cost matrix takes 70ms to solve. –  Abhilash Awasthi Commented Jun 6, 2020 at 10:35

No, NumPy contains no such function. Combinatorial optimization is outside of NumPy's scope. It may be possible to do it with one of the optimizers in scipy.optimize but I have a feeling that the constraints may not be of the right form.

NetworkX probably also includes algorithms for assignment problems.

dwf's user avatar

  • 11 There is an implementation scipy.optimize.linear_sum_assignment from scipy version 0.18. –  joeln Commented Jan 14, 2016 at 3:41

Yet another fast implementation, as already hinted by @Matthew: scipy.optimize has a function called linear_sum_assignment . From the docs:

The method used is the Hungarian algorithm, also known as the Munkres or Kuhn-Munkres algorithm.

https://docs.scipy.org/doc/scipy-0.18.1/reference/generated/scipy.optimize.linear_sum_assignment.html

DomTomCat's user avatar

There is an implementation of the Munkres' algorithm as a python extension module which has numpy support. I've used it successfully on my old laptop. However, it does not work on my new machine - I assume there is a problem with "new" numpy versions (or 64bit arch).

SilentGhost's user avatar

As of version 2.4 (released 2019-10-16), NetworkX solves the problem through nx.algorithms.bipartite.minimum_weight_full_matching . At the time of writing, the implementation uses SciPy's scipy.optimize.linear_sum_assignment under the hood, so expect the same performance characteristics.

In addition to the solver in scipy.optimize.linear_sum_assignment already mentioned in some of the other answers, SciPy (as of 1.6.0) also comes with a sparsity-friendly solver in scipy.sparse.csgraph.min_weight_full_bipartite_matching .

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged python numpy optimization scipy combinatorics or ask your own question .

  • Featured on Meta
  • Announcing a change to the data-dump process
  • Upcoming initiatives on Stack Overflow and across the Stack Exchange network...

Hot Network Questions

  • How can I break equation in forest?
  • Understanding the behavior of modulo operation while using TikZ
  • Can't get started with Tao Ex 3.6.6 regarding cardinality of power sets.
  • What is the historical origin of lone CR as a line terminator?
  • Why try to explain the unexplainable?
  • Partial term in Leibniz rule
  • Short story about food called something like "Standard Fare"
  • Translation of Typst example sentence into Latin
  • Source that boredom leads to sin
  • Is there a maximum time a check can take to bounce?
  • More Square Root
  • In lead sheet does tie also apply to chord?
  • TK B777 seat map confusion about exit row
  • It keeps changing!
  • Isn't manual port forwarding actually less safe than UPnP?
  • With FlixBus, do I have to get on at the exact stop my ticket specifies if there are multiple stops in the same city?
  • Doesn't our awareness of qualia imply the brain is non-deterministic?
  • Is there a difference between "set" and "collection"?
  • What is the best way of carrying currency while travelling to Singapore?
  • How to plot confidence band for Weibull linear fitting?
  • Can Victorian engineers build spacecraft with an Epstein drive?
  • What reference is Deadpool making in his line, "What is it, girl? Is there trouble at the well?"
  • Clarification on Work-Energy Theorem
  • Why is much harder to encrypt emails, compared to web pages?

solving an assignment problem

Browse links

  • © 2024 BuzzFeed, Inc
  • Consent Preferences
  • Accessibility Statement

Beauty + Personal Care

Sports + Fitness

We hope you love our recommendations! Some may have been sent as samples, but all were independently selected by our editors. Just FYI, BuzzFeed and its publishing partners may collect a share of sales and/or other compensation from the links on this page.

These 34 Problem-Solving Products *Clearly* Understood The Assignment

The Nippies pasties get an A+ for *actually* allowing braless moments and *seriously* concealing nipples. They're totally top of the class.

Jordan Grigsby

BuzzFeed Staff

1. A pill tracker  so you can easily remember if you took your meds in the morning. Stick this thingy on and simply slide the little indicator over after you take your pills. It's also reusable so, scoreee, you can peel it off and stick it to your next medication bottle, easy! 

reviewer holding pharmacy pill bottle with device stuck on that has a yes/no slider for each day of the week

Take-n-Slide is a small biz that specializes in tools that make it easy to keep track of medications. They also offer a vitamin tracker, pet med tracker, and multi-dose tracker. 

Promising review: " This is a game changer for me. I was stressing about remembering whether or not I took my meds. This is the best solution I have ever found. I hate writing reviews, but I stopped before rushing out of work to write this one. Thanks for making such a life-saving, time-saving product, especially for us elders whose memory isn't what it used to be." — Bajanwoman

Get a pack of two from Amazon for $12.99  (available in three colors and in a five-pack).

2. A portable hair tie hub  so you can toss your hair up whenever you need to. We've definitely all had that *oh, crap, did I not bring a scrunchie?* moment or have had to ask everyone around us for one, but not anymore! Next time the sun starts to sun extra hard (I swear it's taking its job WAY too seriously this summer) don't ~sweat it~, this bb will make it so that you'll always be able to throw your locks into a messy bun. 

hair tie hub attached to a reviewer's purse

Hair Tie Hub is a small biz that specializes in hair tie organizing keychains. Each carries three hair ties and can easily attach to gym bags, purses, keys, and more! 

Promising review : "If you're anything like us, you are always forgetting a hair tie. Adding this to my keychain has been very useful. We are never having to scrounge around a purse or the car for one when we need it." — Family

Get it from Amazon for $8.99  (available in three colors). 

3. A jar opener  because yesterday you tried to open Trader Joe's jar of chili crunch and ended up burning your pot stickers cuz ya couldn't get it open. Or wait, was that me? Def was, let me add this to my cart. Grab a hold of the lid with this bad boy, twist, and show that pickle jar who's boss. Limited mobility? Weak grip? Meet your new kitchen bestie. 

Jar opener being used to open a jar marinara sauce

Promising review: "I have had a difficult time trying to open a large Costco-sized jar of marinated artichoke hearts. To the point that I was sorely tempted to ask my neighbor to open it, a neighbor I don't know well (which seemed to be a little old lady thing to do.) And then I opened up the Amazon envelope and with very little effort, this jar-opening tool opened the jar with amazing ease!! I mean really!! Whoever invented this is pretty darn clever. I recommend it for anyone whose hand strength has lessened but whose yearning for independence (and artichoke hearts or similar food item) is strong. " — Nancy C.

Get it from Amazon for $6.99+  (available in 15 colors and styles).

4. A sheet of 100  adhesive, sound-dampening bumpers  so you aren't woken up every morning by the sound of your partner slamming the cabinet doors in search of a coffee mug. Now they can slam away without waking up everyone else in the house. 

reviewer showing clear round bumper on inside of cabinet door

Promising review: "Best thing I have ever bought for my kitchen. Say goodbye to the heinous noise of slamming cabinets. My mother is notorious for just letting go of the cabinets and letting them slam shut, so before she came to visit I installed these and I couldn't have been happier. They keep the noise to a minimum and likely help to improve the longevity of the cabinet doors by reducing the impact. They are easy to install (although time consuming for all the cabinets in the kitchen) and mine have not fallen off after five months of use. When installing, I pressed them onto the cabinet hard for a 30 count before letting go. I think this is required to make them long-lasting. My father installed these at his home after he visited and his fell off because he just placed them on the cabinets like a sticker. After installing a second with the same method I used, he has not had any fall off." — Dave Carlson

Get it from Amazon for  $7.99 .

5. A set of kinda genius soda can covers  because that Sprite looked delicious but you're five sips in and you can't finish it. If you're tired of your options being flat soda from letting it sit forever or dumping a half-filled can down the drain, throw one of these lids on and get back to your refreshing, STILL CARBONATED soda when you want it again. 

the white plastic lid on a soda can

Promising review: "Very solid product. It does exactly what it claims to do. It snaps on to any can I have easily, then opens and closes shut again for storage in my fridge. As you can see in my pictures [above], it’s leakproof when closed. I think it will be a great addition to my kitchen." — w_starling

Get a six-pack from Amazon for $12.57  (also available in a multicolor style and other pack sizes).

6. A hydrating eye stick  to help reduce dark circles, lines, and puffiness while delivering moisture without oils. Sensitive skin friends, this one's for us. People may start to think your goldfish are Cosmo and Wanda because these results are jaw dropping. 

reviewer under eyes before and after using hydrating stick with dark circles much lighter after

It's from a Korean-owned biz!

Promising review: "I HAD to write a review. I use this in the morning and night after my whole face routine and putting on moisturizer. I don't have dark bags however, my under-eyes do get a bit puffy and I was noticing fine lines. DUDE, those fine lines are fading. Last night I went to a party and woke up looking like the crypt keeper, and this stuff normalized my creepy zombie eyes in about 20 minutes. It's $9. Do yourself a favor and buy it." — Jasmine Deatherage

Get it from Amazon for $9.90+  (available in two styles and in a two-pack).

7. And an  under-eye brightener  because you aren't sure if you'll ever actually  not  be exhausted, but you can def stop looking like it. It's ~enriched~ with shea butter and hyaluronic acid to give your dark circles a more radiant look. The pinkish tint helps balance out the blueish tint under your eyes as if you said a spell to make your dark circles *poof* away. 

Close-up of a person with eye brightener on their left eye and without it on the right

The color adaptive formula is designed so one of two shades will work on any skin tone. 

Promising review: "Took years off my eyes! This product is so reasonably priced. I came across a TikTok promoting this and decided to take a chance since the price was super reasonable. My eyes looked brighter in a good way, and the concealer worked so well that I felt I looked younger. I got compliments from friends asking what I did differently with my makeup. I recommend it." — Placeholder

Get it from Amazon for $6 (available in two shades). 

8. An encouraging daily planner to get you organized and keep you thriving. Plus it's undated so you can use it whenever without waste! It has an appointment tracker, a priority list, meal planner, water intake tracker, and so much more. Literally they thought of everything. 

A blank page of the planner

Each planner comes with 50 tear-off sheets the size of a standard piece of paper.

Bliss Collections is a family-owned, Wisconsin-based small biz that specializes in stationery, planners and pads, and drinkware.

Promising review: "How did I live without these? Since I began working from home, these sheets are the best. They keep you accountable and I can go back to see what I accomplished each day, since you have to report your daily tasks. About to order more...thanks for making life easier! — Pame66

Get it from Amazon for $9.99  (available in five sizes and 13 styles).

9. A pack of nose pore patches  that'll cast a spell to banish all the gunk and excess oil from your nose as you sleep. Your nose will be smoother than you could have ever dreamed of. 

a reviewer photo of the pack of nose strips

Promising review: "It had to be said. These things are disgusting, that's why you should buy them. Squeeze part of your nose skin. Do a bunch of little pustules come out? Yeah, if you put one of these puppies on at night, you wake up, and that is all trapped inside that weird film. I dunno how it works. It's probably sorcery." — Jack Sawyer

Get a seven-pack from Amazon for $9.98 . 

10. A sink and drain plunger because you are absolutely sick of unclogging your tub only for your sink to back up again a week later. This baby is 10 times more effective than a traditional plunger and will help you clear your drain of the clumps of hair and gunk that are trapped. Mario and Luigi probz use this. 

Model using a small blue plunger on a sink

Promising review : "I couldn’t believe I wasted my time with those liquid drain clearers. This was fast and efficient, and I only wish I had thought of a product like this sooner. Cleaned my bathroom sink in two seconds!" — Sn48

Get it from Amazon for $12.99+ (available in three sizes and in different styles). 

11. A handy adjustable measuring spoon so you'll have ALL your kitchen measuring tools in ONE spoon. No more bajillion table/teaspoons on a little ring, just slide to the measurement you need! It's giving me Zenon vibes, it's like I'm living in the year 3000 with the Jo Bros.

a pair of the measuring spoons with oil in one and salt in the other

It measures wet ingredients from 1 milliliter up to 15 milliliters, and dry ingredients from 1/4 teaspoon up to 1 tablespoon. AND it's dishwasher safe!

Promising review: "One measuring spoon to replace several...how can you go wrong? The two pieces completely separate so you can wash it thoroughly! Pleased with my purchase and the amount of room it just freed up in my drawer!" — zonneschijn

Get it from Amazon for $7.95 .

12. A WD-40 pen  because the squeaky door hinges on your 2 a.m. bathroom break makes you feel like you're in a horror movie. No need for a whole giant can of WD-40 when you can just use this precise, easy-to-store lil' pen that's the same exact useful stuff!

reviewer using the pen on a door hinge

Promising review: "I love WD-40 products and use them for everything. I spray on shovels to keep dirt or snow from sticking, spray around windows and thresholds to deter bugs, clean Sharpies off wood and walls, and, of course, stop squeaky doors. These small direct-point application pens are great. Keep one in the glove box, my kitchen 'junk' drawer, and the house toolbox." — BBP623

Get a three-pack from Amazon for $12.49 .

13. A 2-in-1 contact and glasses case  with two compartments (one for your glasses and one that holds a mini bottle of solution), a contacts case, a lil' mirror, and rubber tweezers for any eyewear emergencies that arise. Like when your left contact decides to rip in your eye and hurt as bad as ever so you gotta take out both cuz if you only leave one in, you'll get a headache *but* how the heck are you gonna see  anything  for the rest of the day? Bum-ba-da-dum! This miracle case to the rescue! 

A small pink eye glasses case with two compartments holding glasses and contact accessories

Promising review: "Because of my job, I live out of a suitcase, and I am always worried if I need an extra set of contacts or a spare pair of eyeglasses. This is perfect, because I just put it in the bottom of my suitcase, and I am confident I have them both in one place. I got the pink case, and it’s very cute. Very happy with this purchase." — N. Rivera

Get it from Amazon for $14.85 (available in 13 colors). 

14. A fast-acting HyperChiller for those days you're running a tad bit late but still need your iced coffee fix. It's happening people!! We're finally out of the *failed DIY attempts at a cold brew* era. Best part of all? You get a heavenly cold cup o' joe (brewed whatever way you prefer cuz it does it all) in only 60 seconds without spending all that money at a shop, since last month you spent, like, $200 on coffee and have to ~chill~ on your Dunkin' spending.  

reviewer holding iced coffee

This 12.5-ounce cup chills all beverages except carbonated ones (think tea, juice, and even wine). Fill it with water and put it in the freezer for 12 hours before using it then the next morning you're all good to go! Plus, it's dishwasher safe!

And take a peek at it on  TikTok !

Promising review: "Life changing. I use this for coffee, tea, and alcohol, and it's made my life so much easier. My preference is always iced coffee over hot, but it's hard to do iced coffee without it getting watered down or taking forever. I usually just drink coffee at the Starbucks where I work, but the easiness of the Hyper Chiller has me drinking it at home much more often. It cools really fast, almost never taking the full 60 seconds that are recommended. This is one of my favorite coffee tools, and the instructions made it easy to put together." — Sarah Larson

Get it from Amazon for $17.49+ (available in five colors).

15. A car charger with retractable iPhone and Type C charging cables and two extra charging ports that'll allow you to revive the dying battery of several devices at once. Plus, no more having several cables all over your car intertwining with one another; just one sleek little heaven-sent gadget. 

Car USB charger plugged into vehicle's cigarette lighter port

Promising review: "Didn't realize I had so many cables in my car until I put this in. Now I just keep a few wrapped up in the glove box that fit older connections. Great that the cables retract out of the way. Only complaint could be that it is rather large, but it is to be expected with four connections. Little car voltage display is nice to have as well (everyone should have one of these, by the voltage amount, it shows if your alternator is working)." — Jaxmoto

Get it from Amazon for $25.99 (available in three styles). 

16. A  key alarm  so that losing your keys is NEVER the reason you're late and pissed off first thing in the morning, again. If you're a bit forgetful and lose your keys, phone, wallet, or purse pretty much on a daily basis, this alarm should be in your cart. And get this, reviewers even attach 'em to their pets! 

A reviewer holding their keychain with their keys and key alarm attached

It is both iOS- and Android-compatible, is water-resistant, and can find your key out of Bluetooth range by showing you — through an app — your last Bluetooth tracked location. It can *also* be used to find your phone even when it's on silent by just double clicking the Tile! 

Promising review: "I love this product, I'm always losing my keys and these help a lot. One time, I lost my phone at Target after putting it down but after walking around the store and pressing my Tile I was able to hear my phone go off from 50 feet away. These are lifesaving for people who constantly are looking for their things." — Lanelle

Get it from Amazon for  $24.88+  (available in two colors and in a two-pack).

17. A  two-sided travel cup  because you absolutely need your emotional support iced coffee *and* water to get through the day but trying to carry two drinks, a wallet, phone, keys, and more is just impossible. No need to grow more arms so you can carry both; this will allow you to have two drinks without having to juggle two cups. 

reviewer holding the creative water cup, which is filled with iced coffee on one side and water on the other

Check it out on TikTok here !

Promising review: "You NEED this. This product is AMAZING. When I run errands, I hate bringing both a water bottle and coffee tumbler. This product solves that issue. I ran it through my dishwasher to clean it, and the plastic didn’t morph at all. 10/10 recommend!" — Megan Huffman

Get it from Amazon for $13.99 (available in two colors). 

18. An  E.l.f. color corrector  that'll help camouflage discoloration, dark under eye circles, blemishes, redness, and dark spots without caking up or creasing your flawless foundation and concealer. 

reviewer with dark marks on their face

Promising review: "So I was in a car wreck on the third of June 2024 and in the first picture [above] you can see a lot of the markings that are on my face. I just got this concealer in the mail today and not a moment too soon because I have an important Zoom meeting. You want to talk about coverage!!!! Now purple is a really hard color to cover, but this product did it and I took a picture [above] just to show how well! I am super impressed. Plus, the price point is amazing and it's just as effective as any high-end product. It went on silky smooth! Thank you E.l.f. cosmetics, you saved me!" — Jessica

Get it from Amazon for  $4  (available in five shades).

19. A pair of seamless Nippies silicone pasties  to help conceal your areola and nipple while also providing comfort and support without the need for an *actual* bra. These are perfect for all those sheer, backless, and strapless tops you've been dying to pull out for summer, and they aren't all lumpy, so they won't make your tatas look weird. 

reviewer with pastie on one boob, the other without

BuzzFeed Shopping Editor  Natalie Brown  has tried these and says : "Thanks to a ~sample sale~, I got my hands on a gorgeous unlined silk dress last summer that I LOVED but absolutely could  not  wear with a bra, not even a strapless one. Queue an Amazon search for pasties, because quite frankly I'm self-conscious about my nipples deciding to poke out while I'm wearing just a silk dress (and my boobs are the type that don't necessarily need support all of the time). There I found something even better than I expected: these self-adhesive silicone pasties called Nippies that are 100% invisible under clothes, so comfortable I barely notice I'm wearing them, and, at least so far, pretty darn reusable.

I've worn them four or five times now, washing with hand soap and water afterward every time as directed, and they're exactly what I needed! It's simple: you stick 'em onto clean, dry, lotion-free skin, and they stay put and comfy for hours, even through moderate sweat.  They've performed perfectly every time I've worn them: for day-long shopping excursions, outdoor parties, and for nights out dancing. They come in a small reusable storage box with two stiff plastic domes for them to sit on, so they'll stay perfectly intact and dust-free in your drawer and are easy to pack for travel. Oh and over 14,000 reviewers — like, five times the number of people in my high school graduating class — have rated them 5-stars on Amazon, so I know I'm not alone in my success with them!"

Get a set from Amazon for  $26.50+ (available in five shades, a lifting option, and two sizes: one that fits cups A–C and one that fits cups D+).

20. And a  breathable, sweat-proof boob tape kit  which includes a roll of the tape, four satin boob petals, and a pair of silicone pasties so you can wear all those cute tops and dresses you thought you'd never find a bra for. Ooh! Plus you'll get a carrying pouch so you can take your booby necessities with you *and* you'll get a test patch so you can be sure that it doesn't irritate your skin. 

reviewer with one boob taped and sitting up, the other without

This stuff has a strong hold so don't rip this stuff of! Use oil to completely saturate it so it soaks through the adhesive and begins to loosen. 

Promising review: "This stuff is amazing. I bought this gorgeous backless wedding dress with a plunging neckline and didn't think about how to make sure my boobs were covered and secure. The fabric was also pretty sheer. I took the dress to a seamstress who sewed pads in and did an awful job. The pads looked lumpy, they were too far down, and one was an inch lower than the other. In a panic with only a week before the wedding, I took to Amazon and landed on this tape. Y'all... This stuff is awesome. I applied it with no practice literally five minutes before my ceremony. Even with no idea of how to apply or what I was doing, I managed to secure my boobs AND they looked amazing. I'm a D cup and didn't expect much lift, but there was lift, coverage, and just enough cleavage. It stayed on during 90 degree weather and was easily removed after a quick soak in the bathtub and a little coconut oil . I will definitely use this stuff again. I feel like this tape has opened up new wardrobe possibilities for me. If you're on the fence, just get it. Saved my wedding." — MelBee

Get it from Amazon for  $9.99 .

21. A pack of 240 pimple patches  because a pimple is NOT ruining our day, babe! These patches use hydrocolloid material to help absorb all the gunk and tea tree oil and salicylic acid to speed up the pimple-healing process without picking or popping. Abracadabra, psh, what pimple? Reviewers are comparing these babies to the ever-so-popular  Starface patches . 

reviewer with several yellow pimple patches on their face

Promising reviews: "Better than Starface!!! These stick extremely well and actually pull out and absorb the gunk.  Plus, they come with soooooo many." — chey

Get a pack of 240 from Amazon for  $8.99  (available in five shapes/colors and in a six-pack).

22. A drain cover  for a warmer, deeper bath. I like my baths like I like my wine glasses: filled to the brim.

clear cover over drain

Don't worry, it doesn't block your overflow drain completely, just moves it up several inches — there's a 1-inch hole at the top of it that still allows excess water to safely drain.

Promising review: "Can I give this thing 10 gold stars? I have a four foot bathtub (so small it should be illegal) so I used to bring a towel in the tub to cover myself just to keep warm because the water was so shallow. I've used this drain cover three times and now I literally bask in my Epsom salts baths. The silence is wonderful; I used to seethe at hearing the precious bath water drip-drop down the overflow drain. Buy it, hands-down a peace preserver." — M. Smith

Get it from Amazon for $9.99 (available in nine colors).

23. A roll-on after-shave treatment  because shaving seems great — ya know, the super smooth legs you can't stop touching — but you also know the razor bumps are on their way. This'll help you prevent AND get rid of those pesky suckers. Plus, it'll do the same for ingrown hairs so you won't have to skip the beach because of a super annoying pus-filled bump.

Before and after images of underarms showing fewer razor bumps and less redness over seven days

Megababe is a woman-owned small biz founded by  Katie Sturino , an entrepreneur, body acceptance advocate, and influencer. 

Check out why former BuzzFeed Shopping editor  Katy Herman LOVES it: "This stuff is my new holy grail. I'm super prone to razor bumps and ingrown hairs on my bikini line, and I used to use "ingrown-eliminating" wipes that honestly didn't work super well. I'd pretty much decided I would endure the pain of one wax or sugar session per summer, or try using at-home wax strips, to live my smoothest skin life. But no more!!!  I've been using this for a couple of months and recently realized, wait...I legit have not had razor burn since I started using this right after shaving/getting out of the shower.  It's magic! I have had maybe two stubborn ingrowns but they weren't super swollen or painful. Megababe works wonders yet again!!!"

Promising review:  "I love everything from Megababe, and this is amazing! Got rid of shaving irritation almost immediately, and the red bumps were gone entirely in under 24 hours." — Amazon Customer

Get it from Amazon for $10.50 .

24. A jar of  Brazilian Bum Bum body cream made with a caffeine-rich guarana extract formula to help smooth and tighten skin. People are in loooove with this stuff and some reviewers even just use it as, like, a perfume. Yeah, it smells that good thanks to pistachio, salted caramel, and vanilla. 

model holding a jar of Brazilian Bum Bum Cream in a tropical beach setting

Promising review: "I bought this for the first time a few years ago to replace the body lotion I had previously used for years and years. While more expensive, I was willing to try Bum Bum cream based on the previous reviews. And it has not disappointed! Not too thick. Not sticky. And the smell is amazing. I get told many times a week how good I smell. " — Libby Solomon

Get it from Amazon for $22+  (available in three sizes).

25. A pet hair roller  that'll pick up fur and lock it inside the roller for an easy-peasy cleanup. And this reusable baby doesn't lose its effectiveness after use! If you gotta clean your couch every single day and you absolutely hate buying more and more lint rollers, add this to your cart and thank me later. 

reviewer before and after photo of a chair covered in fur and no longer covered in fur after using the pet hair roller

ChomChom Roller   is a Massachusetts-based small biz creating an eco-friendly, reusable alternative to sticky lint rollers. 

Promising review: "Where has this been all my cat-loving life? Sticky rollers work fine for clothes, but this is the only product that has ever COMPLETELY removed all the cat hair from my bed. I have a long-haired, 20-pound tabby, and if you run your hands up his back a few times and fling the hair everywhere, it looks like it's snowing — he never stops shedding no matter what I do. After using the ChomChom, I can put on a black dress and roll around on my bed and not get a single hair on me. It's absolutely amazing. Everyone is getting one for Christmas, even if they don't have a pet. I don't care; it's THAT good. " — DH

Get it from Amazon for $23.99+  (available in three colors).

26. Durable all-purpose wipes — and I mean ALLLLL purpose, like seriously. Need to wipe your hands? Grab these. Permanent marker stains? Not a match for 'em. Grease stains? Ha, these laugh in the face of grease stains. Someone let Khloe Kardashian know that she coulda used these when she was trying to get Kim's makeup stain off of her wall after the Kourt and Kim fight.

A

Note that while these are great for messes and stains, they don't disinfect.

Promising review: "These towels are awesome for so many things. They are large and very sturdy, so they work well for household cleaning. The real benefit for me, though, is having a wipe that works for things like the grill, the oven, the dashboard of my car, muddy shoes, chairs and umbrellas that go to soccer games and practices, and lawn furniture. I frequently wipe something down, rinse the towel, and wipe again. The wipes are heavy enough to go through three to four rinses and wipes and still hold up. The smell is mild and doesn't linger on my hands or what I've wiped down. I use these almost daily, so the 90-count canister lasts about three months and the last towel is never dried out when I get to it. The lid closes securely, yet is easy to open and the towels dispense easily through the opening without getting bunched up. Because the canister is heavier than most, and the lid fits well, it's easy to throw one of these in the trunk or cargo area, and I don't worry about it leaking. The canister (minus the lid) is recyclable when the towels are gone — an added bonus." — COMom

Get a pack of 90 from Amazon for $14.98 .

27. A pack of two  tongue scrapers  so your breath can be extraaaaa fresh. You won't believe how clean your tongue is and how much of a difference this baby makes in helping to keep your breath smelling great. You also may be in disbelief of how much gunk it removes. 

reviewer's tongue before and after using tongue scraper, visibly much cleaner

Basic Concepts   is a small biz that specializes in personal care products.

Promising review: "These tongue cleaners are definitely stainless steel! You can tell how great the quality is just by holding it in your hand. I use this on my tongue, and I’ve noticed an incredible difference. My tongue feels clean, and the gunk is gone. It sort of grips the tongue which helps grab any left over debris. Be sure to use it over the sink as the debris and saliva will definitely slide off your tongue. To clean, simply rinse with warm water and allow it to air dry! I deal with a lot of dry mouth, especially since I use a CPAP machine to sleep at night. This tool is   incredible at getting that bad bacteria off the tongue that shows a white cast and also creates sulfur compounds which makes your breath stink!! " — GreyElt

Get it from Amazon for  $5.87+  (available in two styles and in multipacks).

28. A jar of the TikTok-famous  Pink Stuff  that's totally worth ALL the hype. Your jaw will be on the floor once you see what this cleaner can do. This paste plays no games when it's time to get tidy.

reviewers dish with black burnt-on stains

Promising reviews: "I was heartbroken when I saw that my daughters had written on the dresser with Sharpie! I tried so many different chemicals and nothing worked! I found this on TikTok and said 'Welp let me try my luck and see if it really works!' And let me tell you I am still shocked at how amazing this product works!!!! Yayyyy, I'm so soo soo happy to see my dresser white again!!!! 😭😭😭 Thank youuuu!!!!!! I HIGHLY RECOMMEND ESPECIALLY IF YOU HAVE LITTLE KIDS IN THE HOUSE!!!! " — Gabriela Portillo Solorio

"I used it to clean a very dirty neglected bathroom sink and it worked great. Probably one of the best cleaners I have ever used . I will buy it again for tough jobs." — J–Utah

Get it from Amazon for $5.29  (available in three sizes).

29. A  piercing bump solution  so you can help stop that little bump on your nose piercing that's tripled in size in two weeks from growing annnnyyyy more. Before you totally ditch your new piercing, let this stuff help heal and reduce the size of your keloid! I know, I know, I get 'em too and yes, they can be terrifying to look at. 

Close-up of a reviewers two nose piercings with keloids on both

This product does not promise to work overnight. Apply this daily 2–3 times a day as long as needed. Be sure to be patient as the healing process takes time!

Talk to your doctor before attempting to treat your keloid on your own, and learn more about keloids from  Cleveland Clinic .

Oh! BTW, I bought this. Last year I got a dermal piercing on my chest and since literally just about every piercing I've ever gotten has grown a keloid on it, I should have known my dermal would eventually, too. I got the piercing in February of 2023 and around May I noticed a nasty, stubborn little bump making a guest appearance on my piercing. 🙄 I had written about this stuff a few times so the light bulb went off and I immediately bought it. I consistently used it twice a day and it gradually disappeared, literally like magic within a month. Keloids are a serious nightmare and I'm so glad that I found this stuff. I even *accidentally* ripped it out in November and immediately grabbed this to prevent a keloid from forming cuz I just knew it'd get infected. To my surprise, no keloid, nada. This stuff always gets rid of keloids for me, it's such a life saver. You do have to be patient and consistent, this is NOT an overnight miracle but it's worth it. I also suggest that you continue to use it for like another week or two even after your keloid goes away juuust in case it tries to sneak back into your life. 

Get it from Amazon for $12.85+  (also available in multipacks).

30. A 20-pack of multi-surface eraser sponges  that'll make grease, grime, and scuffs disappear quicker than Thanos made half the population vanish in  Infinity War.  Walls, floors, tubs, sinks, even cars and shoes, this thing tackles so many surfaces quickly and easily without needing to put a bunch of elbow grease into a scrub sesh. 

A reviewer holding the sponge up in front of a table covered in permanent marker scribbles

Promising review: "Got kids or a messy spouse? You need these! I go through a lot of Mr. Clean erasers, so much that it was easier to cut them in half first because the centers are always the first to go. Then when I found this magnificent pack, I had to try it and I'm glad I did. They are smaller and fit my hand better but also thicker. They seem to work better with less effort which is awesome! Worked great on a Crystal Light counter stain, a bathroom rust ring, a drain circle, and scuff marks on sinks, crayons on walls, Sharpie on binder, a ring around the door knob from greasy mechanic hands on my new unpainted white door, and even the spot high up on the wall next to the toilet where one would lean his hand because it might get out of control if he doesn't have that extra stability? Anyway you get the point; they are awesome." — Sherry

Get 20 sponges from Amazon for $13.95 .

31. A portable digital luggage scale  because every time you go to the airport your luggage is a pound overweight and you have to pay those outrageous baggage fees. Hook this bb to your luggage handle, lift it up, and the display will let you know how many more outfits you can cram into your suitcase without going over the weight limit. 

reviewer holding digital luggage scale showing a reading of 21.5

You can switch between pound and kilogram measurements. 

And check it out on  TikTok !

Promising reviews: "When checking a bag, you always want to know the weight so you don't get charged extra. I was super nervous when this scale weighed a bag at almost 49 pounds knowing that the weight limit was 50 pounds and scales can vary. Was holding my breath when it was put on the scale at the airport and the scale came up as 49 pounds! Relieved and thrilled that this luggage scale was accurate! " — Sky & Nic

"This was a great investment. No more guessing what our suitcases weight before getting to the airport. Found the accuracy to be very spot-on. If you check a bag on your travels, you need one of these!" — pax

Get it from Amazon for $9.34+  (available in seven colors/styles and in a two-pack). 

32. A genius  silicone bottle system  that'll help prevent your baby from ingesting air and avoid painful gas, colic, and burps. How? Because each of these lil' cases comes with a silicone pouch that collapses as your babe drinks! Anddd, when your tot turns into a toddler, the mouth can be changed out for a sippy cup top or straw lid so these'll grow with your kiddo. 

reviewer's three black, cream, and orange speckled silicone bottles

And that's not all! These will also be so much easier to travel with because they scrunch down so litto, they fit into these cute little  storage buns !

Learn more about it on TikTok ! 

Promising reviews:  "I breastfeed my baby and started off using Dr. Brown bottles but they leaked all the time. I tried many more that had a good nipple for breastfed babies and my baby did not like any of them. I came across these from another mama on TikTok and decided to try them. Needless to say I’ll never go to another bottle. They’re easy to assemble, clean and use." — whitney cline

"Boon bottles are an absolute treasure! They are so easy to assemble and clean. They travel well. They’re lightweight. They also change into sippy cups and straw cups to help grow with your baby into the toddler stage." — Alana M.

Get a pack of three 8-ounce bottles from Amazon for $19.98+ (available in two sizes and nine color combinations). 

33. A "Magic Tap" automatic drink dispenser  — a battery-operated, spill-proof way for your kiddos to get their own drinks. It slides into jugs of water, juice, and milk in your fridge so you no longer have to be interrupted a billion times a day to get them a drink. Plus you won't have to clean up a jug of spilled apple juice your child dropped. Yay for independence! 

Two bottles of milk with magic tap dispensers on them

Check out a  TikTok of the drink dispenser  in action. 

Promising review: "Super happy with this purchase. Our two little ones (5 and 3 years old) can now easily fill their own drinks. We also purchased a dual cereal dispenser from Amazon so now the kids can get their own breakfast cereal with milk!" — April M. Ramos

Get it from Amazon for $18.49+  (available in four colors and in a three-pack). 

34. Barebell's Protein Bars that taste like literal freakin' candy and are packed with a whole lotta protein. Since you're trying to up your protein, cut down on the sweets, and are constantly on the move, throw a couple of these in your bag for moments when hunger hits hard. And I knowwww, protein bars usually have a particular taste, but these I can promise you do not — and I freakin' HATE that aftertaste from other bars. 

Jordan Grigsby holding protein bar

So recently, I've been looking for alternatives to all my fave sweets (dentists aren't fun) but I swear, y'all lie on TikTok. I had tried all the protein swaps that I saw on TikTok and they were all disgusting. I bought those Fiber One brownies, and yuck, $10 down the drain, I threw 'em all out. But I've been determined for so long to find a protein bar that's actually tasty so when I came across these, I decided, what the heck, I'll try 'em. And oh, am I glad I did. When I tried them, I was so surprised that the caramel cashew one tasted like a Twix. It's soooo good and no protein-y aftertaste (I hate that taste)! I was mad I only bought two at Trader Joe's so I ordered more immediately on Amazon. I don't like the cookies and cream one, I will say that. But honey that caramel cashew! 🤤  I don't need candy or sweets at all. And get this, only one gram of sugar and 20!!! grams of protein in the caramel cashew one. These are my current obsession and I'm so happy I finally found an option that actually tastes good. And not like, good for a protein bar, these are just plain yummy. I wanna try 'em all.

Get a pack of 12 from Amazon for $26.94+  (available in 14 flavors and in a 24-pack). 

You, after seeing how much gunk the nose pore patches pulled out:

Reviews in this post have been edited for length and clarity.

Share This Article

Harris' border work was on 'root causes' of migration; she wasn't in charge | Fact check

solving an assignment problem

The claim: Kamala Harris was 'put in charge of the border'

A July 21 Instagram post ( direct link , archive link ) by Donald Trump Jr. blames Vice President Kamala Harris for the country's immigration problems.

"She was put in charge of the border and we saw the worst invasion of illegals in our history!!!" reads part of the post, which is a screenshot of a post from X, formerly Twitter.

Similar posts on Threads have described Harris as the Biden administration's "border czar."

The Instagram post was liked more than 200,000 times in a day.

More from the Fact-Check Team: How we pick and research claims | Email newsletter | Facebook page

Our rating: False

The post exaggerates the vice president's role in addressing migration at the southern border. Harris was never put in charge of the border or made "border czar," immigration experts said. President Joe Biden tasked Harris with leading the administration's diplomatic efforts addressing the "root causes" of migration in El Salvador, Guatemala and Honduras.

Harris led effort addressing 'root causes' of migration in Central America

Early in his presidency, Biden tasked Harris with addressing the “root causes” of migration in Central America. The assignment came out of an executive order Biden issued in February 2021 that sought to reduce migration from the Northern Triangle countries of El Salvador, Guatemala and Honduras, where gang violence, trafficking networks and economic insecurity have caused people to flee.

But the vice president’s role was more limited than being put in charge of the southern border, or being named a so-called “border czar,” immigration experts said.

"VP Harris was never made the border czar or charged with managing the border," Andrew Salee , president of the Migration Policy Institute , said in an email. "That role has always been held by the secretary of Homeland Security . She was asked to be the chief diplomatic officer with Central American countries at a time when most of the increase in unauthorized immigration was coming from three countries in Central America and to help lead a private investment strategy in the region."

Homeland Security Secretary Alejandro Mayorkas himself noted the different responsibilities between himself and Harris in June 2021 comments at the El Paso, Texas, border.

"The vice president is leading our nation’s efforts to address the root causes – that fundamental question of why people leave their homes," Mayorkas said. "And it is my responsibility as the secretary of Homeland Security to address the security and management of our border."

In March 2021, Biden announced Harris would lead the administration's diplomatic efforts with the Northern Triangle countries to stem migration to the U.S. southern border and work with these nations to enhance migration enforcement at their borders. Harris said at the time that the administration "must address the root causes that – that cause people to make the trek, as the president has described, to come here."

Aaron Reichlin-Melnick , policy director at the American Immigration Council , said the "root causes" work Harris took on is distinct from border policy because it focuses on different problems and targets.

"Border policy focuses on individuals who have already made the decision to leave home and have made it to the U.S.-Mexico border and aims to either prevent them or to quickly process them for humanitarian relief or deportation once they cross," Reichlin-Melnick said in an email. "By contrast, 'root causes' policy focuses on individuals who have not left their homes yet, and aims to convince them to stay in their home countries either through economic development – which discourages migration for economic opportunities – or through reduction of violence and persecution that forces people to seek protection elsewhere."

The White House released the administration's " Root Causes Strategy " in July 2021. Its implementation was ongoing as of March when the vice president and the Partnership for Central America , a non-governmental organization, jointly announced $1 billion in new private-sector commitments to address the underlying conditions leading to migration in Guatemala, El Salvador and Honduras. The public-private partnership has generated more than $5.2 billion since May 2021 , the White House said.

Fact check : Joe Biden dropped out of presidential race but is finishing term

Elina Treyger , a senior political scientist at the RAND Corporation whose research includes migration and immigration enforcement, also said Harris' diplomatic role with the Central American countries "is in no way a 'border czar'-like position." Treyger said border policy involves many other issues such as enforcement policies, how to process migrants expressing fear of prosecution or torture and how to allocate resources at the border.

U.S. Border Patrol encounters with migrants at the southern border have soared under the Biden administration . Illegal crossings at the U.S.-Mexico border hit a record high of 2.2 million in 2022, and the number of people taken into custody by U.S. Border Patrol has reached the highest levels in the agency's history under Biden, the Washington Post reported .

After a bipartisan border security bill failed to advance in Congress, Biden issued a directive in June to turn away migrants who do not enter the country through legal ports of entry when the number of crossings is high.

Trump, the son of former President Donald Trump, did not immediately respond to a request for comment.

Our fact-check sources:

  • Aaron Reichlin-Melnick , July 22, Email exchange with USA TODAY
  • Andrew Salee , July 22, Email exchange with USA TODAY
  • Elina Treyger , July 22, Email Exchange with USA TODAY
  • White House, Feb. 2, 2021, Executive Order on Creating a Comprehensive Regional Framework to Address the Causes of Migration, to Manage Migration Throughout North and Central America, and to Provide Safe and Orderly Processing of Asylum Seekers at the United States Border
  • White House, Feb. 6, 2023, FACT SHEET: Vice President Harris Announces Public-Private Partnership Has Generated More than $4.2 Billion in Private Sector Commitments for Northern Central America
  • White House, March 24, 2021, Remarks by President Biden and Vice President Harris in a Meeting on Immigration
  • White House, June 25, 2021, Remarks by Vice President Harris, Secretary of Homeland Security Mayorkas, Chairman Durbin, and Representative Escobar in Press Gaggle
  • White House, July 29, 2021, FACT SHEET: Strategy to Address the Root Causes of Migration in Central America
  • White House, March 25, FACT SHEET: Vice President Harris Announces Public-Private Partnership Has Generated More Than $5.2 Billion in Private Sector Commitments for Northern Central America
  • White House, July 2021, U.S. Strategy for Addressing the Root Causes of Migration in Central America
  • Department of State, Aug. 1, 2023, Central America Forward
  • The Washington Post, Feb. 11, Trump vs. Biden on immigration: 12 charts comparing U.S. border security
  • U.S. Embassy in Honduras, March 25, FACT SHEET: UPDATE ON THE U.S. STRATEGY FOR ADDRESSING THE ROOT CAUSES OF MIGRATION IN CENTRAL AMERICA
  • USA TODAY, July 17, Border security takes center stage at RNC. Here's the actual data under Trump, Biden

Thank you for supporting our journalism. You can subscribe to our print edition, ad-free app or e-newspaper here .

USA TODAY is a verified signatory of the International Fact-Checking Network, which requires a demonstrated commitment to nonpartisanship, fairness and transparency. Our fact-check work is supported in part by a grant from Meta .

IMAGES

  1. 7 Most Effective Ways For How To Solve Assignment Problems

    solving an assignment problem

  2. Solution of Assignment Problems

    solving an assignment problem

  3. 7 steps in problem solving

    solving an assignment problem

  4. 7 Step Problem Solving Process

    solving an assignment problem

  5. 7 Steps to Improve Your Problem Solving Skills

    solving an assignment problem

  6. Csy1020 problem solving assignment briefa

    solving an assignment problem

VIDEO

  1. September 16, 2021 Assignment problem| Part 2

  2. Assignment Problem ( Brute force method) Design and Analysis of Algorithm

  3. Assignment problem

  4. Solving Assignment Problem with Scipy, NetworkX, and OR-Tools Python API's

  5. No.02 Minimization assignment problem||OR(TYBMS) ||Optimal Cost

  6. ASSIGNMENT PROBLEM: meaning, formulation, Hungarian method

COMMENTS

  1. Assignment problem

    The assignment problem is a fundamental combinatorial optimization problem. In its most general form, the problem is as follows: ... This is an unbalanced assignment problem. One way to solve it is to invent a fourth dummy task, perhaps called "sitting still doing nothing", with a cost of 0 for the taxi assigned to it. This reduces the problem ...

  2. Solving an Assignment Problem

    Solving an Assignment Problem Stay organized with collections Save and categorize content based on your preferences. This section presents an example that shows how to solve an assignment problem using both the MIP solver and the CP-SAT solver. Example. In the example there are five workers (numbered 0-4) and four tasks (numbered 0-3). ...

  3. How to Solve the Assignment Problem: A Complete Guide

    Here, we will focus on the steps involved in solving the assignment problem using the Hungarian method, which is the most commonly used and efficient method. Step 1: Set up the cost matrix. The first step in solving the assignment problem is to set up the cost matrix, which represents the cost of assigning a task to an agent.

  4. Hungarian Method

    The Hungarian method is a simple way to solve assignment problems. Let us first discuss the assignment problems before moving on to learning the Hungarian method. What is an Assignment Problem? A transportation problem is a type of assignment problem. The goal is to allocate an equal amount of resources to the same number of activities.

  5. Assignment

    The total cost of the assignment is 70 + 55 + 95 + 45 = 265. The next section shows how solve an assignment problem, using both the MIP solver and the CP-SAT solver. Other tools for solving assignment problems. OR-Tools also provides a couple of other tools for solving assignment problems, which can be faster than the MIP or CP solvers:

  6. Hungarian Algorithm for Assignment Problem

    The Quadratic Assignment Problem (QAP) is an optimization problem that deals with assigning a set of facilities to a set of locations, considering the pairwise distances and flows between them. ... If you have ever tried to create a program for solving Sudoku, you might have come across the Exact Cover problem. In this article, we will discuss ...

  7. Job Assignment Problem using Branch And Bound

    Solution 1: Brute Force. We generate n! possible job assignments and for each such assignment, we compute its total cost and return the less expensive assignment. Since the solution is a permutation of the n jobs, its complexity is O (n!). Solution 2: Hungarian Algorithm. The optimal assignment can be found using the Hungarian algorithm.

  8. The Assignment Problem

    We can solve the assignment problem by: Find all maximum matchings. Sum the cost of the edges of each maximum matching. Select the maximum matching with the lowest possible cost. Obviously, we want something better :-) 0,1 Integer Program of an assignment problem

  9. Solving Assignment Problem using Linear Programming in Python

    In this step, we will solve the LP problem by calling solve () method. We can print the final value by using the following for loop. From the above results, we can infer that Worker-1 will be assigned to Job-1, Worker-2 will be assigned to job-3, Worker-3 will be assigned to Job-2, and Worker-4 will assign with job-4.

  10. Assignment Problem and Hungarian Algorithm

    The assignment problem is a special case of the transportation problem, which in turn is a special case of the min-cost flow problem, so it can be solved using algorithms that solve the more general cases. Also, our problem is a special case of binary integer linear programming problem (which is NP-hard). But, due to the specifics of the ...

  11. PDF Lecture 8: Assignment Algorithms

    Examples of assignment problems VUGRAPH 6 o × assignment or bipartite matching ~minimum cost network flow problem … (Lecture 10) ⇒Can use RELAX to solve assignment problem (Lecture 10) ⇒In this particular case, even 𝜖-relax works as well as RELAX even on sequential computers (Lecture 10) bipartite matching 2n nodes MCNF 2n + 2 nodes ...

  12. Successful Strategies for Solving Problems on Assignments

    Analysis Stage. Read the problem carefully at least twice, aloud if possible, then restate the problem in your own words. Write down all the information that you know in the problem and separate, if necessary, the "givens" from the "constraints.". Think about what can be done with the information that is given.

  13. Assignment Problem: Meaning, Methods and Variations

    After reading this article you will learn about:- 1. Meaning of Assignment Problem 2. Definition of Assignment Problem 3. Mathematical Formulation 4. Hungarian Method 5. Variations. Meaning of Assignment Problem: An assignment problem is a particular case of transportation problem where the objective is to assign a number of resources to an equal number of activities so as to minimise total ...

  14. Solve the assignment problem online

    Solve an assignment problem online. Fill in the cost matrix of an assignment problem and click on 'Solve'. The optimal assignment will be determined and a step by step explanation of the hungarian algorithm will be given. Fill in the cost matrix (random cost matrix):

  15. Assignment Problem, Maximization Example, Hungarian Method

    The Hungarian Method can also solve such assignment problems, as it is easy to obtain an equivalent minimization problem by converting every number in the matrix to an opportunity loss. The conversion is accomplished by subtracting all the elements of the given matrix from the highest element. It turns out that minimizing opportunity loss ...

  16. PDF 17 The Assignment Problem

    Chapter 17 The Assignment Problem 301 These problems are all examples of problems which may be solved as as-signment problems. In this chapter we will derive an efficient algorithm for solving assignment problems, and then discuss several problems which may be solved using this algorithm. The assignment problem will then be described in terms ...

  17. PDF 7.13 Assignment Problem

    Enhance accuracy of solving linear systems of equations. 4 Bipartite matching. Can solve via reduction to max flow. Flow. During Ford-Fulkerson, all capacities and flows are 0/1. Flow corresponds to edges in a matching M. Residual graph G M simplifies to:! If (x, y) " M, then (x, y) is in GM.! If (x, y) # M, the (y, x) is in GM. Augmenting path ...

  18. PDF Chapter8 ASSIGNMENT PROBLEM

    Connection Between Transportation and Assignment Problem An assignment problem is a special case of transportation problem in which m = n, all a i and b j are unity and each is limited to either 0 or 1. Hungarian Method for Solving an Assignment Problem 1. Prepare a square n n matrix. If not, make it square by adding suitable number of dummy ...

  19. Assignment Problem in Linear Programming : Introduction and Assignment

    Any basic feasible solution of an Assignment problem consists (2n - 1) variables of which the (n - 1) variables are zero, n is number of jobs or number of facilities. Due to this high degeneracy, if we solve the problem by usual transportation method, it will be a complex and time consuming work. Thus a separate technique is derived for it.

  20. Hungarian Algorithm for Assignment Problem

    The Quadratic Assignment Problem (QAP) is an optimization problem that deals with assigning a set of facilities to a set of locations, considering the pairwise distances and flows between them. The problem is to find the assignment that minimizes the total cost or distance, taking into account both the distances and the flows. The distance matrix a

  21. 7 Most Effective Ways For How To Solve Assignment Problems

    Get the work done in short periods. Go hard on an assignment, then take a short break to stretch and walk. To keep going, it will re-energize your mind and your body. This strategy will help you solve your assignment problems quickly and help you maintain your assignment's quality. Try to do your assignment for 1 hour and then take a 10 ...

  22. Assignment Problem in Excel (In Easy Steps)

    The model we are going to solve looks as follows in Excel. 1. To formulate this assignment problem, answer the following three questions. a. What are the decisions to be made? For this problem, we need Excel to find out which person to assign to which task (Yes=1, No=0). For example, if we assign Person 1 to Task 1, cell C10 equals 1. If not ...

  23. The Assignment Problem, a NumPy function?

    6. No, NumPy contains no such function. Combinatorial optimization is outside of NumPy's scope. It may be possible to do it with one of the optimizers in scipy.optimize but I have a feeling that the constraints may not be of the right form. NetworkX probably also includes algorithms for assignment problems.

  24. Problem-Solving Products That Understood The Assignment

    34 Problem-Solving Products That Clearly Understood The Assignment. The Nippies pasties get an A+ for *actually* allowing braless moments and *seriously* concealing nipples. They're totally top of ...

  25. No, Kamala Harris wasn't put in charge of the U.S. border

    The assignment came out of an executive order Biden issued in February ... said the "root causes" work Harris took on is distinct from border policy because it focuses on different problems and ...

  26. Harris' immigration work comes under scrutiny as campaign takes ...

    As a border crisis unfolded only months into Joe Biden's presidency, he looked to his vice president to help solve an intractable issue: migration. It seemed like a no-win political assignment ...