Distribution Route Optimization of Zakat Al-Fitr Based on the Branch-and-Bound Algorithm

ABSTRACT


A. INTRODUCTION
In the month of Ramadan, prior to the Muslim festive season celebration known as eid alfitr, every Muslim (whether male or female, slave or free, wealthy or poor, young or elderly) is obligated to fulfill zakat al-fitr by donating a certain amount of essential food or paying an equal monetary amount. The items must be provided as much as one sha' in the form of local staple foods, such as rice, beans, lentils, wheat, corn, and so forth (Al-Qaradawi, 2000;Perdana & Tunali, 2020). The two advantages of zakat al-fitr are (1) the purification of a Muslim's fast from needless activities and hurtful words; and (2) the expression of sympathy for the needy so that their eid al-fitr day are fulfilled and they do not beg. This viewpoint is based on the hadith narrated by Ibn 'Abbas: "The Messenger of Allah enjoined Zakat-ul-fitr on the one who fasts (i.e. fasted during the month of Ramadan) to purify him from any indecent act or speech and for the purpose of providing food for the needy. It is accepted as Zakah for the person who pays it before the Eid prayer and it is Sadaqah (i.e. voluntary charity) for the person who pays it after the Eid prayer" (Al-Albani, 2014).
'Amil, persons who appointed by the government or community to collect, manage, and distribute zakat (Fathoni, Suryani, & Cahyo, 2020;Usmani & Qazi, 2010), has a narrow time interval between the collection and distribution deadlines. The last collection is on the last day of Ramadan, at dusk, and must be handed to all recipients before the following morning eid alfitr prayer (Dhar, 2013). As a result, for the purpose of the virtue of the zakat al-fitr reward, effective distribution management is required, because any delay will merely be counted as sodaqoh, as explained in the hadith above. One way to mitigate the issues mentioned above is to use distribution route optimization so that services can be completed in a reasonable amount of time.
The Traveling Salesman Problem (TSP) is a combinatorial optimization problem that has piqued humanity's interest in identifying the shortest distribution route (Dahiya & Sangwan, 2018;Grymin & Jagiełło, 2016;Xiong, Wu, & Wu, 2017). The branch-and-bound algorithm is one of the TSP-solving algorithms that can be used to achieve the goal of this study regarding to the distribution route. It is a recommended method to produce exact algorithms solving NPhard combinatorial optimization and discrete problems (Gmys, Mezmaz, Melab, & Tuyttens, 2016;Grymin & Jagiełło, 2016;Rajarajeswari & Maheswari, 2020;Yu, Xu, & Schober, 2020). The idea behind the algorithm is to use the estimated bound and the least cost search strategy to accelerate the finding of the solution vertex. In particular, it decomposes the problem into subproblems over a tree structure known as a branch-and-bound tree (Cochran, Cox, Keskinocak, Kharoufeh, & Smith, 2011;Huang et al., 2021;Morrison, Jacobson, Sauppe, & Sewell, 2016).
Researchers have focused a lot of emphasis on the application of the branch-and-bound algorithm in realistic combinatorial optimization. Some real-world issues are taken into account, including the Electrical Multiple Units (EMUs), single-machine scheduling, and closeenough traveling salesman problem (CETSP). Lu, Zhou, Yue, & Chen (2016) found that EMUs circulation scheduling in railway network can be designed using branch-and-bound algorithm under certain condition. Over a pre-step of greedy strategy, they demonstrated that the objective value of solutions and the execution time of branch-and-bound algorithm triumph over other heuristics. Additionally, Zegordi & Yavari (2018) suggests that in a single-machine scheduling problem with non-identical work release dates, the overall completion durations be minimized. All the proposed method, including lower bound, upper bound, and dominance properties, have been used in the branch-and-bound algorithm and have shown their potency in solving hard and large-size problems quickly. Prior to this, Coutinho, Nascimento, Pessoa, & Subramanian (2016), discusses CETSP, which is restricted by an obligation of salesman to visit a particular area. They applied an exact branch-and-bound algorithm and second order cone programming to examine 824 examples, and in the end they were able to find the best solutions for open problems with up to a thousand vertices. This research is a modification of Coutinho, Nascimento, Pessoa, & Subramanian (2016) using a realistic and different public space. i.e., distribution route of zakat al-fitr. In order to achieve the optimal results and the shortest amount of time, this study was also inspired by Lu, Zhou, Yue, & Chen (2016) and Zegordi & Yavari (2018). More specifically, as a means to obtain the least operational cost, this research improves the application of the branch-and-bound method to the route network and creates the systemic steps of the branch-and-bound algorithm that are translated into the MATLAB programming language. Therefore, this study aims to minimize the chosen route to distribute zakat al-fitr in Sleman city and Kulon Progo city so that it will be positively correlated with time efficiency.

