4. Algorithm design, development and implementation

This section discusses the design, development and implementation of the algorithms in this research. There are two algorithms to be discussed: trust-enabled generic algorithm diffusion model (T-GADM) and domain specified trust-enabled generic algorithm diffusion model (DST-GADM). These algorithms will be discussed in their respective subsections. It is also acknowledged that the operation of T-GADM and DST-GADM also rely on two additional sub-modules namely the enhanced text analysis (E-TA) with the presence of Trusted Social Node algorithm (TSN) and Virtual Social Node algorithm (VSN). These algorithms had been published in Refs. [30, 31, 34] therefore will not be discussed in this article.

#### 4.1. Trust-enhanced Generic Algorithm Diffusion Model

Trust-enhanced Generic Algorithm Diffusion Model (T-GADM) is the enhanced algorithm version from generic algorithm diffusion model (GADM) where the source social node's trust value is taken into consideration when calculating the recipient social node's influence acceptance. The likelihood of a social node accepting an influence given the trusted source node is calculated by the application of certainty factor that measures the belief or disbelief conditional probabilities Pr(Ai|T) as illustrated in Eq. (2).

$$\Pr(\mathbf{A}\_i|\mathbf{T}) = \frac{\Pr(\mathbf{T}|\mathbf{C}\_i)\Pr(\mathbf{A})}{\Pr(\mathbf{T}|\mathbf{C}\_i)\Pr(\mathbf{A}) + \Pr(\mathbf{T}|\neg\mathbf{C}\_i)\Pr(\neg\mathbf{A})} \tag{2}$$

Where:


The results generated from Eq. (3) are then used to evaluate the certainty factor that the influence has been successfully ingested. This is achieved by applying Eq. (3) as measure-ofbelief and Eq. (4) for measure-of-disbelief, then finally calculating the certainty values by applying Eq. (5).

Social Trust: Evaluating Node Influential Capability in Social Networks http://dx.doi.org/10.5772/67021 9

$$\text{MB}(H\_{\text{accept}}|E\_{\text{trust}}) = \frac{\max[\text{Pr}(A|T), \text{Pr}(\alpha)] \text{-Pr}(\alpha)}{1 \text{-Pr}(\alpha)}\tag{3}$$

$$\text{MD}(H\_{\text{accept}}|E\_{\text{trust}}) = \frac{\min[\text{Pr}(A|T), \text{Pr}(\alpha)] \text{-Pr}(\alpha)}{1 \text{-Pr}(\alpha)} \tag{4}$$

$$\text{CF} = \frac{\text{MB}(H\_{\text{accept}}|E\_{\text{trust}}) - \text{MD}(H\_{\text{accept}}|E\_{\text{trust}})}{1 - \text{min}[\text{MB}(H\_{\text{accept}}|E\_{\text{trust}}), \text{MD}(H\_{\text{accept}}|E\_{\text{trust}})]} \tag{5}$$

Eqs. (4)–(6) calculate the following parameters:

GADM brings influence diffusion to a whole new level, where these influences will be diffused to target at recipient social nodes that shares the similar interest (or domains) with the source social node. The results generated by these algorithms are presented as probability values with a minimum value of 0 and a maximum value of 1, with an accuracy of 3 decimal points. Details

This section discusses the design, development and implementation of the algorithms in this research. There are two algorithms to be discussed: trust-enabled generic algorithm diffusion model (T-GADM) and domain specified trust-enabled generic algorithm diffusion model (DST-GADM). These algorithms will be discussed in their respective subsections. It is also acknowledged that the operation of T-GADM and DST-GADM also rely on two additional sub-modules namely the enhanced text analysis (E-TA) with the presence of Trusted Social Node algorithm (TSN) and Virtual Social Node algorithm (VSN). These algorithms had been

Trust-enhanced Generic Algorithm Diffusion Model (T-GADM) is the enhanced algorithm version from generic algorithm diffusion model (GADM) where the source social node's trust value is taken into consideration when calculating the recipient social node's influence acceptance. The likelihood of a social node accepting an influence given the trusted source node is calculated by the application of certainty factor that measures the belief or disbelief conditional

• Pr(Ai|T): Chance of having an influence accepted by the recipient (Ai) given a trusted

• Pr(T|Ci): Chance of having a trusted social node (T) given that it shows significant

• Pr(T|¬Ci): Chance of having a trusted social node (T) given that does not show significant

The results generated from Eq. (3) are then used to evaluate the certainty factor that the influence has been successfully ingested. This is achieved by applying Eq. (3) as measure-ofbelief and Eq. (4) for measure-of-disbelief, then finally calculating the certainty values by

ÞPrðAÞ

<sup>Þ</sup>PrðAÞ þ PrðTj<sup>¬</sup> <sup>C</sup>iÞPrð<sup>¬</sup> <sup>A</sup><sup>Þ</sup> (2)

of the algorithm design are discussed in Section4.

8 Recent Progress in Parallel and Distributed Computing

4. Algorithm design, development and implementation

