MES: Journal of Mathematics Education and Science
Vol 11, No 1 (2025): Edisi Oktober

PENYELESAIAN TRAVELLING SALESMAN PROBLEM DENGAN MENGGUNAKAN APLIKASI BAHASA PEMROGRAMAN PASCAL DAN C++

Sirait, Debora Exaudi (Unknown)
Purba, Switamy Agnitha (Unknown)
Simbolon, Lolyta Damora (Unknown)



Article Info

Publish Date
15 Oct 2025

Abstract

Abstract. The travelling salesman problem is one of the classic optimisation problems that is widely applied in real life, such as in the distribution of goods, transportation route planning, and even the movement of industrial robots. This study aims to implement algorithms for solving the travelling salesman problem using two different programming languages, namely Pascal and C++, and to compare their performance in terms of effectiveness, memory efficiency, and execution speed. The methods used include weighted graph modelling, shortest path calculation, and the application of the Branch and Bound algorithm. The test results show that both programming languages produce identical optimal routes, namely 1 – 5 – 6 – 7 – 10 – 9 – 8 – 4 – 2 – 3 – 1 with a minimum total distance of 196. The Pascal programme has the advantage of a simple syntax structure and low memory usage (±356 KB), while C++ excels in execution speed (0.09466 seconds) despite having a larger output file size (±1.26 MiB). This difference in performance indicates that Pascal is more suitable for educational purposes and small-scale applications, while C++ is superior for complex applications and modern system integration needs. Thus, the TSP algorithm can be implemented effectively using either Pascal or C++, and the choice of programming language should be tailored to the context of the requirements.

Copyrights © 2025






Journal Info

Abbrev

mesuisu

Publisher

Subject

Mathematics

Description

MES (Journal of Mathematics Education and Science) diterbitkan secara berkala pada bulan April dan Oktober oleh Program Studi Pendidikan Matematika FKIP Universitas Islam Sumatera Utara. Jurnal ini membahas tentang kajian dibidang pendidikan matematika, pembelajaran matematika berbasis ICT dan ...