JTAM (Jurnal Teori dan Aplikasi Matematika)
Vol 7, No 2 (2023): April

Formation of Non-Perfect Maze Using Prim’s Algorithm

Mahyus Ihsan (Department of Mathematics, Universitas Syiah Kuala, Banda Aceh Multimedia Research Group, Universitas Syiah Kuala, Banda Aceh)
Fahrul Razi (Department of Mathematics, Universitas Syiah Kuala, Banda Aceh Multimedia Research Group, Universitas Syiah Kuala, Banda Aceh)
Ikhsan Maulidi (Department of Mathematics, Universitas Syiah Kuala, Banda Aceh Multimedia Research Group, Universitas Syiah Kuala, Banda Aceh Graduate School of Natural Science and Technology, Kanazawa University, Kanazawa)
Vina Apriliani (Department of Mathematics Education, UIN Ar-Raniry, Banda Aceh)
Zahnur Zahnur (Department of Informatics, Universitas Syiah Kuala, Banda Aceh)



Article Info

Publish Date
08 Apr 2023

Abstract

Maze is a place that has many paths with tortuous paths that are misleading and full of dead ends and can be viewed as a grid graph. A non-perfect maze is a maze that has a cycle. This research produces an algorithm that can form a non-perfect maze with a size of m×n which has two types of bias. The first bias is the composition of the percentage of horizontal and vertical partitions. The second bias is the percentage of the number of cycles. The algorithm created in this study was generated by modifying Prim’s algorithm and the use of Fisher-Yates algorithm which is used in random selection in Prim’s algorithm. The non-perfect maze algorithm begins with the calculation of the parameter values of the two types of bias and continues with forming a perfect maze and ends with forming a non-perfect maze. The algorithm that has been designed can form a non-perfect maze with a complexity of O(|E|^2), where E is the set of edges of an m×n grid graph. Flash-based application development is also carried out in order to implement algorithms to obtain a non-perfect maze. The non-perfect maze is produced in a two-dimensional visual form in the form of an image along with its corresponding grid graph. The application is capable of displaying up to the first 20 solutions of the biased maze. 

Copyrights © 2023






Journal Info

Abbrev

jtam

Publisher

Subject

Mathematics

Description

Jurnal Teori dan Aplikasi Matematika (JTAM) dikelola oleh Program Studi Pendidikan Matematika FKIP Universitas Muhammadiyah Mataram dengan ISSN (Cetak) 2597-7512 dan ISSN (Online) 2614-1175. Tim Redaksi menerima hasil penelitian, pemikiran, dan kajian tentang (1) Pengembangan metode atau model ...