published in Refs. [30, 31, 34] therefore will not be discussed in this article.

PrðAijTÞ ¼ PrðTjC<sup>i</sup>

source (T). This is what the algorithm wants to calculate.

• Pr(A): Chance of having a recipient node to accept an influence.

• Pr(¬A): Chance of having a recipient node to not accept an influence.

PrðTjC<sup>i</sup>

4.1. Trust-enhanced Generic Algorithm Diffusion Model

probabilities Pr(Ai|T) as illustrated in Eq. (2).

interactive consistency.

interactive consistency.

applying Eq. (5).

Where:


The following pseudocode illustrates the implementation of the T-GADM influential diffusion algorithm.

```
START
//Eqn ver 1 w/trust (Baysean Prop)
FUCNTION probability_v1(St,Ra)
Set PrAT = ((Ra * St) + St)/2;
return round(PrAT, 4);
END FUNCTION
//Eqn ver 2 w/trust (Enhanced Baysean)
FUNCTION probability_v2(St,Ra)
Set notRa = 1 - Ra;
Set notSt = 1 - St;
Set PrAT = ((Ra * St)/((Ra * St) + (notRa * notSt))) *
(1 - 0.13);
return round(PrAT, 4);
END FUNCTION
FUNCTION belief(const,PrAT,St,Ra)
Set MB_HaEt = ((max(PrAT,constant)) - constant)/(1 - constant);
return round(MB_HaEt, 4);
END FUNCTION
FUNCTION disbelief(const,PrAT,St,Ra)
Set MD_HaEt = ((min(PrAT, constant)) - constant)/(0 - constant);
return round(MD_HaEt, 4);
```

```
END FUNCTION
FUNCTION cf(MB_HaEt,MD_HaEt){
Set cf = (MB_HaEt - MD_HaEt)/(1 - (min(MB_HaEt, MD_HaEt)));
return round(cf, 4);
END FUNCTION
//Check Threshold
FUNCTION checkThresh(value,threshold){
IF input >= threshold
return 'accepted';
ELSE
return 'rejected';
END IF
END FUNCTION
END
```
#### 4.2. Domain specified trust-enhanced generic algorithm diffusion model

This research also investigates the application of domain-related trusted social nodes in order to examine whether this will further increase the rate of successfully influenced social nodes on a social network platform. Domain in this research represents the interest groups a social node involves or participates in. Domain specified analysis is an extended module from the T-GADM. In the domain specified trust influence diffusion algorithm, an additional step that uncovers domains of each social node from the dataset is needed. All the domain relationship links harvested are illustrated as a conceptual diagram in Figure 3.

Figure 3. Harvested domains and domain links for domain specified trust influential maximization conceptual diagram.

The relationship between two domains is calculated by applying the concept mapping [35, 36] and weighing technique [37] where domain relationships are classified into three tiers:

END FUNCTION

END FUNCTION //Check Threshold

ELSE

END IF END FUNCTION

END

return round(cf, 4);

IF input >= threshold return 'accepted';

return 'rejected';

