I ran into a classroom problem yesterday (business oriented class, not computer science) and I found it interesting from an algorithmic perspective.
The problem goes something like this:
Assume there is a shop floor with N different rooms, and you have N different departments that need to go in those rooms. The departments and the rooms are all the same size, so any department could go in any room. There is a known travel distance from each room to each other room. There is also a known amount of trips necessary from one department to another (trips are counted the same regardless which room they originate from, so a trip from A to B is equivalent to a trip from B to A). Given those inputs, determine a layout of departments into rooms which minimizes travel time.
What is the best way to approach this problem algorithmically? Is there already a particular algorithm or class of algorithms designed to solve this type of problem? Does this type of problem have a name in computer science?
I am not looking for you to design an algorithm to solve this, although feel free to do so if you would like. I’m wondering if this is a problem space that has already been well defined and studied algorithmically and if so get some links to research further. I can see a lot of different data structures and algorithms that might apply to this and I’m curious which approach would be “best”.
And don’t worry, you are not doing my homework for me. This is not a homework problem per se, as this is a business course and we were simply discussing the concepts and not trying to solve the problem algorithmically.
3
This is called Facility Location Problem, which is a NP-hard problem. Typical algorithmic solution to such problem is using approximation algorithms.
1
A pragmatic solution:
1) distribute all departments at random (put the department names in a box and pull out combining with the numbers of rooms);
2) give to all employees new shoes
3) measure the shoes consumption (outsoles and heels)after two weeks
4) put the departments whose clerks’ shoes show major consumption directly nearby
5) repeat this method n times (n= the number of departments)
6) after n trials you will measure the average of shoes consumption and know which is the best distribution of departments.
But if I were in your shoes I would make this trial as a mental experience with the help of algorithms (you have just to formalize this procedure, if you are good at math you already guess how … if not find out)
1
Simplest way is: get the civil layout of the building, mark the department locations pictorially using a graph sheet (best way is to use Auto CAD or any other 2D/3D software). You then have to assess how much space you have and how you want to place the departments. From the sheet, you can get the travel distances between departments.