Comparison of Shuffle Algorithms For Randomness, Time Complexity and Space Complexity - Andriyat, Rio Andriyat Krisdiawan; sugiharto, tito (Universitas Medan Area, 2025)
This research aims to compare the performance of three shuffle algorithms in the data randomization process. Efficient data randomization is very important in various applications, especially in the development of random data-based systems such as games, simulations, and data processing. This study uses a dataset of 1000 English words, which is broken down into several dataset sizes (100, 500, and 1000 elements). The research methods used include three types of tests: the Chi-Square Test and Runs Test to ensure randomization results; time complexity to measure execution time efficiency; and space complexity to analyze memory usage efficiency. Each test was repeated 1000 times to get accurate results. The results show that the LCM algorithm is the best-performing algorithm, producing the fastest execution time and stable memory usage. The Fisher-Yates Shuffle algorithm comes in second with good time efficiency. The conclusion of this research is that the LCM algorithm is recommended for applications that require fast and efficient randomization on large datasets, while the Fisher-Yates Shuffle algorithm can be a fairly efficient alternative. The Naive Shuffle algorithm, however, is not good for applications that require high speed. These findings provide important implications in the selection of optimal randomization algorithms for high-performance data-driven applications