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

Debora Exaudi Sirait, Switamy Agnitha Purba, Lolyta Damora Simbolon

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.

Keywords


travelling salesman problem, programming language, Pascal, C++

References


A.S. Rosa. (2018). Struktur Data Terapan Dalam Berbagai Bahasa Pemprograman: Pascal, C, C++, dan Java. Penerbit Modula: Bandung.

Albertus, W., Atje, S., Juli, R. (2016). Pengembangan Aplikasi Travelling Salesman Problem dengan Optimisasi Robust (Studi Kasus pada Pekan Paralimpiade Nasional XV 2016): Jurnal Informatika, Departemen Ilmu Komputer Fakultas MIPA Universitas Padjadjaran Jatinangor, Indonesia.

Azwar, N. (2019). Aplikasi Program Dinamik pada Traveling Salesman Problem (TSP): Program studi Matematika: Universitas Sumatera Utara.

Dewi, Eka Poespita., Pradjanigsih, Agustina., Hasan, Muhammad. (2012). Optimasi Rute Multiple Travelling Salesman Problem melalui Pemograman Integer Dengan Metode Branch and Bound. Jember: Universitas Jember.

Hartono, Jogiyanto (2000). Konsep Dasar Pemrograman Bahasa C. Yogyakarta: Penerbit Andi Yogyakarta.

Kelvin, A. 2015. Aplikasi Program Dinamis dalam Pemecahan TSP, Teknik Informatika Institut Teknologi Bandung: Makalah IF2211 Strategi Algoritma, Semester II Tahun 2015/2016.

Laksana, Janice. 2012. Penerapan Algoritma Branch and Bound untuk Penentuan Jalur Wisata. Bandung: Institut Teknologi Bandung.

Munir, Rinaldi. 2010. Matematika Diskrit. Bandung: Informatika

Nugraha, Pasca. 2010. Penerapan Algoritma Branch and Bound Dalam Menentukan Rute Terpendek Untuk Perjalanan Antarkota di Jawa Barat. Bandung: Institut Teknologi Bandung.

Purwanto, Eko Budi. 2008. Perancangan & Analisis Algoritma. Yogyakarta: Graha Ilmu.

Rohman, Saiful. 2020. Optimisasi Travelling Salesman Problem dengan Algoritma Genetika pada Kasus Pendistribusian Barang PT.POS Indonesia di Kota Bandar Lampung: Fakultas MIPA. Bandar Lampung

Sirait, D. E. (2021). Dasar pemrograman C++. Perkumpulan Rumah Cemerlang Indonesia.

Sirait, D. E. (2021). Pemrograman Pascal. Perkumpulan Rumah Cemerlang Indonesia.

Sirait, D. E., & Simarmata, J. E. (2020). Penyelesaian masalah travelling salesman problem dengan menggunakan bahasa pemrograman Pascal. MES: Journal of Mathematics Education and Science, 6(1), 10–15.

Yushi, N. (2011). Program Aplikasi Travelling Salesman Pada Pendistribusian Agen Minuman Ringan Menggunakan Turbo Pascal 7.1, Program Studi Teknik Informatika – Fakultas Teknik, Matematika dan IPA, Universitas Indraprasta PGR: Jurnal Ilmiah Faktor Exacta Vol. 4 (1).




DOI: https://doi.org/10.30743/mes.v11i1.12035

Refbacks

  • There are currently no refbacks.