International Journal of Academic Information Systems Research (IJAISR)

Title: Learning to Sort: A Hybrid Machine Learning Framework for Adaptive Sorting Algorithms in Real-Time Logistics and Supply Chain Automation

Authors: Mohammed M. Al-Bake, Deema A. Shaqfa, Samy S. Abu-Naser

Volume: 10

Issue: 7

Pages: 84-90

Publication Date: 2026/07/28

Abstract:
The growing complexity of modern processors has made the development of highly efficient code increasingly difficult. A promising automatic code generation strategy is implemented by library generators. This approach has mainly been applied to scientific codes that can be optimized by identifying code characteristics that depend only on the target machine. In this paper, we study the generation of sorting routines whose performance also depends on the characteristics of the input data. We present two approaches to generate efficient sorting routines. First, we consider the problem of selecting the best "pure" sorting algorithm as a function of the characteristics of the input data. We use machine learning algorithms to compute a function for each target machine that, at runtime, is used to select the best algorithm. Our second approach utilizes a learned model of the input data characteristics. We use the empirical cumulative distribution function (CDF) and a piecewise constant function (PCF) to efficiently predict element positions and optimize sorting complexity. Our results show that the algorithms generated using this second approach are quite effective and perform significantly better than the many conventional sorting implementations we tested.

Download Full Article (PDF)