# An O(n^2) algorithm for Many-To-Many Matching of Points with Demands in   One Dimension

**Authors:** Fatemeh Rajabi-Alni, Alireza Bagheri

arXiv: 1702.01083 · 2018-03-29

## TL;DR

This paper introduces the first O(n^2) algorithm for solving the one-dimensional many-to-many matching with demands problem, efficiently matching points on a line with specified demands and minimizing total distance.

## Contribution

The paper presents a novel O(n^2) algorithm specifically for the one-dimensional MMD problem, improving computational efficiency over previous methods.

## Key findings

- Achieved an O(n^2) time complexity for the OMMD problem.
- Provided a polynomial-time solution for a special case of MMD.
- Enhanced understanding of efficient algorithms for demand-based point matching.

## Abstract

Given two point sets S and T, we study the many-to-many matching with demands problem (MMD problem) which is a generalization of the many-to-many matching problem (MM problem). In an MMD, each point of one set must be matched to a given number of the points of the other set (each point has a demand). In this paper we consider a special case of MMD problem, the one-dimensional MMD (OMMD), where the input point sets S and T lie on the line. That is, the cost of matching a pair of points is equal to the distance between the two points. we present the first O(n^2)time algorithm for computing an OMMD between S and T, where |S| + |T| = n.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1702.01083/full.md

## Figures

9 figures with captions in the complete paper: https://tomesphere.com/paper/1702.01083/full.md

## References

11 references — full list in the complete paper: https://tomesphere.com/paper/1702.01083/full.md

---
Source: https://tomesphere.com/paper/1702.01083