Given two point sets S and T, we first study the many-to-many matching with demands problem (MMD problem) . In an MMD, each point of one set must be matched to a given number of the points of the other set , and the cost of matching a point to another point is equal to the distance between the two points. We present an O(n^2) time algorithm for computing a one dimensional MMD (OMMD) , where the input point sets S and T lie on the line and |S|+|T| = n . Then, we study a generalized version of MMD problem, that is the many-to-many matching with demands and capacities problem (MMDC), that in which each point has a limited capacity in addition to a demand. We give an O(n^2) algorithm for one dimensional MMDC problem 
Given two point sets S and T, we first study the many-to-many matching with demands problem (MMD problem) where each point of one set must be matched to a given number of the points of the other set . We propose an O(n^2) time algorithm for computing a one-dimensional MMD (OMMD) of minimum cost where |S| + |T| = n. In an OMMD the input point sets S and T lie on the line and the cost of matching a point to another point is equal to the distance between the two points . Then, we study a generalized version of MMD problem, the many-to-many matching with demands and capacities problem (MMDC), that in which each point has a limited capacity in addition to a demand. We give an O(n^2) time algorithm for the minimum cost one dimensional MMDC problem .
R
. In an MMD,
where
R
, and the cost of matching a point to another point is equal to the distance between the two points. We present
. We propose
R
one dimensional
one-dimensional
R
, where
of minimum cost where |S| + |T| = n. In an OMMD
R
|S|+|T| = n
the cost of matching a point to another point is equal to the distance between the two points
D
that is
R
algorithm for
time algorithm for the minimum cost
A
.