@@ -30,10 +30,11 @@ import numpy as np
3030import pandas as pd
3131import networkx as nx
3232import matplotlib.pyplot as plt
33+ from matplotlib.patches import Polygon
3334```
3435
3536The following figure illustrates a network of linkages among 15 sectors
36- obtained from the US Bureau of Economic Analysis’s 2019 Input-Output Accounts
37+ obtained from the US Bureau of Economic Analysis’s 2021 Input-Output Accounts
3738Data.
3839
3940``` {code-cell} ipython3
@@ -88,6 +89,10 @@ tags: [hide-input]
8889---
8990centrality = qbn_io.eigenvector_centrality(A)
9091
92+ # Remove self-loops
93+ for i in range(A.shape[0]):
94+ A[i][i] = 0
95+
9196fig, ax = plt.subplots(figsize=(8, 10))
9297plt.axis("off")
9398color_list = qbn_io.colorise_weights(centrality,beta=False)
@@ -237,11 +242,11 @@ More generally, constraints on production are
237242$$
238243\begin{aligned}
239244(I - A) x & \geq d \cr
240- a_0' x & \leq x_0
245+ a_0^\top x & \leq x_0
241246\end{aligned}
242247$$ (eq:inout_1)
243248
244- where $A$ is the $n \times n$ matrix with typical element $a_{ij}$ and $a_0' = \begin{bmatrix} a_{01} & \cdots & a_{02} \end{bmatrix}$.
249+ where $A$ is the $n \times n$ matrix with typical element $a_{ij}$ and $a_0^\top = \begin{bmatrix} a_{01} & \cdots & a_{02} \end{bmatrix}$.
245250
246251
247252
322327The second equation of {eq}`eq:inout_1` can be written
323328
324329$$
325- a_0' x = x_0
330+ a_0^\top x = x_0
326331$$
327332
328333or
329334
330335$$
331- A_0' d = x_0
336+ A_0^\top d = x_0
332337$$ (eq:inout_frontier)
333338
334339where
335340
336341$$
337- A_0' = a_0' (I - A)^{-1}
342+ A_0^\top = a_0^\top (I - A)^{-1}
338343$$
339344
340345 For $i \in \{1, \ldots , n\}$, the $i$th component of $A_0$ is the amount of labor that is required to produce one unit of final output of good $i$.
@@ -346,12 +351,12 @@ Consider the example in {eq}`eq:inout_ex`.
346351Suppose we are now given
347352
348353$$
349- a_0' = \begin{bmatrix}
354+ a_0^\top = \begin{bmatrix}
3503554 & 100
351356\end{bmatrix}
352357$$
353358
354- Then we can find $A_0' $ by
359+ Then we can find $A_0^\top $ by
355360
356361```{code-cell} ipython3
357362a0 = np.array([4, 100])
383388More generally,
384389
385390$$
386- p = A' p + a_0 w
391+ p = A^\top p + a_0 w
387392$$
388393
389394which states that the price of each final good equals the total cost
390- of production, which consists of costs of intermediate inputs $A' p$
395+ of production, which consists of costs of intermediate inputs $A^\top p$
391396plus costs of labor $a_0 w$.
392397
393398This equation can be written as
394399
395400$$
396- (I - A' ) p = a_0 w
401+ (I - A^\top ) p = a_0 w
397402$$ (eq:inout_price)
398403
399404which implies
400405
401406$$
402- p = (I - A' )^{-1} a_0 w
407+ p = (I - A^\top )^{-1} a_0 w
403408$$
404409
405410Notice how {eq}`eq:inout_price` with {eq}`eq:inout_1` forms a
@@ -414,7 +419,7 @@ This connection surfaces again in a classic linear program and its dual.
414419A **primal** problem is
415420
416421$$
417- \min_ {x} w a_0' x
422+ \min_ {x} w a_0^\top x
418423$$
419424
420425subject to
427432The associated **dual** problem is
428433
429434$$
430- \max_ {p} p' d
435+ \max_ {p} p^\top d
431436$$
432437
433438subject to
434439
435440$$
436- (I -A)' p \leq a_0 w
441+ (I -A)^\top p \leq a_0 w
437442$$
438443
439444The primal problem chooses a feasible production plan to minimize costs for delivering a pre-assigned vector of final goods consumption $d$.
@@ -444,7 +449,7 @@ By the [strong duality theorem](https://en.wikipedia.org/wiki/Dual_linear_progra
444449optimal value of the primal and dual problems coincide:
445450
446451$$
447- w a_0' x^* = p^* d
452+ w a_0^\top x^* = p^* d
448453$$
449454
450455where $^*$'s denote optimal choices for the primal and dual problems.
569574\mu_j = \sum_ {j=1}^n l_ {ij}
570575$$
571576
572- This can be written as $\mu' = \mathbf{1}'L$ or
577+ This can be written as $\mu^\top = \mathbb{1}^\top L$ or
578+
573579
574580$$
575- \mu' = \mathbf {1}' (I-A)^{-1}
581+ \mu^\top = \mathbb {1}^\top (I-A)^{-1}
576582$$
577583
584+ Please note that here we use $\mathbb{1}$ to represent a vector of ones.
585+
578586High ranking sectors within this measure are important buyers of intermediate goods.
579587
580588A demand shock in such sectors will cause a large impact on the whole production network.
0 commit comments