Comparison of the Fisher-Yates Shuffle and the Linear Congruent Algorithm for Randomizing Questions in Nahwu Learning Multimedia

— Nahwu Quiz is a basic Arabic learning application that can be played by the public over the age of 12 years. In the question practice menu, there are questions and 4 multiple choice questions. The user only needs to choose one of the multiple choices that the user thinks is correct/matches the question at hand. In one game, there are 5 questions. After answering all these questions, you will immediately see the score. The purpose of developing this application apart from being a medium of entertainment as well as a medium of learning and memory training for game users (users). To make this Nahwu Quiz application, the authors use the Fisher Yates Shuffle (FYS) algorithm which is used to perform the randomization function in multiple choice and the Linear Congruent Method (LCM) algorithm as a comparison. White box and black box testing were applied to see the feasibility of the program and to obtain efficiency in the comparison of randomization methods. The results of white box and black box testing on the application show that the application is feasible. with reference to the white box test results that the FYS algorithm and the LCM have the same complexity as the result of cyclomatic complexity = 2.


I. INTRODUCTION
Language is a medium that is used in various countries because it is a means of communication between humans, from the various languages used. Arabic is the language of Islam, the language of the Qur'an, the language of the Sunnah and the language of knowledge, therefore learning Arabic is very important, especially in efforts to understand the Al-Qur'an and the Sunnah of the Prophet, as well as scientific books that use Arabic as a medium of articulation.
In learning Arabic, it may not be exactly the same as other languages such as Indonesian, English, and so on. This is due VOLUME 1 ISSUE 1 (2023) DOI: https://doi.org/10.15575/kjrt.v1i1. 159 11 to the existence of certain characteristics (read: special properties) that are owned by each language. One of the most basic branches of Arabic language science and a must to learn is the science of Nahwu (syntax), namely the study of the rules used in constructing sentences [1]- [3]. Now many people study Nahwu science but few people can understand it. Difficulties in understanding Nahwu science are partly due to the way of learning, which is enough just to read the material [4], [5]. So when faced with examples of Arabic sentences that do not use shakal (lines) it will be difficult to read them. For this reason, it is necessary to have follow-up to be able to understand this knowledge, including by giving practice questions.
In the case of practice questions, especially questions in the form of multiple choice, there needs to be a randomization function. The randomization function is a function that is usually performed to randomize a sequence. The problem that is often encountered is the possibility of occurrence that occurs can be known by the user. Because the probability of the emergence of an unbalanced combination sequence. Certain sequence combinations appear more frequently and other sequence combinations appear less, so that sequence combinations can be known and predictable. The randomization function in a multiple choice question is very necessary so that the multiple choice has a level of difficulty that can provide a challenge and experience to the user or users.
Previously there have been several studies that examined this randomization function. Among them is research conducted by Tejeshwar in 2014 in randomizing pixels from secret images, then in a card game simulation application by Ade-Ibijola and Abejide Olu. In this research, we will compare 2 algorithms commonly used in the randomization process, namely the Fisher Yates Shuffle Algorithm and the Linear Congruent Method. The reason for the comparison of the two algorithms is because seen from several research papers and journals, the two algorithms are widely used for the randomization process. The reason for taking Nahwu science as an object, was taken from the interview results that studying Nahwu science is very important because it is the basis for learning Arabic.

II. RELATED WORKS
Many studies have been conducted to discuss learning applications and the application of the Fisher Yates Shuffle algorithm and the Linear Congruent Method in an application program. Several related studies are as follows: 1. The study that implements the Fisher-Yates Shuffle algorithm which functions to randomize pixels from secret images [6], while LZW Compression which functions as coding is done by randomizing secret images/messages before embedding and each bit of LZW encoding the image/message is embedded in the cover image by changing the two most significant bits of each with the pixel intensity of the cover image. 2. Other research creates an application for virtual card game simulation with Fisher Yates Algorithm and Domain-Specific Data Structures [7]. Of the 54 cards that are drawn randomly, the shuffling of the cards can go according to the plot. This application can be implemented on the desktop with an adjustable design and speed. 3. There is a research about the game matching images puzzle [8]. This game has 2 game modes, the first is the Puzzle mode and the second is the Strategy-Puzzle mode. Many images are shuffled in the regular Puzzle mode as many as 10-25 pairs of images. The number of images shuffled in Strategy-Puzzle mode is 10 pairs of images. This game implements 2 algorithms, namely the Fisher Yates algorithm and the A-Star algorithm. 4. Many education research which implements the Linear Congruent Method (LCM) algorithm which is used in the randomization process [9]- [13].

Create an educational game for Android based learning
Nahwu Jurumiyah [14]. With this application, it is anticipated that the learning sciences Jurumiyah Nahwu will be more engaging, efficient, and entertaining than they are without the game. It is anticipated that the process of learning science Jurumiyyah Nahwu will continue to be portable and adaptable by utilizing smartphones or tablets with the Android operating system, which is used by the majority of people today.

A. Research framework
The selection and use of teaching methods is important for achieving success in education. The success of education is largely determined by educators in using learning models. The general purpose of learning Nahwu science is to be able to understand Arabic. Based on this goal, educators must have expertise in using effective and efficient methods and models, so that they can provide clarity of thought for students which can produce good learning outcomes for students. Of course by keeping up with technological developments. So, the mobile-based learning model influences the effectiveness of learning. Figure 1 is the flow of the framework based on the explanation above which is mapped into problems, opportunities, approaches, software development, software implementation, and research results. This research also Rational Unified Process (RUP) methodology as research activities. The RUP method is a process-oriented activity development method [9]. In this