B. METHODS
In general, this research involves two diciplines: mathematics for route optimization and fiqh (Islamic jurisprudence) for zakat al-fitr regulation and implementation. So, this applied research sought to identify the best distribution route of zakat al-fitr. The research was conducted at a non-profit organization named Eradication of Illiteracy Al Quran (PBHA) in Klodran, Sumberagung, Sleman, Special Region of Yogyakarta that specialized in eradication of illiteracy Al Quran and social help. The study allows for two phases, including quantitative data analysis in a computing laboratory and qualitative data analysis ( Figure 1).

Quantitative data analysis
The data used includes 'amil, recipient pockets, and the kilometer-long separations between the sites. A graph representation of the identified data will then be created. To find the shortest route for distributing zakat al-fitr, the traveling salesman problem theory, matrix reduction, and branch-and-bound algorithm were applied. Finally, using MATLAB software and the principles of algorithm analysis, construct a computational programming for the corresponding case study, as shown in Figure 1.

Qualitative data analysis
This step involved gathering as much information as possible based on the issue and the available data through observation and interview. The following will outline the research's theoretical framework which includes branch-and-bound algorithm and GUI MATLAB.
a. Branch-and-bound algorithm According to Suyanto (2010) and Zumaytis & Karnalim (2017), the branch-and-bound algorithm that based on reduced cost matrix has the following steps: Computational programming (MATLAB)

Problem formulation
Identify the data characteristic Data ('amil, recipients, and distance between points)

Observation and interview
Graph analysis

Algorithm analysis
Literature study

Traveling Salesman Problem
Branch-and-bound algorithm and GUI MATLAB

Conclusion and Recommendation
1) Create a cost matrix that indicates the connectivity and the weight/distance to travel between each vertex. Fill it with infinity ()  if two vertices are not connected.
2) Form the reduced matrix by subtracting each row and column with the lowest weight.
Once each row and column contains at least an element of zero, the matrix is reduced. The cost of the root vertex is equal to the total of all the row and column reducer. 3) Let A be a reduced matrix for vertex R and S be a branch of vertex R. For each vertex connected to the starting vertex, do this to reduced matrix A. a) Replace the value of all elements in row R and column S into A i j weight of edges ( , ) ij in the reduced matrix, and r be the sum of all reducer in the reduced matrix for vertex S . Then 4) Select one of the active vertices that has the lowest cost, then expand it by repeating step c on that vertex. When there is no longer any active vertex, stop.
b. GUI MATLAB GUIs, also known as graphic user interfaces, are simply items provided by MATLAB that enable users work with numerical computing and data processing using graphical interfaces like push buttons, sliders, radio buttons, toggle buttons, pop-up menus, and so on (Mengarelli et al., 2016;Sharma, Sharma, & Sahu, 2017). In MATLAB there are two basic methods for creating GUIs: writing the GUI program from scratch, or using the built-in Graphical User Interface Development Environment (GUIDE). According to Messac (2015), GUIDE allows the user to graphically lay out the GUI, and then MATLAB generates the code for it automatically. Thus, only two files-the fig-file and the m-filecan be used to create the MATLAB GUI program ( Figure 2). In general, an m-file is a list of MATLAB commands that may be run in a batch process by just inputting their name. There are two types of m-files, namely script file and function file. This study employed the function m-files, which differ from script files in that they can accept one or more variables as inputs and can return one or more variables as outputs (Lopez, 2014), as shown in Figure 2.

