Elementary Investigation of Transportation Problems
Title | Elementary Investigation of Transportation Problems |
Publication Type | Journal Article |
Year of Publication | 2009 |
Authors | Schmidt, E. |
Journal | Acta Polytechnica Hungarica |
Volume | 6 |
Issue | 2 |
Pagination | 17 |
Date Published | 09/2009 |
Publisher | Budapest Tech |
Publication Language | English |
ISSN Number | 1785-8860 |
Keywords | bases, linear algebra, transportation problem |
Full Text |
Elementary Investigation of Transportation Problems Schmidt Edit Schmidt.edit@freemail.hu Budapesti Műszaki Főiskola, KVK MTI, Budapest Abstract: For students learning the simplex method of linear programming it is a well-beloved occasion to solve the so-called transportation problem by the method of distribution. This method is simple to calculate and easy to follow. The simple way of solution suggests that its correctness may be proven by basic means. This paper has two main aims. One of them is to present the problem and to solve it by basic means. The other one is the analysis of the so-called array-bases defined for this reason. In case of a transportation problem m stores and n destinations are given, and the goods have to be taken from the stores to the destinations such that the cost of transporting has to be minimal. The unit costs of the transportation are given by an array. In the solution some routes (elements of the array) are chosen and the number of units to transport there is given. It will be proven that the routes for the optimal transportation compose a basis, and the solution is also achieved by those through the searches. (The basis of an Keywords: transportation problem, linear algebra, bases 1 BasisWhen solving a transportation problem, a rectangular array of entries (elements) of size m×n (an m×n matrix) is used. In the course of setting up the initial program, we assign certain elements, then change some of the assigned elements by specified rules. The algorithm is a special, graphic version of the simplex method. We can thus find an explanation of the steps to be made by studying the simplex method. ([1], [2].) The rules, however, can be proved without the “simplex background”. The purpose of the present paper is to show this elementary proof. The statements in the first chapter do not even need the definition of transportation problem (they make sense in themselves), but they seem to be useful in the following chapters. First of all, let us define some concepts. Definition 1.1: Two entries of an array are row-adjacent [or column-adjacent], if they are in the same row [or column]. In both cases they are adjacent. Definition 1.2: A loop is a closed chain such that Before the following statement we note that a closed chain can be specified by listing its elements in several ways, and any of its elements can be chosen as first. The lemma will be used in the present chapter. Lemma 1.3: Suppose that a closed chain is given such that its first element occurs only once in the chain, the second element is row-adjacent [column-adjacent], the last element is column-adjacent [row-adjacent] to it. Now by omitting some other elements of the chain, it can be reduced to a loop. Proof: Let us follow the next procedure. Go along the closed chain three times (always starting with the first element), and omit some elements every time according to rules I, II and III. When solving a transportation problem by distribution, we assign some routes to the initial program, and perform the transportation along these routes. The respective entries of the matrix are called tied elements. Thereinafter we are going to formulate and prove statements concerning tied elements. Let Definition 1.4: A basis of an m×n array is Lemma 1.5: Every array contains a basis. Proof: We prove by induction. Definition 1.6: The critical number of an m×n array is The basic properties of bases will be declared in the next lemma; it will be referred to later in this paper. Lemma 1.7: An m×n array and one of its bases are given. They have the following properties: Proof: 1) We prove first that there is such a row [column] which contains at most one tied element. Sum up the tied elements in every row and column. As any element occurs exactly in one row and in one column, the total will be The question may arise how much a basis is characterized by these properties, e.g. whether they are definitive or not. Property 1 is not sufficient for q elements to form a basis. (It is easy to find a counter-example: take the elements with the following indices of a Definition 1.8: In an array, a set of assigned elements is dependent, if a chain can be drawn between any two elements; it is spanning if every row and column contain a member of the set. Theorem 1.9: If a set of q assigned elements of an m×n array is dependent and spanning, then these elements form a basis. Proof: In an array of size 2×2 (i.e. in case of Thus the condition given in the statement is necessary and sufficient for q elements to form a basis in the array. (The “loop-free” condition formulated in the definition is difficult to check.) The “spanning” property is very easy to check, and for checking the “dependent” property, notice that it is sufficient to reach all tied elements along chains starting from an arbitrary element. As neither of the two properties can be deduced from the other, the basis could be defined by them. A basis of an m×n array is a spanning and dependent set of Using the two properties of a basis formulated in lemma 1.7 it is easy to prove an important theorem of this chapter, which will be applied when finding the optimal program by necessary changes. Theorem 1.10: An m×n array with a basis is given. There exists one and only one loop along tied elements starting from any free (i.e. not tied) element. Proof: Take an arbitrary free element. Both its row and column contain a tied element according to property 1. (If there are more than one, choose any of the adjacent tied elements for the time being.) Take the chain connecting these two tied elements and close it with the free element. According to lemma 1.3, this closed chain can be reduced to a loop through the free element. The above theorem and its two following consequences are to be applied in the third chapter. Lemma 1.11: If at least m+n elements are given in an m×n array, then they must contain a loop. Proof: Let us take the tied elements in an arbitrary order. At each step it is to be checked whether the set of elements already taken contains a loop. If it does, the proof is done, otherwise let us go on, until the number of elements is Lemma 1.12: If there are less then Proof: The proof is done by induction, applied to the critical number. In case of a 2×2 array (i.e. when In connection with bases it is important to note that in an m×n array there is a finite number of different bases, however their number can be quite large in case of big arrays. It is because the number of selections of
and not all of the selections are loop-free. Hereunder we will use only the fact that the number of bases is bounded from above. (The precise number is given in the appendix.) 2 The initial programIn the followings the definition of a transportation problem is needed. Definition 2.1: In case of a transportation problem m stores and n destinations are given, and the goods have to be taken from the stores to the destinations such that the cost of transporting has to be minimal. The stocks of the stores, the demands of the destinations and the cost of the routes for a unit quantity of goods are known. Suppose the followings: Formally the unit costs of the transportation (from here: transportation costs) are given by an m×n array, where rows represent stores, columns represent destinations. Stocks are written at the end of the rows, demands are written at the bottom of the columns. This set of data is called an m×n “transportation table”. In the solution the routes along which the transportation is made are framed, and the numbers of deliverable units are written above them. Definition 2.2: In a transportation problem an m×n matrix is given whose entries are non-negative real numbers; there are also given positive numbers corresponding to each row and column (the “values” of the rows and columns), where the sum of the values of the rows is equal to the sum of the values of the columns. Let a real number be corresponded to each entry of the matrix such that Out of the conditions 1) is called restrictive condition, 2) is called non-negativity condition, 3) is called optimising condition. Correspondences satisfying the first two conditions are called possible solutions; among them optimal solution is one that satisfies the third condition. The sum of the products drafted in condition 3 is called objective function; the problem involves the minimization of this. The following theorem shows the connection between bases and possible solutions. The nonzero elements of the possible solution to be constructed (in some cases together with some additional zeros) make up a basis. Theorem 2.3: Every transportation problem has a possible solution. Proof: Let us construct a possible solution according to the followings: make an arbitrary element tied and correspond the value of its row or column to it, whichever is smaller, then omit the row [or column] whose value was corresponded. (If the two mentioned numbers are equal, then correspond this value to the tied element, and omit either its row or column, but only one of them.) We remark that it can happen in the above construction that 0 is corresponded to a tied element so it would turn to free. (This can happen if a common element of a row and column whose values are equal, is made tied. In this case a 0-valued row or column will remain.) Because of reasons detailed later these cases are called degenerated, and exceptionally 0-valued tied elements are allowed. To solve a transportation problem by distribution, first an initial program is set up, which is improved step by step in order to find the optimal solution. It can be seen in the above proof that a possible solution built on a basis can be found very easily. The fact, that the algorithm allows much freedom, can be used to construct an initial program with a small-valued objective function so less improvement is necessary. Let the (arbitrarily chosen) tied element be the least possible in the first approach. 3 Steps of ImprovementLemma 3.1: Suppose that a transportation problem has a possible solution such that the tied elements contain a loop. Now the solution can be reprogrammed such that the value of its objective function does not increase (in general it decreases). Proof: Only values belonging to the 2k-element-loop will be modified according to the following algorithm. Start from an arbitrary element and go round the loop, for instance in the direction of the chosen element’s row-adjacent. Let the entries of the array (i.e. the transportation costs) be:
where A is the contribution of the other tied elements to the objective function.
As which is less then the original one. There are two important applications of the above lemma. First it will be shown that it is sufficient to search for the optimal solution among possible solutions built on a basis. The next statement points at this fact. Theorem 3.2: Suppose that there is a possible solution of a transportation problem, which is not built on a basis. Now another possible solution can be constructed from this, such that it is built on a basis and the value of its objective function is not greater than the original. Proof: If there is a loop among the tied elements then one (or more) of its elements can be made free with the above procedure. (The actual value of t has to be chosen always as the minimum.) This has to be continued until there is no more loop. These steps do not increase the value of the objective function. According to lemmas 1.11 and 1.12, the number of the remaining loop-free tied elements is at most the critical number of the array and can be completed to form a basis. Let us correspond 0 to the new tied element (if they exist) but consider them as tied. With this the value of the objective function does not change. Thus a possible solution built on a basis is constructed, whose objective function-value is not greater than the original. We see that it is practical to allow such tied elements whose corresponded values are 0, so it is sufficient to examine the possible solutions built on a basis. It cannot be excluded that the optimal solution itself is degenerated. From now on every possible solution will be built on a basis in this paper, otherwise we will mention. 4 The Optimal ProgramIf a possible solution is given, we should find a unique loop along tied elements for any free element, then after relation-check, the possible decrease of the objective function should be calculated. Finally the free element should be chosen and taken in the program with which the decrease is the greatest. However, in case of arrays of big size it is a long and tedious work to find the mentioned loop. This problem is simplified by the method of potentials. Definition 4.1: Let an m×n transportation table be given with a possible solution. Correspond a value u to any row and a value v to any column. Values In the above definition the indices are not necessarily the same as the indices of the matrix. Potentials can belong to rows and columns, but (as it is seen in the following statement) also to tied elements. Lemma 4.2: Potentials can be constructed for every possible solution. Proof: It is going to be proved that starting from any tied element, potentials can be assigned. As shown in the first chapter, there is a chain between any two tied elements, thus any tied element can be reached along tied elements from the starting one (from the “root”). These chains starting from the root form a tree, with main-branches and possibly side-branches. Choose the potentials of the root (i.e. of its row and column) arbitrarily, according to the definition. First, assign the missing row- or column potentials to all elements along one of the main-branches such that it satisfies the conditions described in the definition. (One of them already exists, namely the one from where we got to the element.) This will be the potential of the given row or column. An element which has not come up yet, cannot have both of its potentials assigned, because this would mean a closed chain along tied elements. If we have gone along a branch, continue along another one from the connecting point of the previous one. Thus, finally every tied element is reached. As a result, a potential is assigned to every row and column, as the root gets two, every other element gets one, a total of Now let us see the use of potentials. It has been stated that a free element can be taken in, if and only if
Thus
Using the above equalities
Notice that the free element with transportation cost Checking whether a possible solution can be improved has to be done as follows. Give an arbitrary potential-assignment of the program. This can be done by choosing the row-potential of an arbitrary tied element as 0, and the others are distributed according to the algorithm described in the proof. After this, construct an What guarantees that by basic steps of distribution, such an array can be obtained which cannot be further improved? Let us settle that in the stage of the algorithm when an optimal array is looked for, the existing program is only changed if the objective function-value of the program is less then the previous. (Finding programs with the same objective function-value has significance only when the program has to be modified, i.e. when alternative optimal programs are looked for.) Thus it can be stated that every array is different from the others (as their objective function-values are different). As an array has a finite number of different bases, it is not possible to construct infinite different possible solutions (built on bases), i.e. the improving procedure ends in finite steps. It is still to be proved that a program which cannot be improved locally is globally optimal. As much freedom is left when setting up the initial program, and the further progress is not unique, it is not trivial that the optimal solution is obtained when there is no more chance to improve. Is not it possible that there is an entirely different program with lower cost? (We have seen that in case of arrays there are quite a many bases.) Theorem 4.3: If a possible solution cannot be improved by taking in any of the free elements then it is optimal. The short summary of the proof is the following. Let a possible solution (built on a basis) be given. Possible solutions are called adjacent if they are obtained from each other by changing a free element (irrespectively of improvement). We shall construct such possible solutions (not built on a basis) that are in some sense “close” to the given program. We mean by “closeness” that the delivered quantities are not very different in the two programs. We shall prove that if the adjacent solutions are all worse (or not better) than the initial program then none of the “close” programs can be better with respect to cost reduction. Thus we shall get to a contradiction, because it will be proved as well, that if there is a better solution than the initial one then there is a better “close” program too. The appropriate “close” programs will be constructed by combining the original program and one or more other solutions. The following lemma, which is significant itself too, will be used in the proof. Lemma 4.4: If values programmed on free elements of an arbitrary basis are equal in two possible solutions of a transportation problem then values programmed on tied elements of this basis are equal too (i.e. the two programs are identical). Proof: As seen in the first chapter (lemma 1.7), there exists such a row [or column] which contains exactly one tied element, thus the value programmed on this element is determined by the row- [column-] sum. By omitting this row [column] the procedure can be continued similarly until all tied elements are reached. Thus if the above condition is satisfied, then all values programmed on tied elements in the basis are uniquely determined. Let us now prove the theorem for the optimal program. Proof (of theorem 4.3): Denote the programs by block capitals (A, P etc.), and their total transportation cost by z(P). Factors λ are all non-negative. Let λP be the program which is obtained by multiplying every quantity in P by λ; let P+R be the program which is obtained by adding the appropriate delivered quantities. It is obvious that in the first case the row-sums, the column-sums and the total transportation cost will be the λ-multiple of the original; in the second case these quantities will be added. Because of the fact concerning row- and column-sums, if
Let P be a possible solution that cannot be improved by distribution. Let the adjacent programs be (according to an arbitrary order of free elements):
What are the deliverable quantities of this possible solution A? We will use the fact that an arbitrary free element in program P is free in all of its adjacent programs as well, except in the adjacent program which is obtained by taking this element in. Thus values programmed on the original free elements in A are
Values programmed on the original free elements in B are
(For the time being we suppose that the divisions are sensible, i.e. Here we remark and interesting but not trivial observation, that has a practical background as well. Suppose that stocks and demands are integers in the transportation problem. This is quite natural when solid goods are transported in loads or when wagons have to be directed to other stations. In this case the delivered quantities of the optimal program are required, and will actually be received, as integers. This is explained by the fact that during setting up the initial program and during the improvement, a minimum of integers are looked for, or integers are added to, subtracted from, each other; thus integers, as results of these operations, are corresponded to the routes. As a result of these steps, the optimal program is obtained. 5 SupplementsIn order to make the presentation of transportation problems complete, two more methods need to be shown, though these do not contain anything new as compared to the usual investigation. Lemma 5.1: The basis, offering an optimal solution of a transportation table, is not changed if each element of an arbitrary row or column is decreased by an arbitrary real number; being only careful that no negative value should appear. Proof: Suppose that the value of the row [or column] is s. Let the values of the tied elements in the row [or column] be Using the above method more times in succession it can be achieved that the transportation costs are much less and calculation is simplified. Go through each row then each column and reduce the transportation costs of the given row [or column] by its minimum. Thus there will be 0 in every row and column which, in case of smaller tables, can help us to find an optimal solution. (If we “notice” a basis, where all tied elements are 0, then this can obviously lead to an optimal solution, because in this case the value of the objective function is 0, and it cannot be less than that. It only has to be checked whether this solution is possible or not.) This method is called reduction and it can be done in arbitrary order. After defining the transportation problem, it was assumed that the total of the stocks is equal to the total of the demands. This fact was used during setting up the initial program, as the corresponding value of the lastly chosen element satisfied both the values of its row and its column. However, this assumption is too rigid when thinking of applications. Luckily, this problem can be solved easily. If the total of the stocks is more than the total of the demands, then the difference stays where it is, and naturally this does not increase transportation costs. Take up a fictive destination, i.e. a new column. Let its demand, i.e. the value of the column, be the difference; and let the transportation costs of the corresponding routes, i.e. the elements of the column, be 0. Thus it is achieved that the table satisfies the original conditions, and the optimal solution received by distribution also gives which stocks of goods have to be delivered to the fictive destination. (These will not be moved.) If the total of the demands is more than the total of the stocks, then, similarly, fictive stores are taken up, i.e. a new row. Of course, stocks arriving from the fictive stores mean unsatisfied demands. 6 Appendix: Number of BasesThe number of bases of an Lemma 6.1: If Proof: It will be proved that the set of the elements cannot contain a loop. In the row and column of any element of a possible loop there is at least one more element, namely its adjacent in the loop, thus this element cannot be removed (neither its row nor its column), until the loop exists. The loop-adjacent of a loop-element cannot be removed either, because this could only be done when its other loop-adjacent has been removed. And so on, going along the elements of the loop, it can be seen that a loop element can be removed only if it has already been removed, which is impossible. Lemma 6.2: In any basis of an Before proving the lemma we note that in the special case of Proof (of lemma 6.2): To prove the first statement, suppose that there are k one-element rows and the other Theorem 6.3: In an Proof: A one-to-one correspondence will be given between the bases of an The above result can be formulated in two, apparently different forms, which take us to the areas of linear algebra and graph theory. Theorem 6.4: Consider the set of
is Proof: Let us make a correspondence between the (i;j)-indexed element of an Theorem 6.5: Let a bipartite graph be given whose partitions are vertices Proof: Let us make a correspondence such that the m rows of the Starting the proof of the theorem giving the number of bases in a different way, we can find interesting relationships using the final result. This is shown in the following statement. (This time algebra and combinatorics are touched.) Theorem 6.6: Let m, n be positive integers,
This statement gives a relationship between powers of the same exponent whose bases are successive integers. E.g. in case of
Proof (of theorem 6.6): The number of bases is to be determined by mathematical induction. Consider only arrays which have more rows than columns. i.e.
The last place where the first one-element row can stand is the n-th row because there are at least
A one-element row can be inserted before the k-th row in
Suppose, by suspicion, that Taking the common multiplier
As
the multiplier of power
Finally we get
We would like to prove that
As statement The previous result leads to some nice identities of combinatorics. Theorem 6.7: Let Statements (2)-(n+1) can be summarized as follows. is perpendicular to any of the vectors Proof (of theorem 6.7): Replace
Conclusions Hopefully the paper was useful for students and teachers dealing with operation research. Nevertheless the aim was also to give an example for a possible bridge over higher and elementary mathematics. (Other similar possibilities are shown at [3].)
References [1] Wayne L. Winston: Operations Research. Applications and Algorithms [2] Dr. Csernyák László (szerk): Matematika üzemgazdászoknak, [3] Hraskó András (szerk.): Új matematikai mozaik |