Comparison of the Fisher-Yates Shuffle and the Linear Congruent Algorithm for Randomizing Questions in Nahwu
Learning Multimedia (1) Inception, at this stage the developer defines activity boundaries, conducts an analysis of user needs, and performs the initial design of the software (architectural design and use cases). By the end of this phase, the Alpha version of the software prototype should have been released.
(2) Elaboration, at this stage, the software design is carried out, starting from specifying the software features to releasing a prototype of the Beta version of the software. (3) Construction, implementation of the software design that has been made is carried out at this stage. At the end of this phase, the final, administrator-approved version of the software is released along with software documentation. Then, (4) Transition, software installation, deployment and socialization are carried out at this stage.

B. Fisher-Yates Shuffle Algorithm
The Fisher-Yates shuffle (taken from the names Ronald Fisher and Frank Yates) or also known as the Knuth shuffle (taken from the name Donald Knuth), is an algorithm for generating a random permutation of a finite set, in other words to randomize a set . If the Fisher-Yates shuffle is implemented correctly, the results of this algorithm will not be one-sided, so that each permutation has the same probability [8]. The steps of the randomization method in the Fisher Yates Shuffle algorithm are as follows: 1. Declare the number of elements in the array.

C. Linear Congruent Method
The Linear Congruent Method (LCM) is a random number generator method [15], [16]. The distinctive feature of LCM is that it repeats over a certain period of time or after a certain number of generations. The determination of the LCM constants (a, c and m) really determines whether the random numbers obtained are good or not in the sense of obtaining random numbers as if there were no repetitions. LCM utilizes the linear model to generate random numbers which are defined as in formula (1) Where i is a random number-i, m is a modulus, Xi-1 is a previous random number, a is a multiplier factor, and c is an increment. In the algorithm above, Xi is the n th random number variable, where a and c are LCM constants and m is the maximum random number limit . The conditions for selecting each parameter in the equation above are as follows: 1. m = modulus, 0 < m 2. a = multiplier, 0 < a < m 3. c = increment, 0 ≤ c < m 4. X0 = initial value, 0 ≤ X0 < m 5. c and m are relative primes 6. a -1 is divisible by prime factors of m 7. a -1 is a multiple of 4 if m is also a multiple of 4 8. a must be very large Typical of LCM is that repetition occurs at a certain time period or after a number of times of generation, this is one of the characteristics of this method, and pseudo random generators in general [15].

A. Inception result
The Fisher Yates Shuffle algorithm is applied to the Nahwu Quiz application which is used to randomize the questions and the Linear Congruent Method algorithm as a comparison. The Nahwu Quiz application is a game application that can be played by people over 12 years of age. The purpose of developing this application apart from being a medium of entertainment as well as a medium of learning and memory training for game users (users). The rules of this game are easy, in the question practice menu, there are questions and 4 multiple choice. The user only needs to choose one of the multiple choices that the user thinks is correct/matches the question at hand. In one game, there are 5 questions. After answering all these questions, you will immediately see the score.
In the case of practice questions, especially questions in the form of multiple choice, there needs to be a randomization function. The randomization function is a function that is usually performed to randomize a sequence. The problem that is often encountered is the possibility of occurrence that occurs can be known by the user. Because the probability of the emergence of an unbalanced combination sequence. Certain sequence combinations appear more frequently and other sequence combinations appear less, so that sequence combinations can be known and predictable. The randomization function in a multiple choice question is very necessary so that the multiple choice has a level of difficulty that can provide a challenge and experience to the user or users. From several studies conducted in terms of randomization, there are two algorithms that are often implemented, namely the Fisher Yates Shuffle Algorithm and the Linear Congruent Method. For this reason, a comparison was made between the two algorithms.

B. Elaboration result
The Nahwu science Android-based learning multimedia software that implements the FYS and LCM algorithms is illustrated through the use case diagram in Figure 2. The main functionality of the software is selecting Nahwu science learning content and doing exercises. Where, the functionality of doing exercises implements the FYS and LCM algorithms to randomize the appearance of questions in practice. Then, the functionality of working on questions will automatically calculate the value.

Comparison of the Fisher-Yates Shuffle and the Linear Congruent Algorithm for Randomizing Questions in Nahwu
Learning Multimedia

C. Construction result
In the implementation stage of this system is the next stage of the system design stage that has been designed in such a way. Figure 3 presents an example of a web-based mobile application interface as a medium for learning Nahwu science that applies the FYS and LCM algorithms to randomize practice questions.
Then, this research use white-box testing which is testing based on checking the design details, using the control structure of the program design procedurally to divide the test into several test cases. The method used in this white-box test is the basis path method. The basis path method allows the test case designer to make complex logical estimates of the procedural design and use these estimates to define execution flows. Based on white-box testing using cyclomatic complexity that shown in the Figure 3 and 4, either FYS or LCM has cyclomatic complexity value 2. It means both of those algorithms have a simple structure and easy to develop. In addition, in terms of the stability of the randomization process, the two algorithms have stability that is not much different. Table 1 shows several attempts to do practice questions to see the randomization of the resulting FYS and LCM algorithms with 25 times doing exercise. From those result, each algorithm does not bring up the same question over and over again. Questions are available in Indonesian language.

V. CONCLUSION
This study successfully applied the Fisher Yates Shuffle (FYS) algorithm and the Linear Congruent Method (LCM) for the process of randomizing questions on Nahwu science learning. The results of the comparison of the Fisher Yates Shuffle algorithm and the Linear Congruent Method with reference to the white box testing results show that the FYS and LCM algorithms have the same complexity as the cyclomatic complexity results with a value of 2, which means that both algorithms are simple to implement. Then, it is shown by the stability comparison results from the table that the two have stability that is not much different. In its journey, this research is still far from perfect, therefore further development is needed, so for further research on this randomization method, try hybridizing the randomization methods. In addition, it is necessary to add features such as the system can store a summary of the results of the exercise.