Data identification
At present, PBHA has hundreds of students studying Al Quran and is able to gather zakat, infaq, and sodaqoh from the public to be distributed to designated locations. Each year, as an 'amil, they collect and deliver more than a ton of rice from donations to the eleven foster villages. There are still certain challenges, particularly in the distribution of zakat al-fitr, such as the issue of the delay between receiving and dispersing rice. Till one in the morning (1 Shawwal), they get leftover rice from mosques in Sleman and Yogyakarta city. However, the rice needs to reach the destination locations (which are pretty far away) before Eid prayers, or else zakat alfitr will merely be converted into sodaqoh. For this reason, 'amil needs an efficient zakat al-fitr distribution route to ensure that rice is delivered on time.
According  Table 1 displays the separation between locations in kilometres, as shown in Table 1.  1, 4),..., (1,12), (2,1),..., (11,12)} EG  can be obtained. Each edge has the weight or the number representing the distance (in kilometers) between locations. Such graph G along with the distance between the locations (as indicated in Table 1) is illustrated in Figure 3.
The TSP rule, which is a closed path with a minimum weight that traverses each vertex once, will be used to analyze Figure 3. In practice, the path departs from vertex 1 (PBHA headquarters), visits each of the eleven foster villages once, and then loops back around. Such mechanism is indeed referring to the Hamiltonian graph (Ibrahim & Mussafi, 2013). Note that the TSP mandates the minimum total distance of travel. One of the algorithms for solving TSP is the branch-and-bound algorithm.

Branch-and-bound algorithm analysis
A symmetric 12 12  matrix can be used to represent Table 1 (see Figure 4). As previously indicated, the branch-and bound algorithm primarily uses a reduced cost matrix to determine the limit value of cost of the root vertex and iteration to establish the route to be taken. The decreased cost matrix starts with a row reduction and then moves on to a column reduction. Reduce row 1 of the matrix in Figure 4 by 7.1, and so on until the matrix in Figure 5 is obtained, by subtracting each element from all rows by the least ij c value in each of those rows, as shown in Figure 4 and Figure 5.

Figure 5. A row reduced cost matrix
In contrast, using the matrix in Figure 5 as a guide, each element in each of the columns is reduced by the smallest ij c value in that column, for instance, reducing column 1 of the matrix in Figure 4 by 0.9, and so on until Figure 6 is generated. Consequently, the total sum of all reducers (rows and columns) or the limit of the root vertex ˆ() cR = (7.1 + 5.7 + 4.9 + 4.9 + 11.8 + 7.3 + 7.3 + 10.9 + 13.5 + 6.3 + 6.3 + 6.2) + (0.9 + 6.6 + 3.6 + 7.2) = 110.5. Furthermore, the iteration process will be taken as many as 11 iterations. The number of iterations is determined from the number of vertices adjacent to the root vertex. This iteration is used to determine the path of each vertex that must be passed according to the TSP rules. Additionally, the iteration process may require up to 11 iterations. The number of vertices adjacent to the root vertex is used to calculate the number of iterations. The path of each vertex that needs to be passed in accordance with the TSP rules is determined using this iteration. Each iteration's outcome will affect how the following one is calculated. Only the first iteration will be shown in this paper, as shown in Figure 6 and Figure 7. 3.3 0.3 3.9 8 2.3 -0 2 6.3 16.9 12 0.9 7 7.7 4.7 9.8 13.9 7 0 -0 5.9 17.5 11.5 5.  Vertex 1 and the other 11 connected vertices will be examined in the first iteration's calculation, i.e., (1,2), (1,3), (1,4), .…, (1,12). For vertex 2 (the edge connecting vertex 1 and vertex 2): a. To ensure that no pathways leave vertex 1 or enter vertex 2, change all values in row 1 and column 2 of the reduced matrix A to "-".
b. Change A (2,1) to "-" (element row 2 column 1 in matrix A) to prevent the use of edge (2,1). c. Reduce rows and columns with the smallest ij c value. Since there isn't row that doesn't include zero, the column with the smallest ij c value is reduced. The smallest ij c value can be found in column 12 of matrix A. thus reduce all of its elements by 0.5 (for the result see Figure 7). Hence. the total of all reducers is ( ) 0.5. r  d. Using equation (1), determine the boundary value of vertex 2 (the edge from vertex 1 to vertex 2) to Vertex 2 and vertex 12 which has the smallest limit value in the search tree are retrieved once the limit value from vertex 1 to the other 11 vertices has been obtained. Therefore the second iteration will explore either vertex 2 or vertex 12. Furthermore, the analysis of the following iterations (2 to 11) is analogous to the prior iteration and is shown in more detail in Table 2. This results in a visit path with a total distance of 149.1 km either (1-2-5-6-8-7-9-11-10-12-3-4-1) or (1-2-5-6-8-7-9-11-10-12-4-3-1).

