Jurnal Natural
Volume 21 Number 1, February 2021

Non-perfect maze generation using Kruskal algorithm

MAHYUS IHSAN (Department of Mathematics, Syiah Kuala University, Banda Aceh-Indonesia)
DEDI SUHAIMI (Department of Mathematics, Universitas Syiah Kuala, Banda Aceh, Indonesia Multimedia Research Group, Department of Mathematics, Universitas Syiah Kuala, Banda Aceh, Indonesia)
MARWAN RAMLI (Department of Mathematics, Syiah Kuala University, Banda Aceh-Indonesia)
SYARIFAH MEURAH YUNI (Department of Mathematics, Universitas Syiah Kuala, Banda Aceh, Indonesia Multimedia Research Group, Department of Mathematics, Universitas Syiah Kuala, Banda Aceh, Indonesia)
IKHSAN MAULIDI (Department of Mathematics, Universitas Syiah Kuala, Banda Aceh, Indonesia)



Article Info

Publish Date
24 Feb 2021

Abstract

A non-perfect maze is a maze that contains loop or cycle and has no isolated cell. A non-perfect maze is an alternative to obtain a maze that cannot be satisfied by perfect maze. This paper discusses non-perfect maze generation with two kind of biases, that is, horizontal and vertical wall bias and cycle bias. In this research, a maze is modeled as a graph in order to generate non-perfect maze using Kruskal algorithm modifications. The modified Kruskal algorithm used Fisher Yates algorithm to obtain a random edge sequence and disjoint set data structure to reduce process time of the algorithm. The modification mentioned above are adding edges randomly while taking account of the edge’s orientation, and by adding additional edges after spanning tree is formed. The algorithm designed in this research constructs an  non-perfect maze with complexity of  where  and  denote vertex and edge set of an  grid graph, respectively. Several biased non-perfect mazes were shown in this research by varying its dimension, wall bias and cycle bias.

Copyrights © 2021






Journal Info

Abbrev

natural

Publisher

Subject

Agriculture, Biological Sciences & Forestry Astronomy Biochemistry, Genetics & Molecular Biology Chemistry Earth & Planetary Sciences Energy Immunology & microbiology Neuroscience Physics

Description

Jurnal Natural (JN) aims to publish original research results and reviews on sciences and mathematics. Jurnal Natural (JN) encompasses a broad range of research topics in chemistry, pharmacy, biology, physics, mathematics, statistics, informatic and ...