## 3 Similarity Analysis Approach
### Information Based on IP Address  
A user's mobility in different places causes it to connect to different networks. This connection with the networks assigns mobile devices to separate IP addresses. An IP address is a 32-bit long address assigned to each device when it connects to a network. An IP address can also provide geographical information about a device [25]. An IP address has two parts: a network ID and a host ID. The network ID shows the information on the type of the specific network to which the device is connected. The host ID provides information about the particular host in the network. In comparison, the MAC (media access control) address is a 48-bit unique identifier of each device  
In recent research, [PERSON] et al. [26] demonstrated that if a user is connected to an AP (access point), the user keeps the connectivity unless the AP goes out of range and only then connects to the new best available AP. In Figure 1, a user is connected to a public AP, and even when the user arrives home, a better connection is available. The user stays connected to the less reliable/slow public network unless the user himself shifts to the better network or the public AP goes out of range. In a similar analogy, a set of two users, despite having a small Euclidean distance between them, might be connected to a different set of APs, and have different connectivity routes. This gives rise to the motivation that IP-based similarity has been used rather than a Euclidean distance-based user's mobility similarity analysis.  
By keeping the scenario already mentioned above, in the presented research, the AP connectivity is kept as a sign of presence at a location, i.e., if two users are connected to the same AP are considered to be at the exact location. This increases the chance of the two users having a direct connection in the MANET (mobile ad hoc network) scenario. This connectivity consideration helps us better correlate the user's mobility patterns and shows improved similarity.  
The proposed method models the space-time associations of the mobility patterns and is, thus, better able to determine the similarities among the mobility patterns of users. a user's presence probability at a location is used to find the co-occurrence with others as part of the model. In the proposed model, we used cosine similarity as a measure to estimate the correlation among users. If the mobility patterns are correlated, i.e., mobility directions are the same, then the cosine similarity enables the model to compute similarity patterns among the users. Here, it is important to mention that the IP information is central  
Figure 1: Mobile user connectivity behavior with access points.  
to determining the geo location of a user. As previously mentioned, the IP address not only shows the device ID but network information as well. In the model, IP addresses are used as a whole, which results in the construction of a more informed model and, hence, better similarity patterns are obtained. In Equations (1) and (2), the joint probability of the user's presence based on the IP address is made part of the model. The model is explained in the next section and the effectiveness of the model is verified from the results presented later.