## 4 Research Methodology
### Description of the Benchmark Algorithm (BRDFS)
#### 4.3.2 Trust Management System (TMS) of BRDFS  
BRDFS uses a popular TMS proposed in [31] to estimate the most trustworthy measurement at time step \(\mathbf{t}\) based on the measurements from all available sensors. This TMS is implemented as follows. Normalize all measurements at time step \(\mathbf{t}\) using the min-max normalization. Find the Euclidean distance between each pair of measurements. Estimate the similarity \(\left(\mathbf{D}\mathbf{S}_{i,j}\right)\) between the measurements \(\left(\mathbf{m}\mathbf{v}_{i}(\mathbf{t})\mathbf{\ and\ }\mathbf{m}\mathbf{v}_{j}(\mathbf{t})\right)\) of sensors \(\mathbf{i}\) and \(\mathbf{j}\) using the following equation:  
\[\mathbf{D}\mathbf{S}_{i,j}=\mathbf{1}-\mathbf{Euclidean\ distance\ between\ }\mathbf{m}\mathbf{v}_{i}(\mathbf{t}) \mathbf{\ and\ }\mathbf{m}\mathbf{v}_{j}(\mathbf{t}) \tag{12}\]  
Estimate the provenance similarity \(\left(\mathbf{P}\mathbf{S}_{i,j}\right)\) between \(\mathbf{m}\mathbf{v}_{i}(\mathbf{t})\) and \(\mathbf{m}\mathbf{v}_{j}(\mathbf{t})\) which is the ratio of the total number of common nodes in both provenances to the total number of nodes in the provenance with the longer length. Adjust \(\mathbf{D}\mathbf{S}_{i,j}\) to \(\mathbf{P}\mathbf{S}_{i,j}\) using the following pseudocode:  
\[\mathbf{if\ }\mathbf{D}\mathbf{S}_{i,j}\geq\mathbf{0.6\ then\ }\mathbf{D}\mathbf{S}_{i,j}=\mathbf{D}\mathbf{S} _{i,j}+\left(\mathbf{1}-\mathbf{P}\mathbf{S}_{i,j}\right)\]  
\[\mathbf{else\ }\mathbf{D}\mathbf{S}_{i,j}=\mathbf{D}\mathbf{S}_{i,j}-\mathbf{P}\mathbf{S}_{i,j}\ \ \mathbf{end}\]  
Since in our simulation, we assume that all sensor nodes are directly linked to the based station, \(\mathbf{P}\mathbf{S}_{i,j}\) is always zero. Find the average similarity \(\overline{\mathbf{D}\mathbf{S}_{j}}\) of each measurement \(\left(\mathbf{m}\mathbf{v}_{j}(\mathbf{t})\right)\) to all other measurements.  
\[\overline{\mathbf{D}\mathbf{S}_{j}}=\frac{\sum_{i=1}^{n-1}\widehat{\mathbf{D}\mathbf{S}_{i,j} }}{n-\mathbf{1}} \tag{13}\]  
where \(\mathbf{n}\) represents the total number of measurements.  
Find the measurement \(\mathbf{m}\mathbf{v}_{j}(\mathbf{t})\) with the highest \(\overline{\mathbf{D}\mathbf{S}_{j}}\) as the mean represents the total number of measurements (\(\mathbf{M}\)) measurement (i.e., the most trustworthy measurement). Estimate the standard deviation \(\left(\sigma\right)\) of \(\mathbf{M}\). Generate a Gaussian function \(\mathbf{f}(\mathbf{M}\),\(\sigma)\) with \(\mathbf{M}\) and \(\mathbf{\sigma}\). Assign an intermediate trust score \(\mathbf{s}_{\mathbf{d}}(\mathbf{t})\) to each measurement at time step \(\mathbf{t}\)using \(f(M,\sigma)\). Estimate the final score \(\overline{s}_{d}(t)\) of each measurement using the following linear model.  
\[\overline{s}_{d}(t)=c_{d}\overline{s}_{n}(t-1)+(1-c_{d})\overset{\wedge}{s}_{d} (t) \tag{14}\]  
where \(\overline{s}_{n}(t-1)\) is current reputation score of the sensor node made the measurement. \(c_{d}\) is a constant to be specified by the user. We set \(c_{d}\) to 0.5.  
Set \(\overline{s}_{d}(t)\) as the intermediate reputation score \(\left(\overset{\wedge}{s}_{n}(t)\right)\) of the corresponding sensor. Estimate the final reputation score \(\left(\overline{S}_{n}(t)\right)\) of the sensor node at the end of time step \(t\) using the following equation and we set the value of \(c_{d}\) to 0.5.  
\[\overline{s}_{n}(t)=c_{d}\overline{s}_{n}(t-1)+(1-c_{d})\overset{\wedge}{s}_{ n}(t) \tag{15}\]