# Inferring Urban Social Networks from Publicly Available Data
## 3 Impact of System Parameters
### Accounting for Age in Friendships  
One fundamental design choice of our friendship graph model consists in enforcing that the proportion of intra- and inter-age group connections adheres to publicly available contact data. This information is encoded in the age-mixing matrix \(S\) and, as emerged in Section 2.3, imposing this condition comes at the cost of additional constraints to the model. To verify the importance of having age-dependent edges, we compare three different configurations: (i) a homogeneous population connected using a constant matrix \(S\); (ii) a homogeneous population connected based on the real (i.e., data-driven) \(S\); (iii) a real (i.e., data-driven) population connected based on the real \(S\). With homogeneous population we mean that both the age distribution and the spatial density are taken to be uniform. The constant matrix \(S\) corresponds to age-homogeneous mixing, as explained in Appendix B. Again, we consider the combinations of parameters selected in Section 2.3, plus a fitness-neutral model with \(f_{u}\equiv 1\) for all \(u\). Finally, to guarantee that age-dependent preferences and patterns in the friendship edge distribution are well visible, we only consider our friendship graph, and we fix \(\mu=5\), to obtain a network that is well connected but not too dense. For each of the four age groups, we computed both the average degree of the members of each group in the whole friendship graph \(G_{F}\), and their average degree considering friendship connections with their peers only, that is, within the subgraph of \(G_{F}\) induced by the set of individuals belonging to that group. In Figure 2, we report these data for the city of Florence--the other cities show analogous patterns; see Appendices C and D \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{\(\beta\)} & \multirow{2}{*}{\(f_{u}\)} & \multicolumn{2}{c}{\(\mu=1\)} & \multicolumn{2}{c}{\(\mu=5\)} \\ \cline{3-6}  & & \(G_{F}\) & \(G\) & \(G_{F}\) & \(G\) \\ \hline
0.5 & 1 & 1.9\% & 76.6\% & 99.3\% & 99.8\% \\
0.5 & \(1+\mathcal{LN}(\ln(2),0.25)\) & 18.8\% & 75.8\% & 98.2\% & 99.4\% \\
2 & 1 & 8.0\% & 76.0\% & 99.0\% & 99.7\% \\
2 & \(1+\mathcal{LN}(\ln(2),0.25)\) & 20.9\% & 75.1\% & 97.9\% & 99.3\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: (**Florence**) Percentage of nodes of the graph that belong to the giant component, on average, for the friendship graph \(G_{F}\) and the entire social graph \(G\), as \(\beta\), \(f_{u}\), and \(\mu\), vary. Five friends are sufficient (on average) to ensure that the giant component covers almost the entirety of the network. for details. With homogeneous population and constant \(S\) (left panel) all age groups are, de facto, equivalent and the age-stratification is irrelevant for friendships. Introducing real nonuniform age-mixing coefficients \(s_{i,j}\), even with a homogeneous population (central panel), ensures that the data-driven internal cohesion of younger age groups is preserved, but adults are more likely to establish links with other age groups. Finally, when the population and the matrix \(S\) are both data-driven (right panel), we notice an increment in the overall average degree of children and young people, which are \(<\)25% in the real population, and a decrease in the overall average degree of adults, which instead constitute \(\approx\)43% of the population of Florence. Significantly, Figure 2 confirms that neither \(f_{u}\) nor \(\beta\) have any impact on the age-mixing patterns of the graph, as imposed by construction. For the sake of completeness, Figure 3 shows the percentage of the total number of edges that link each age group with all others, for the friendship graph and for the entire social graph obtained for the city of Florence using the real population and real \(S\)--Figures A5 and A15, for Viterbo and Sabaudia. Figure 3a is essentially a visualization of expression (4), and the value in each cell is, thus, proportional to the size of the two groups and to their mixing coefficient \(s_{i,j}\).