Computational programming
The experiments in this computational programming were conducted on a PC with Intel Core i3 Processor 7020U running at 2.30 GHz and 8 Gb of RAM. The algorithms were coded in MATLAB R2017a 9.2.0.538062. Row and column reduction matrices, GUI figures, distance matrices, TSP paths, and plotting are only a few of the several types of MATLAB m-file code that have been developed, as shown in Figure 8. A form similar to that seen in Figure 8a will appear after running the m-file. A notepad file is used to store the input data related to the distances between locations (Figure 8b). The button "proceed" refers to the action of solving the given distribution problem using the branch-andbound algorithm to identify the shortest closed path.
Additionally, the twelve locations will be inspected using a genuine map that was created using Google Maps, as shown in Figure 8a. The plotting code identifies the shortest route of the problem (Figure 8b). By pressing the "proceed" button, the 152.9 km long TSP route of 1-12-6-5-4-3-2-9-11-10-8-7-1 is obtained. The route passes through Sidorejo, Sumberarum, Pendoworejo, Gerbosari, Banjaroyo, Banjarasri, Sendangagung, Tuksono, Argodadi, Triwidadi, Jatimulyo, and Giripurwo before returning to Sidorejo. The map is complemented by yellow and red connecting lines, as seen in the program output (Figure 9b). The red line represents the return to the final vertex while the yellow line represents the departure from the initial vertex. By avoiding the designated region and adopting a more accurate public setting, i.e., distribution route of zakat al-fitr in some form, this research alters Coutinho, Nascimento, Pessoa, & Subramanian (2016) work, and the map guide is the end result.

D. CONCLUSION AND SUGGESTIONS
Through this research, numerous methodical processes can be developed to optimize the zakat fitrah distribution route at PBBA such that no zakat fitrah switches status to sodaqoh. The five systematic procedures include data collecting, table of distance between points, graph analysis, branch-and-bound algorithm analysis, and comparative studies. Furthermore, it may be suggested that a branch-and-bound algorithm approach can be used as a substitute technique for the community in general or, more particularly, for zakat, infaq, and sodaqoh institutions like PBBA, to determine the minimum distribution route of a closed path both manually and computationally. The results indicate that manual-based algorithmic analysis was somewhat more efficient than computational-based algorithm analysis in producing the total distance distribution of zakat al-fitr for this case study. This study can be expanded upon to be used in areas unrelated to routes, such as research objects based on operating costs. Additionally, manual algorithm analysis yield better results than computational one, leaving room for additional review or enhancement of the MATLAB program's syntax.