Persiansort: An Alternative to Mergesort Inspired by Persian Rug

Main Article Content

Parviz Afereidoon

Abstract

This paper introduces persiansort, a novel stable sorting algorithm inspired by the design and weaving patterns of Persian rugs. Unlike traditional merge-based sorting methods, which sort data by merging two sections, Persiansort divides the dataset into multiple sections. The number of sections is fully flexible and can range from four up to the size of the dataset. By employing a variety of knots, the algorithm is structured to achieve high performance across different types of data and varying conditions. Persiansort overcomes the limitations of mergesort when handling nearly sorted or partially sorted datasets. In the presence of runs, the algorithm inherently utilizes them without requiring explicit identification or decision-making. For nearly sorted data, where merge-based methods often perform inefficiently, persiansort demonstrates competitive performance and outperforms insertionsort. Additionally, its memory usage is significantly lower than that of conventional merge methods. Preliminary experimental results indicate that persiansort is flexible, efficient, and generally outperforms mergesort across a wide range of dataset types. These characteristics suggest that persiansort provides several advantages over traditional merge-based methods, positioning it as a promising alternative for stable sorting.

Downloads

Download data is not yet available.

Article Details

Section

Articles

How to Cite

Persiansort: An Alternative to Mergesort Inspired by Persian Rug. (2026). East Journal of Computer Science, 2(1), 27-37. https://doi.org/10.63496/ejcs.Vol2.Iss1.235