skip to main content
OSTI.GOV title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: Matching nuts and bolts in O(n log n) time

Conference ·
OSTI ID:416805
 [1];  [2];  [1]
  1. Rutgers Univ., Piscataway, NJ (United States)
  2. Stanford Univ., CA (United States)

Given a set of n nuts of distinct widths and a set of n bolts such that each nut corresponds to a unique bolt of the same width, how should we match every nut with its corresponding bolt by comparing nuts with bolts (no comparison is allowed between two nuts or between two bolts)? The problem can be naturally viewed as a variant of the classic sorting problem as follows. Given two lists of n numbers each such that one list is a permutation of the other, how should we sort the lists by comparisons only between numbers in different lists? We give an O(n log n)-time deterministic algorithm for the problem. This is optimal up to a constant factor and answers an open question posed by Alon, Blum, Fiat, Kannan, Naor, and Ostrovsky. Moreover, when copies of nuts and bolts are allowed, our algorithm runs in optimal O(log n) time on n processors in Valiant`s parallel comparison tree model. Our algorithm is based on the AKS sorting algorithm with substantial modifications.

OSTI ID:
416805
Report Number(s):
CONF-960121-; TRN: 96:005887-0028
Resource Relation:
Conference: 7. annual ACM-SIAM symposium on discrete algorithms, Atlanta, GA (United States), 28-30 Jan 1996; Other Information: PBD: 1996; Related Information: Is Part Of Proceedings of the seventh annual ACM-SIAM symposium on discrete algorithms; PB: 596 p.
Country of Publication:
United States
Language:
English

Similar Records

Evaluation of the method for lowering stress concentration at the thread root of bolted joints with modifications of nut shape
Journal Article · Sat Feb 01 00:00:00 EST 1997 · Journal of Pressure Vessel Technology · OSTI ID:416805

Thermodynamics of Taub-NUT/bolt black holes in Einstein-Maxwell gravity
Journal Article · Thu Jun 15 00:00:00 EDT 2006 · Physical Review. D, Particles Fields · OSTI ID:416805

Effect of thread pitch and frictional coefficient on the stress concentration in metric nut-bolt connections
Journal Article · Tue Feb 01 00:00:00 EST 1994 · Journal of Offshore Mechanics and Arctic Engineering; (United States) · OSTI ID:416805