# Reliability of Social Networks on Activity-on-Node Binary-State with Uncertainty Environments
## 3 Overview of BAT and Fuzzy Set
### Aoa Bat  
(AOA) BAT was first proposed by [PERSON] [48]. Based on binary addition, it is used to solve AOA binary-state network reliability problems. Owing to its simplicity, efficiency, and memory saving capability, BAT has been implemented in various areas. It has recently become a new search method for finding all possible solutions or vectors. For example, BATs have been implemented to solve rework problems [29], network reliability problems [34; 48; 51; 52], wildfire spread prediction [49], and forecasting of computer virus propagation [50].  
From the results of numerical experiments evaluating the running time and computer memory, BAT [48] was found to outperform depth-search-first algorithms (DFS), for example, the quick IET [37], which is the best-known algorithm for calculating MFN reliability; the breadth-search-first algorithm (BFS), the universal generating function methodology (UGFM) [19], which is the main algorithm for solving information network reliability problems [53]; and binary-decision diagram (BDD) [35], which outperforms other algorithms in binary-state network reliability problems [17; 18].  
The purpose of the original BAT is to search all possible vectors for related AOA problems [48]. BAT starts from a vector zero, say \(X\), and adds one to \(X\) to update \(X\) iteratively. Let us briefly explain the basic principles of BAT. The entire original BAT is processed in a backward manner from the last coordinate of \(X\) to the first coordinate [48]. Let \(x_{k}\) be the current coordinate. If \(x_{k}=0\), \(x_{k}\) is updated by letting \(x_{k}=1\). A new vector is formed, and the current coordinate is reset to \(m\), e.g., (1, 0, 0) is updated to (1, 0, 1). If \(x_{k}=1\), \(x_{k}\) is updated by letting \(x_{k}=0\). The process is then moved to the \((k-1)\)th coordinate to repeat the aforementioned procedure until the new current coordinate is zero, e.g., (1, 0, 1) is updated to (1, 1, 0).  
The original AOA BAT pseudocode is as following Algorithm 1[48]:  
```
Input: \(m\). Output: All solutions \(X\) of the problem.  Let SUM = 0, \(X\) = 0, and \(k=m\).  while SUM \(<m\) if\(X(a_{k})=1\)  SUM = SUM - 1 \(X(a_{k})=0\) else  SUM = SUM + 1 \(X(a_{k})=1\) if\(k>1\) \(k=k-1\)  end end end
```  
**Algorithm 1**AOA BAT  
From the aforementioned five lines of pseudocode, it can be observed that BAT is simple to program, efficient to run, easy to understand, economical in RAM, and suitable for make-to-fit [11; 29; 48; 52; 51; 52].  
The number of all obtained vectors is \(2^{m}\) for an \(m\)-tuple vector zero in STEP B0. The time complexity of BAT is \(O(2^{m+1})\), as proved in [52]. Furthermore, the total computer memory is only \(O(m)\) because the current vector \(X\) is used repeatedly, and a new updated vector needs to compute only its related values or predefined functions [48].  
The following table shows how the AOA BAT is implemented to find all the state vectors in Figure 1. Because \(\mid E\mid =6\) in Figure 1, there are \(2^{6}\) = 64 vectors at the end. To recognize the sequence of the obtained vectors easily, the notation \(X_{i}\) is used in Table 2. However, in the actual BAT procedure, there is always one vector \(X\) in the complete process; there is no need to discriminate the sequence of the obtained \(X\).