FUNCTION cf(MB\_HaEt,MD\_HaEt){

10 Recent Progress in Parallel and Distributed Computing

FUNCTION checkThresh(value,threshold){

Set cf = (MB\_HaEt - MD\_HaEt)/(1 - (min(MB\_HaEt, MD\_HaEt)));

4.2. Domain specified trust-enhanced generic algorithm diffusion model

links harvested are illustrated as a conceptual diagram in Figure 3.

This research also investigates the application of domain-related trusted social nodes in order to examine whether this will further increase the rate of successfully influenced social nodes on a social network platform. Domain in this research represents the interest groups a social node involves or participates in. Domain specified analysis is an extended module from the T-GADM. In the domain specified trust influence diffusion algorithm, an additional step that uncovers domains of each social node from the dataset is needed. All the domain relationship

Figure 3. Harvested domains and domain links for domain specified trust influential maximization conceptual diagram.


Each harvested domain, domain relationship links and domain relationship weights are then indexed using Domain ID (Domain Identity represented by a value) (as seen in Table 2).



Table 2. Weighted domain specified referent table.

Domain specified trust influence uses Eq. (6) for social influential acceptance-related calculations.

$$\text{DwPr}(\mathbf{A}\_i|\mathbf{T}) = \frac{[\text{Pr}(\mathbf{A}\_i|\mathbf{T}) + \text{Pr}(\mathbf{A}\_i|\mathbf{T})(Dm\mathbf{j}r + \sum \square \mathbf{L} + \sum \square \mathbf{D}mmr)]}{1 + \text{Pr}(\mathbf{A}\_i|\mathbf{T})(Dm\mathbf{j}r + \sum \square \mathbf{L} + \sum \square \mathbf{D}mmr)} \tag{6}$$

#### Where


• ∑⋂ Dmnr: Represents the summation of all weights of intersected domain minors with the domain inherited by the node in analysis.

The following pseudocode illustrates the implementation of the DST-GADM influential diffusion algorithm

```
START
Import domains as domainsCache
//Eqn ver 3 w/trust and domain (Enhanced Baysean)
FUNCTION probability_v3(St,Ra,links,levels)
Set mjr = 0;
Set l2 = 0;
Set mnr = 0;
//Explode node links
Set links = explode('|', links);
Set major = links.getLastElement();
//Find associative domains
FOREACH domainsCache as key and payload
IF payload.get['major'] == major
Set use = domainsCache.get[key];
END IF
END FOREACH
//Prep traverse levels
Set traverseArrays = [];
IF levels == 1
Set mjr = (float) mjr(use,links);
ELSE IF levels == 2
Set mjr = (float) mjr(use,links);
Set l2 = (float) level2(use,links);
ELSE IF levels == 3
Set mjr = (float) mjr(use,links);
Set l2 = (float) level2(use,links);
Set mnr = (float) mnr(use,links);
END IF
Set notRa = 1 - Ra;
Set notSt = 1 - St;
Set prob = ((Ra * St)/((Ra * St) + (notRa * notSt))) *
(1 - 0.13);
Set PrAT = (prob + (prob * mjr) + (prob * l2) + (prob * mnr))/
(1 + (prob * mjr) + (prob * l2) + (prob * mnr));
return round(PrAT, 4);
END FUNCTION
//Calculate domain weightages (returns calculated values)
```
Domain specified trust influence uses Eq. (6) for social influential acceptance-related calculations.

Domain major Level 2 domain Domain minor

ID Weight ID Weight ID Weight [15] 1.0 [07] 0.8469 [09] 0.2112

[16] 1.0 [01] 0.5485 [09] 0.1653

[17] 1.0 [09] 0.4439 [06] 0.2846

[19] 1.0 [22] 0.4575 [21] 0.2133 [20] 1.0 – [19] 0.1556 [21] 1.0 [22] 0.3354 [19] 0.1757 [22] 1.0 [19] 0.4121 [10] 0. 2675

[23] 1.0 [24] 0.3216 [06] 0.1128 [15] 0.2144 [24] 1.0 [15] 0.4174 [23] 0.1127

[18] 1.0 – –

DwPrðAijTÞ ¼ <sup>½</sup>PrðAijTÞ þ PrðAijTÞðDmjr <sup>þ</sup> <sup>∑</sup>∩L<sup>2</sup> <sup>þ</sup> <sup>∑</sup>∩DmnrÞ�

• DwPr(Ai|T): Chance of having an influence accepted by the recipient (Ai) given a trusted

• Pr(Ai|T): Chance of having an influence accepted by the recipient (Ai) given a trusted

• Dmjr: Represents the weight inherited by the domain major. In this research, since the domain major represents absolute identical relationship to the domain inherited by the node in analysis, therefore the concept weight between the node in analysis and domain

• ∑⋂L2: Represents the summation of all weights of intersected level 2 domains with the

source (T) with the presence of certain domain entities (Dw).

source (T). This is what the algorithm previously calculated.

domain inherited by the node in analysis.

Table 2. Weighted domain specified referent table.

12 Recent Progress in Parallel and Distributed Computing

Where

major is 1.0.

<sup>1</sup> <sup>þ</sup> PrðAijTÞðDmjr <sup>þ</sup> <sup>∑</sup>∩L<sup>2</sup> <sup>þ</sup> <sup>∑</sup>∩Dmnr<sup>Þ</sup> (6)

[07] 0.2152 [10] 0.1216

[06] 0.2324 [05] 0.1536

[23] 0.1211

[02] 0.1294

```
FUNCTION mjr(use,links)
IF links.getLastElemet() == use.get['major'])
Set payloads = use.get['payload'];
return payloads['majorWeight'];
ELSE
return 0;
END IF
END FUNCTION
FUNCTION level2(use,links)
Set payloads = use.get['payload'];
Set payloads = payloads.get['level2'];
Set cumulativeWeight = 0;
FOREACH links as link
FOREACH payloads as payload
IF payload.get['domainID'] == link
Set cumulativeWeight += payload.get['weight'];
END IF
END FOREACH
END FOREACH
return cumulativeWeight;
END FUNCTION
FUNCTION mnr(use,links)
Set payloads = use.get['payload'];
Set payloads = payloads.get['minor'];
Set cumulativeWeight = 0;
FOREACH links as link
FOREACH payloads as payload
IF payload.get['domainID'] == link
Set cumulativeWeight += payload.get['weight'];
END IF
END FOREACH
END FOREACH
return cumulativeWeight;
END FUNCTION
```
#### 4.3. Acceptance threshold

Threshold value represents the level of certainty both the source node and the recipient node must adhere to. By increasing the threshold value means increasing the quality of influencing messages and the level of trust propagated from the source social node, hence it potentially reducing the number of successfully influenced social nodes. Since there is no common specification on what threshold value should be used and the values often depend on the researcher's preference, threshold value used in this research is set to neutral or zero (0).
