Under the influence of improved numerical tools, a significant interest for complex systems has been shown in many scientific fields. In particular, attention has been focused on networks, highlighting the emergence of complicated phenomena from the connection of simple models. To this regard, a relevant impulse has been provided by the advances in neural network theory, that has contributed to underline the importance of the connection topology in the realization of complex dynamics [1] . As a consequence, graph theory [2] has been successfully exploited to perform novel modeling approaches in several fields, such as Economics (see e.g. [3] , [4] , [5] ), Biology (see e.g. [6] , [7] ) and Ecology (see e.g. [8] , [9] , [10] ), especially when the investigated phenomena were characterized by spatial distribution and a multivariate analysis technique is preferred [11] , [12] . To the best knowledge of the authors, there are very few theoretical results about the reconstruction of an unknown topology from data. In this paper, we will focus our attention on tree topology networks. Though its reduced complexity with respect to cyclic link structures, the tree connection model turns out to be particularly suitable to represent a large variety of processes. In particular, the tree network scheme results effective in the description of systems with transportation, such as water and power supply, air and rail traffic, vascular systems of living organisms and channel and drainage networks (see e.g. [13] , [9] , [14] , [15] , [16] ). It is worth to highlight that this kind of models is deeply related to the idea of delay, that characterizes the connections as transportation media. It is also important to recall that in linear dynamical system theory the transfer function is a powerful representation tool for delayed processes [17] , [18] . In many situations, when the topology to be reconstructed is a tree, the only observable nodes are the leaves. Then, the usual theoretical framework is almost always set in standard graph theory as in the Unweighted Pair Group Method with Arithmetic mean (UPGMA) [19] . Its application is mainly in the reconstruction of evolutionary trees, but it has been widely employed also in many other areas: communication systems and resource allocations. Theoretically, such a technique guarantees an exact reconstruction of a tree topology only on the strong assumption that an ultrametric is defined among the considered nodes. An approach based on system theory and identification tools is completely missing. Specifically, there are no approaches considering explicitly the possibility of dynamics among the nodes. While dynamical networks have been deeply studied and analyzed in automatic control theory, the question of reconstructing an unknown network of dynamical systems has not been formally investigated. In fact, in most applicative scenarios the network is given or it is the very objective of design. However, there are also some interesting situations where the network links are actually unknown, such as in biological neural networks, biochemical metabolic pathways and financial markets. Even though an acyclical topology may seem a quite reductive choice, given an intricate and connected topology, we may be interested into "approximating" it with a tree. Such an approximation could be considered "satisfactory" if the most important connections were captured. In this manuscript we will develop a rigorous mathematical method to exactly identify the connections scheme of a tree topology network of noisy linear dynamical systems, providing a theoretical background for linear network modeling. In particular, in Section II we will introduce definitions and preliminary results which are useful to characterize the mathematical framework. In Section III our approach to topology reconstruction will be presented and sufficient conditions for an exact identification will be reported as well. In Section IV the theoretical results will be confirmed by practical implementations of the proposed technique, illustrated by means of numerical examples. In Section V, we will show that the identification of a tree topology can provide useful information even for complex network. To this end, we will apply our technique to the analysis of high frequency real data originated by a portfolio of financial stocks. Some final conclusions in Section VI will end the manuscript.
: cross-covariance function of stationary processes;
. = Z(R XY (τ )): cross-power spectral density; Φ X (z) . = Φ XX (z): power spectral density; with abuse of notation, Φ X (ω) = Φ X (e iω ); ⌈·⌉ and ⌊·⌋: ceiling and floor function respectively; (·) * : complex conjugate.
In this section we formally introduce a model to address noisy linear dynamical systems interconnected to form a tree topology and we also provide a quantitative tool to characterize the mutual dependencies.
Let us consider a network of n time-discrete SISO linear dynamical systems affected by additive noises. Then, let H j (z) be the transfer function of the j-th system, {X j (k)} k∈Z and {U j (k)} k∈Z its output and input signals respectively and {̺ j (k)} k∈Z a zero-mean wide-sense stationary noise. Hence, each system can be represented according to the model:
We stress that no assumptions on the causality of H j (z) have been done. Moreover, let the property
holds. Then, suppose that the input signal U i of each node results the output of another process and that the systems of the network are connected to form a tree topology, preventing the presence of cycles. In this paper we will formally address this kind of network according to the following definition. Definition 1: Consider the ensemble of a rooted tree topology of n nodes N j and a corresponding set of n linear timediscrete SISO systems affected by noise, described according to the model (1). Namely, assume N i as the root node. Moreover, let {̺ j } j=1,...,n be zero-mean wide-sense stationary random processes satisfying (2), i.e. mutually not correlated zero-mean noises. Then, we define Linear Cascade Model Tree (LCMT) a dynamical network defined by the equation system
where H i (z) ≡ 0 and the set {π 1 , . . . , π n } is a permutation of {1, . . . , n}.
A LCMT is well-posed if Φ ̺j (ω) > 0 for all ̺ j , and for all ω Assuming to have a complete statistical knowledge of each process {X i } i=1,...,n , we are interested in the identification of the links, which describe the tree characterizing the network topology. To this aim, hereafter we introduce some preliminary results, which can be exploited to define a mathematical tool for the quantitative characterization of the connections.
Let us consider two stochastic processes X i , X j and let W ji (z) be a time-discrete SISO transfer function. Hence, consider the quadratic cost
where
and Q(z) is an arbitrary stable and causally invertible timediscrete transfer function weighting the error
Then, the computation of the transfer functionŴ (z) that minimizes the quadratic cost (4) is a well-known problem in scientific literature and its solution is referred to as the Wiener filter [18] .
The Wiener filter modeling X j by X i is the linear stable filterŴ ji minimizing the filtered quantity (4). Its expression is given bŷ
and it does not depend upon Q(z). Moreover, the minimized cost is equal to
and the corresponding error
Proof: See, for example, [17] , [18] . Since the weighting function Q(z) does not affect the Wiener filter, but only the energy of the filtered error, we can choose Q(z) equal to F j (z), the inverse of the spectral factor of Φ Xj (z), that is
In particular, it is worth recalling that F j (z) is stable and causally invertible [20] . Therefore, the minimum of cost (4) assumes the value
Observe that, due to such choice of Q(z), the cost turns out to explicitly depend on the coherence function of the two processes:
Let us recall that the coherence function is not negative and symmetric with respect to ω. Moreover, it is also well-known that the cross-spectral density satisfies the Schwartz inequality and, thus, the coherence function results limited between 0 and 1. Therefore, according to the previous results, the cost (8) turns out to be dimensionless and not depending on the "energy" of the stochastic processes X i and X j .
The following result holds. Proposition 4: In a well-posed LCMT, the binary function
is a metric.
Proof: The only non trivial property to be proved is the triangle inequality. LetŴ ji (z) be the Wiener filter between X i , X j computed according to (5) and e ji the relative error. The following relations hold:
SinceŴ 31 (z) is the Wiener filter between the two processes X 1 and X 3 , it performs better at any frequency than any other linear filter, such asŴ 32 (z)Ŵ 21 (z). So we have
For the sake of simplicity we neglect to explicitly write the argument ω in the following passages. Normalizing with respect to Φ X3 , we find
and considering the 2-norm properties
where we have substituted the expression ofŴ 32 . Finally, observing that
In this section we exploit the coherence-based distance (10) to derive sufficient conditions to guarantee the exact reconstruction of the topology of a dynamical network. To this end, we first need to introduce a few definitions and technical lemmas.
Definition 5: We define "path" from N i to N j a finite sequence of l > 0 nodes N π1 , ..., N π l such that
In the following we consider LCMT networked systems. It is worth underlining that a rooted tree is a pair made of a tree and one of its nodes N r , named as "root". Hence, since a tree is a connected graph, in a LCMT network there is always a path between two nodes and, since there are no cycles, such a path is also unique. The presence of a special node labeled as "root" induces a natural relation of "order" among the nodes in the following way Definition 6: Given a rooted tree, consider the path from N r to another node N j . A node N i is said to be an ancestor of N j if N i = N j and if it belongs to the path from N r to N j . Alternatively, we say that N j is a descendant of N i . We also say that N i is parent of N j (or that N j is a child of N i ) if, in addition, N j and N i are connected by an arc.
It is straightforward to prove that the root is an ancestor to all the other nodes and that every node but the root has exactly one parent. Hereafter an important result about the correlation property in a LCMT is introduced.
Lemma 7: Given a LCMT T , consider a node N j and a node N i = N j which is not a descendant of N j . Then it holds that E[̺ j X i ] = 0.
Proof: Let N r be the root of T and N π1 , ..., N π l the path from N r to N i . Exploiting the linear dependencies among the signals of the LCMT, X i can be expressed in terms of the noises ̺ π1 , ..., ̺ π l
where
The two following lemmas provide two important inequalities about the coherence functions related to the network signals.
Lemma 8: Consider a LCMT T and three nodes N i , N j and N k such that
Then we have that C XiXj ≥ C XiX k . Moreover, if T is wellposed then the inequality is strict.
Proof: Consider the path from N j to N k described by the sequence N π1 , ..., N π l . Exploiting the linear relations (1 ), the process X k can be expressed in terms of X j and of the noises acting on the nodes N π2 , ..., N π l which are all descendants of N j .
where W iπq is defined as in (12) . Now, we intend to evaluate the coherence between X i and X j . From the assumption on N i , it follows that N i is not on the path from N j to N k . In other words, N i is not a descendant of N πq and N i = N πq for q = 1, ..., l. We can write
where the last equality holds because of Lemma 7 . Collecting the factor Φ Xj |W kπ1 | 2 , we obtain
where the inequality is strict if l q=2 |W kπq | 2 Φ ̺π q > 0. Lemma 9: Consider a LCMT T and three different nodes N i , N j and N k such that
Proof: Assume that X k = H kj X j + ̺ k and let us distinguish two possible scenarios. case A First, consider the case where N j is a descendant of N i . Consider the path from N i to N j described by the sequence of l nodes N π1 , ..., N π l where N π1 = N i and N π l = N j . The process X j can be expressed in terms of X i and of the noises acting on the nodes N π2 , ..., N π l which are all descendants of N i .
Exploiting Lemma 7 we can evaluate the following quantities
and
By inspection we have the assertion. Now we are left to consider the case where N j is not a descendant of N i . Then, also N k is not a descendant of N i . By hypothesis, N i is not a descendant of N k , either. Thus, they must have a common ancestor N d , such that the two paths from N d to N k and from N d to N i have only N d in common. Consider the path from N d to N i , such that it is possible to write
Exploiting lemma 7, we have
If N d = N j , we have the assertion. If N d = N j , then N j must be a descendant of N d . We are in a situation equivalent to case A: there is a node N d such that N j is one of its descendants. As a consequence, we can state that
Combining the last two inequalities, we conclude that the lemma holds also in this case. All the previous lemmas are functional to the show that the coherence distance (10) is minimal between two contiguous nodes, as summarized in this theorem.
Theorem 10: Given a LCMT T , consider a node N a and a node N b = N a which is not directly linked to it. Then there exists a node N c directly linked to N a such that
where the inequality is strict if T is well-posed. Proof: First, consider the case where N b is a descendant of N a . Name N c the child of N a on the path linking it to
We are allowed to apply lemma (8) with N i = N a , N j = N c and N k = N b to have the assertion. Now, consider the case where N b is not a descendant of N a . N a can not be the root, otherwise N b would be one of its descendants. Thus N a has a parent and let us name it N c . N b can not be N c because it is not directly linked to N a . Applying lemma (9) with N i = N b , N j = N c and N k = N a and by the definition of the coherence distance (10), we have the assertion. Theorem 10 can be fruitfully exploited to determine whether two processes in a well-posed LCMT are directly linked. Nonetheless, when we are dealing with data sampled from actual systems the computation of d, that is of the coherence function, is affected by the limited time horizon of the observations. However, the estimates of the spectral and crossspectral densities converge to the actual values as the time horizon approaches infinity. Hence, in the following we will assume to sample the processes over a sufficiently large time interval.
We are ready to show the main contribution of the paper. Theorem 11: Consider a well-posed LCMT T and assume to observe the signals X j during a time horizon t. Compute an estimate of the coherence based distances d ij = d(X i , X j ) among the nodes N j and evaluate the relative Minimum Spanning Tree (MST). When t approaches infinity, the corresponding topology is equivalent to the unique MST T associated to the coherence metric.
Proof: The proof consists in showing that the MST T associated to the distance (10) is unique and corresponds to the LCMT topology. We will prove this result by induction on the number n of nodes of the LCMT. The basic induction step consists in observing that theorem is true for n = 2. Now assume the theorem true for a LCMT with n nodes. Given a LCMT T with n + 1 nodes, remove one of its "leaves". By leaf we mean a non-root node with no descendants. This operation is always possible since any rooted tree with at least two nodes has at least one leaf. Without loss of generality, let the removed leaf be N n+1 and let N i be its parent. Now we have a LCMT T ′ with n nodes and with the same topology of T apart from the removed arc (i, n + 1). Using the induction hypothesis, we know that the topology of T ′ is given by the unique MST T ′ obtained considering the distances among the nodes N 1 , ..., N n . Now compute
The solution of such a minimization problem is unique since the LCMT T is well posed. Because of lemma 10, the arc (i * , N + 1) belongs to the topology of T , so we conclude i * = i. Let T be the spanning tree obtained by adding the arc (i, N + 1) to T ′ . So far, we have shown that T represents the topology of T . We have to prove that T is the unique MST related to the distance (10) among the nodes N 1 , ..., N n+1 . Suppose, by contradiction, that there is a minimum spanning treeT = T with weight lesser or equal than the weight of T . The only arc ofT incident to the node N n+1 is (i, n + 1).
If there were another arc (k, n + 1) inT we could replace it with the arc (k, i) obtaining a spanning tree with inferior cost. Indeed, by lemma 9, we would have
So, ifT is a minimum spanning tree, then X n+1 can be connected only to X i . LetT ′ be the tree obtained byT removing the arc (i, n + 1).T ′ is the minimum spanning tree for the nodes N 1 , ..., N n since it has been obtained from T removing the node N n+1 which has a single connection.
However, by the induction hypothesis, there is a unique MST T ′ among the nodes N 1 , ..., N n . Thus we have thatT ′ = T ′ . It immediately follows the contradiction thatT = T . So far, we have assumed that the dynamics of the network is described by a rooted tree. Moreover, the previous theorem proves that the topology structure can be correctly identified evaluating the MST according to the distance (10). However, no information is recovered about the root node. The following result shows that such an information is not necessary (or, equivalently, not recoverable). Indeed, from a modeling point of view, the choice of the root can be arbitrary (as long as we are considering non-causal transfer functions linking the processes X j ).
Theorem 12: Given a LCMT T whose root is the node N j and given one of its children N i , it is possible to define another LCMT T * with the same tree structure and described by the same processes X k , k = 1, ..., n, such that its root is N i .
Proof: Consider the Wiener Filter W ji modeling the signal X j , seen as the output, when X i is the input
Now, consider a rooted tree with the same topology of T but with N i as the root. Define H * k = H k and ̺ * k = ̺ k for all k = i, j. Conversely, define
To show that the new dynamical network with N i as root and described by the filters H * k is an LCMT, we need to prove that, for h = k,
There are three possible scenarios. If h = i and k = j or h = j and k = i, then
because of the Wiener Filter properties. If h = i, j and k = i, j (or equivalently h = i, j and k = i, j), then lemma 7 can be applied. If h = i, j and k = i, j, then
and we have the assertion because ̺ h and ̺ k are two noise signals of the original LCMT T . It is straightforward to show that, starting from an LCMT T , we can arbitrary define a LCMT T * having an arbitrary node as root. Indeed, it is sufficient to iteratively apply Theorem 12 along the path starting from the original root to the new one.
In this section we introduce a suitable framework to illustrate the application of the previous theoretical results to numerical analysis. It is worth observing that the previous results have been developed for the most general class of linear models. Indeed, no assumptions have been done on the order and causality property of the considered transfer functions. Moreover, let us highlight that the coherence based analysis must be realized "off-line", since the processes have to be evaluated over their entire time span. Thus, because the coherence function can be numerically computed only over limited intervals, in the following examples we will consider sufficiently long time spans to reduce the numerical error.
Hence, let us build the original dynamical networks according the following rules:
• each system is described according to the model (1); • each transfer function H j is randomly generated and such that it is causal and at most of the second order; • the tree topology is randomly chosen; • the noises ̺ j are numerically generated with a pseudorandom algorithm; • the noise-to-signal ratio of each system is equal to one.
Then, such networks are simulated over 1000 time steps and the related data X j are collected. The corresponding coherence based distances are evaluated and used for the extraction of the MST, that defines the link topology.
The above procedure will be first applied to a ten node network. In particular, to test the numerical reliability of the topological identification technique, we repeat such analysis several times, so that a significant number of network configurations is considered. The corresponding results fit the expectations and the real topology is correctly identified each time. In Fig. 1 one of the considered network configurations is depicted, while the related coherence based distance matrix is reported in Table I. To provide a further test, a new set of similar simulations is performed with a network of fifty dynamical systems, under the same assumptions used in the previous case. Figure 2 presents one of the considered network configurations. For a space limitation issue, we do not report in this manuscript the corresponding coherence based distance matrix. Nonetheless, the computation of the related MST has successfully identified the real network topology in any of the performed simulations. 
In the previous section we have illustrated how the distance (10) can be successfully exploited to derive the exact topology of a tree network of linear systems affected by additive noises. Nonetheless, since the above identification technique is able to catch the most important linear dependencies with respect to the modeling error (4), in the following we present the results obtained by the application of the previous method to the stock market, that is a network of nonlinear systems characterized by multiple dependencies.
Financial systems are, in general, very complex and deriving information from stock markets is a formidable and challenging task, indeed. Moreover, it might seem very reductive the attempt to describe the dependencies among the price trends in terms of linear SISO systems with a tree topology. In fact, we should definitely expect multiple input influences, nonlinear relations and feedbacks. However, we can think of adopting a LCMT in order to detect what are the "strongest" links in the network. As noted in [3] , such an information could be usefully exploited to check if a given portfolio is balanced or not. In the following, we report the results obtained by the application of our identification technique. A collection of 100 stocks of the New York Stock Exchange has been observed for four weeks (twenty market days), in the lapse 03/03/2008 -03/28/2008 sampling their prices every 2 minutes. The stocks have been chosen on the first 100 stocks with highest trading volume according to the Standard Fig. 3 . (color on line) The tree structure obtained using the proposed identification technique. Every node represents a stock and the color represents the business sector it belongs to. The considered sectors are Basic Material (yellow), Conglomerates (white), Healthcare (pink), Transportations (dark blue), Technology (red), Capital Goods (orange), Utilities (brown tints), Consumer (violet tints), Financial (green tints), Energy (gray tints) Services (light blue tints). Using the industry classification given by Google, the Financial sector has also been differentiated among Insurance Companies (light green), Banks (average green) and Investment Companies (dark green); Services have been divided in Information Technology (cyan) and Retail (aquamarina), Consumer in Food (plum) and Personal-care (purple); Energy in Oil & Gas (dark gray) and Well Equipment (light gray); Utilities in Electrical (dark brown) and Natural Gas (light brown).
& Poor Index at the first day of observation and they are reported in Table II . An a-priori organization of the companies has been assumed in accordance with the sector and industry group classification provided by Google Finance R , that is also the source of our data. The whole observation horizon spans almost the whole month of March. Hence, the corresponding price series can not be considered stationary and the statistical tools can not be successfully employed to analyze the raw data. In literature a variety of techniques for the suppression of trends and periodic components in non-stationary time series exists. However, we want to stress that the application of such procedures introduces an additional prefiltering phase, which is responsible for the computational burden increase. Moreover, due to the pre-and post-market sessions, there is a discontinuity between the end value of a day and the opening price of the next one. We have avoided those problems observing that the observation horizon is naturally divided into subperiods, namely weeks and days. In addition, a single market session can be considered a time period sufficiently short to assume that the influence of trends and seasonal factors are negligible. Thus, in our analysis, we have followed the natural approach of dividing the historical series into twenty subperiods corresponding to single days. Then, we considered the sessions separately, i.e. we have computed the coherence-based distances (10) among the stocks for every single day. Finally, we have averaged such daily distances over the whole observation horizon and the related results have been exploited to extract the MST, providing the corresponding market structure. We find useful to remark that the computation of the distances for smaller data sets is also better performing and that the averaging procedure provides the desired rejection of trends and seasonal components. Notably, a similar idea, even if more sophisticated, is at the basis of the method developed in [21] to detrend non-stationary time series. The final topology is shown in Figure 3 . Every node represents a stock and the color represents the business sector or industry it belongs to. We note that the stocks are very satisfactorily grouped according to their business sectors. We stress that the a-priori classification in sectors is not a hard fact by itself and we are not trying to match it exactly. A company could well be categorized in a sector because of its business, but, at the same time, could show a behaviour similar to and explainable through the dynamics of other sectors. Actually, we would be very interested into finding results of this kind. Indeed, in those very cases, our quantitative analysis would provide the greatest contributions detecting in an objective way something which is "counter-intuitive". Thus, we just use such a-priori classification as a tool to check if the final topology makes sense and if, at a general level, our approach provides useful results. Despite this disclaim, it is worth noting that the Financial (green tints), Consumer (violet tints), Basic Materials (yellow), Energy (gray tints) and Transportation (dark blue) sectors are all perfectly grouped, with no exceptions. In Fig. 3 , we note a subclusterization of the Financial sector, as well. The Consumer sector shows another prominent subclusterization in the Food (plum) and Personal/Healthcare (purple) industries, while the Energy sector presents an evident subclusterization into the Oil & Gas (dark gray) and Oil Well Equipment (light gray). The Utilities/Electricity companies (dark brown) are, interestingly, a different group. We also observe a big cluster of companies classified as Services (light blue tints). We have differentiated them in the two industries Retail and Information Technology using two slightly different colors, respectively aquamarine and cyan. We also note the presence of three Services companies which are isolated from the other ones: V [Verizon], T [AT&T], and S [Sprint]. All of them are telephone companies. This might suggest that this industry should show at least a slightly different dynamics from the other service companies. Note also how the Technology sector (red) is almost perfectly grouped and how IBM, an IT company, even though classified as a Services company, is located in it. Finally, the two only automobile companies GM and F [Ford] happen to be linked together. The analysis of this four weeks of the month of March cleanly shows a taxonomic arrangement of the stocks even though the choice of a tree structure might have seemed quite reductive at first thought.
This work has illustrated a simple but effective procedure to identify the structure of a network of linear dynamical systems when the topology is described by a tree. To the best knowledge of the authors, the problem of identifying a network has not yet been tackled in scientific literature. The approach followed in this paper is based on the definition of a distance function in order to evaluate if there exists a direct link between two nodes. A few theoretical results are provided, in particular to guarantee the correctness of the identification procedure. An application of the technique to real data has also shown that a tree topology can be sufficient to capture information even in complex situations such as financial stock prices. TABLE II  LIST OF THE COMPANIES CONSIDERED IN THE ANALYSIS 