## 4 Detailed Design
### Social Tie Classifier System  
The FSF system divides the node's social ties into three groups: _friends_, _acquaintances_, and _unknown_ nodes. The main difference between the nodes' _friends_ and _acquaintances_ is that friends represent a stronger social tie than the node's _acquaintances_. For example, in a university classroom, some nodes can be friends of a node \(n_{x}\). These nodes are those with whom \(n_{x}\) has a close relationship. Most of the time, they also meet each other outside the university. However, there are nodes with whom \(n_{x}\) has no direct relationship, but they are frequently in contact. For example, to go to the university, \(n_{x}\) usually takes the same bus, and it meets the same driver (and other people) every day. Despite they are not friends, they have regular contacts. It is also worth mentioning that messages addressed to nodes' friends have the highest priority compared to those addressed to acquaintances, that is, FSF forwards those messages first. Furthermore, this division is important because, when a relay node is assessed as socially selfish, it will only accept receiving those messages addressed to its friends.  
The social tie classifier system is divided into two mechanisms:  
* **Nodes' acquaintance mechanism**--it is a mechanism responsible for discovering the nodes' acquaintances group. To achieve this aim, we propose a new metric to depict the node's acquaintanceship.  
Figure 1: Flowchart of the FSF forwarding strategy.  
* **Nodes' friend mechanism**--it is the mechanism responsible for discover the nodes' friends group. This mechanism takes into account two scenarios: (i) the information about the friendship strength between the nodes is available (self-reported friendship), and (ii) the self-reported information is not available.  
As mentioned above, every network node stores information about the social ties in two lists entitled _my social ties_ and _global social ties_.  
* _my social ties_--This list is divided into \(N-1\) rows, one for each other node in the network. The rows have the format \((id,our\_social\_tie)\), where \(our\_social\_tie\) can be _friends_ (1), _acquaintances_ (0), and _unknown_ (\(-1\)). At every contact opportunity, both the nodes in contact update the row corresponding to each other in _my social ties_ list.
* _global social ties_--This is a matrix containing \(N\) rows and \(N\) columns with \(0\)'s in the diagonal, where the value stored at the position \([i,j]\) represents the social tie between nodes \(i\) and \(j\) (1, 0, or \(-1\)). Every node uses this structure to store the already known information about the social ties between the other nodes in the network. At each contact opportunity, after updating the information, the nodes involved exchange their _my social ties_ lists. Then, based on this information, they also update their _global social ties_ matrix. Finally, based on this matrix, the nodes are able to build the first part of their own routing table.  
As referred to above, the social ties' discovery process is performed the first time after \(T\) seconds. The time between \(0\) and \(T-1\) represents the period of time in which every node is moving around the network and collecting the data necessary for the first execution of the _Social tie classifier system_. After this initial period, every \(T\) seconds a new classification of the social ties is performed by every network node. Next, we detail the mechanisms used by the _Social tie classifier system_.