DOI: https://doi.org/10.32515/2664-262X.2025.11(42).2.23-29
Peculiarities of the Operation of Complex Computational Algorithms using the Example of Testing the Polock Hypothesis
About the Authors
Maksym Nedoshev, PhD student in Computer Science, National University of Life and Environmental Sciences of Ukraine, Kyiv, Ukraine. ORCID: https://orcid.org/0009-0000-9820-0649, email: m.nedoshev@nubip.edu.ua
Viktor Kyrychenko, Associate Professor, PhD in Physical and Mathematical Sciences, Associate Professor of the Department of Computer Science, National University of Life and Environmental Sciences of Ukraine, Kyiv, Ukraine, ORCID: https://orcid.org/0009-0001-0575-8684, email: v.kyrychenko@nubip.edu.ua
Abstract
The aim of this article is to investigate and experimentally verify Pollock's third hypothesis, which states that any natural number can be represented as the sum of no more than five tetrahedral numbers. The main focus is on developing an efficient algorithm capable of processing large numbers to test the hypothesis on a numerical range up to one billion.
Within the research, an algorithm was designed and implemented that combines several modern optimization techniques: two-pointer search, approximation methods, multithreading, and memorization testing. Particular attention was paid to benchmarking different implementations across platforms — NodeJS, Bun, C, Python and GPU. The test results are presented in the form of graphs for both single-threaded and multi-threaded code execution. Experimental results showed that Bun in multithreaded mode demonstrated the highest performance, even outperforming C in certain cases. This supports the developers’ claims regarding the speed of Bun. A comparison between CPU and GPU implementations using Python revealed that GPU acceleration provides only a slight improvement in performance while shader language significantly increasing code complexity compared to Python code. The experimental study covered all natural numbers up to one billion to verify the hypothesis.
As a result of testing, only 241 numbers required five tetrahedral summands, with the last such exceptional number being 343,867. This finding aligns with previous research. The algorithm showed stable memory usage across both small and large numbers. Future studies may focus on utilizing CUDA or high-performance computing clusters to validate the hypothesis over even larger numerical ranges.
Keywords
Pollock's hypothesis, tetrahedral numbers, algorithm optimization, multithreading, GPU computing
Full Text:
PDF
References
1. Salzer, H., & Levine, N. (1958). Table of integers not exceeding 100000 that are not expressible as the sum of four tetrahedral numbers. Mathematics of Computation, 12, 141–144. https://doi.org/10.1090/S0025-5718-1958-0099756-3.
2. Dhalla, H. (2020). A performance analysis of native JSON parsers in Java, Python, MS.NET Core, JavaScript, and PHP. In Proceedings of the 16th International Conference on Network and Service Management (CNSM), 2–6 November 2020, Izmir, Turkey (pp. 1–5). https://doi.org/10.23919/CNSM50824.2020.9269101.
3. Lei, K., Ma, Y., & Tan, Z. (2014). Performance comparison and evaluation of web development technologies in PHP, Python, and Node.js. In Proceedings of the 17th IEEE International Conference on Computational Science and Engineering, 19–21 December 2014, Chengdu, China. https://doi.org/10.1109/CSE.2014.142.
4. Huang, Q., & Lu, N. (2021). Optimized real-time MUSIC algorithm with CPU-GPU architecture. IEEE Access, 9, 54067–54077. https://doi.org/10.1109/ACCESS.2021.3070980.
5. Sloane, N. J. A. (2024). Sequence A000797 [Electronic resource]. The On-Line Encyclopedia of Integer Sequences (OEIS). Retrieved April 6, 2025, from https://oeis.org/A000797.
6. Zinnia, N., & Hanada, E. (2024). Optimizing search strategies: A study of two-pointer linear search implementation. arXiv preprint. June. https://doi.org/10.48550/arXiv.2406.16729.
7. Performing Calculations on a GPU [Electronic resource]. Apple Developer Documentation. Retrieved April 10, 2025, from https://developer.apple.com/documentation/metal/performing-calculations-on-a-gpu.
8. The Computer Language 25.03 Benchmarks Game [Electronic resource]. Retrieved April 10, 2025, from https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html.
9. Bun — A fast all-in-one JavaScript runtime [Electronic resource]. Retrieved April 10, 2025, from https://bun.sh/.
10. Gebraad, L., & Andreas, F. (2023). Seamless GPU acceleration for C++ based physics with the Metal Shading Language on Apple’s M series unified chips. Seismological Research Letters, 94. https://doi.org/10.1785/0220220241.
Citations
1. Salzer H., Levine N. Table of Integers Not Exceeding 100000 That Are Not Expressible as the Sum of Four Tetrahedral Numbers // Mathematics of Computation. 1958. Т. 12. С. 141–144. DOI: 10.1090/S0025-5718-1958-0099756-3 (дата звернення: 02.04.2025).
2. Dhalla H. A performance analysis of native JSON parsers in Java, Python, MS.NET Core, JavaScript, and PHP // 2020 16th International Conference on Network and Service Management (CNSM), 2–6 листопада 2020 р., Ізмір, Туреччина. С. 1–5. DOI: 10.23919/CNSM50824.2020.9269101 (дата звернення: 04.04.2025).
3. Lei K., Ma Y., Tan Z. Performance Comparison and Evaluation of Web Development Technologies in PHP, Python, and Node.js // 2014 IEEE 17th International Conference on Computational Science and Engineering, 19–21 грудня 2014 р., Ченду, Китай. DOI: 10.1109/CSE.2014.142 (дата звернення: 08.04.2025).
4. Huang Q., Lu N. Optimized Real-Time MUSIC Algorithm With CPU-GPU Architecture // IEEE Access. 2021. Т. 9. С. 54067–54077. DOI: 10.1109/ACCESS.2021.3070980 (дата звернення: 08.04.2025).
5. Sloane N. J. A. Послідовність A000797 [Електрон. ресурс] // The On-Line Encyclopedia of Integer Sequences (OEIS). 2024. Режим доступу: https://oeis.org/A000797 (дата звернення: 06.04.2025).
6. Zinnia N., Hanada E. Optimizing Search Strategies: A Study of Two-Pointer Linear Search Implementation // arXiv preprint. 2024. June. DOI: 10.48550/arXiv.2406.16729 (дата звернення: 08.04.2025).
7. Performing Calculations on a GPU [Електрон. ресурс] // Apple Developer Documentation. Режим доступу: https://developer.apple.com/documentation/metal/performing-calculations-on-a-gpu (дата звернення: 10.04.2025).
8. The Computer Language 25.03 Benchmarks Game [Електрон. ресурс]. Режим доступу: https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html (дата звернення: 10.04.2025).
9. Bun — A fast all-in-one JavaScript runtime [Електрон. ресурс]. Режим доступу: https://bun.sh/ (дата звернення: 10.04.2025).
10. Gebraad L., Andreas F. Seamless GPU acceleration for C++ based physics with the Metal Shading Language on Apple’s M series unified chips // Seismological Research Letters. 2023. Т. 94. DOI: 10.1785/0220220241 (дата звернення: 10.04.2025).
Copyright (c) 2025 Maksym Nedoshev, Viktor Kyrychenko
Peculiarities of the Operation of Complex Computational Algorithms using the Example of Testing the Polock Hypothesis
About the Authors
Maksym Nedoshev, PhD student in Computer Science, National University of Life and Environmental Sciences of Ukraine, Kyiv, Ukraine. ORCID: https://orcid.org/0009-0000-9820-0649, email: m.nedoshev@nubip.edu.ua
Viktor Kyrychenko, Associate Professor, PhD in Physical and Mathematical Sciences, Associate Professor of the Department of Computer Science, National University of Life and Environmental Sciences of Ukraine, Kyiv, Ukraine, ORCID: https://orcid.org/0009-0001-0575-8684, email: v.kyrychenko@nubip.edu.ua
Abstract
Keywords
Full Text:
PDFReferences
1. Salzer, H., & Levine, N. (1958). Table of integers not exceeding 100000 that are not expressible as the sum of four tetrahedral numbers. Mathematics of Computation, 12, 141–144. https://doi.org/10.1090/S0025-5718-1958-0099756-3.
2. Dhalla, H. (2020). A performance analysis of native JSON parsers in Java, Python, MS.NET Core, JavaScript, and PHP. In Proceedings of the 16th International Conference on Network and Service Management (CNSM), 2–6 November 2020, Izmir, Turkey (pp. 1–5). https://doi.org/10.23919/CNSM50824.2020.9269101.
3. Lei, K., Ma, Y., & Tan, Z. (2014). Performance comparison and evaluation of web development technologies in PHP, Python, and Node.js. In Proceedings of the 17th IEEE International Conference on Computational Science and Engineering, 19–21 December 2014, Chengdu, China. https://doi.org/10.1109/CSE.2014.142.
4. Huang, Q., & Lu, N. (2021). Optimized real-time MUSIC algorithm with CPU-GPU architecture. IEEE Access, 9, 54067–54077. https://doi.org/10.1109/ACCESS.2021.3070980.
5. Sloane, N. J. A. (2024). Sequence A000797 [Electronic resource]. The On-Line Encyclopedia of Integer Sequences (OEIS). Retrieved April 6, 2025, from https://oeis.org/A000797.
6. Zinnia, N., & Hanada, E. (2024). Optimizing search strategies: A study of two-pointer linear search implementation. arXiv preprint. June. https://doi.org/10.48550/arXiv.2406.16729.
7. Performing Calculations on a GPU [Electronic resource]. Apple Developer Documentation. Retrieved April 10, 2025, from https://developer.apple.com/documentation/metal/performing-calculations-on-a-gpu.
8. The Computer Language 25.03 Benchmarks Game [Electronic resource]. Retrieved April 10, 2025, from https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html.
9. Bun — A fast all-in-one JavaScript runtime [Electronic resource]. Retrieved April 10, 2025, from https://bun.sh/.
10. Gebraad, L., & Andreas, F. (2023). Seamless GPU acceleration for C++ based physics with the Metal Shading Language on Apple’s M series unified chips. Seismological Research Letters, 94. https://doi.org/10.1785/0220220241.
Citations
1. Salzer H., Levine N. Table of Integers Not Exceeding 100000 That Are Not Expressible as the Sum of Four Tetrahedral Numbers // Mathematics of Computation. 1958. Т. 12. С. 141–144. DOI: 10.1090/S0025-5718-1958-0099756-3 (дата звернення: 02.04.2025).
2. Dhalla H. A performance analysis of native JSON parsers in Java, Python, MS.NET Core, JavaScript, and PHP // 2020 16th International Conference on Network and Service Management (CNSM), 2–6 листопада 2020 р., Ізмір, Туреччина. С. 1–5. DOI: 10.23919/CNSM50824.2020.9269101 (дата звернення: 04.04.2025).
3. Lei K., Ma Y., Tan Z. Performance Comparison and Evaluation of Web Development Technologies in PHP, Python, and Node.js // 2014 IEEE 17th International Conference on Computational Science and Engineering, 19–21 грудня 2014 р., Ченду, Китай. DOI: 10.1109/CSE.2014.142 (дата звернення: 08.04.2025).
4. Huang Q., Lu N. Optimized Real-Time MUSIC Algorithm With CPU-GPU Architecture // IEEE Access. 2021. Т. 9. С. 54067–54077. DOI: 10.1109/ACCESS.2021.3070980 (дата звернення: 08.04.2025).
5. Sloane N. J. A. Послідовність A000797 [Електрон. ресурс] // The On-Line Encyclopedia of Integer Sequences (OEIS). 2024. Режим доступу: https://oeis.org/A000797 (дата звернення: 06.04.2025).
6. Zinnia N., Hanada E. Optimizing Search Strategies: A Study of Two-Pointer Linear Search Implementation // arXiv preprint. 2024. June. DOI: 10.48550/arXiv.2406.16729 (дата звернення: 08.04.2025).
7. Performing Calculations on a GPU [Електрон. ресурс] // Apple Developer Documentation. Режим доступу: https://developer.apple.com/documentation/metal/performing-calculations-on-a-gpu (дата звернення: 10.04.2025).
8. The Computer Language 25.03 Benchmarks Game [Електрон. ресурс]. Режим доступу: https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html (дата звернення: 10.04.2025).
9. Bun — A fast all-in-one JavaScript runtime [Електрон. ресурс]. Режим доступу: https://bun.sh/ (дата звернення: 10.04.2025).
10. Gebraad L., Andreas F. Seamless GPU acceleration for C++ based physics with the Metal Shading Language on Apple’s M series unified chips // Seismological Research Letters. 2023. Т. 94. DOI: 10.1785/0220220241 (дата звернення: 10.04.2025).