```python
import sympy as sy
```


```python
Ru, Rv = sy.symbols("R_u R_v")
r, s, v = sy.symbols("r s v")

K = sy.Matrix([ 
                [ (1-v) * Ru, (1-v) * (1-r) * Rv],
                [ v * (1-s) * Ru, v * (1-r) *(1-s)* Rv],
              ])
vec = K.eigenvects()[-1][-1][-1]
vec /= sum(vec)
sy.simplify(vec)
```




$\displaystyle \left[\begin{matrix}\frac{1 - v}{- s v + 1}\\\frac{v \left(1 - s\right)}{- s v + 1}\end{matrix}\right]$




```python
K
```




$\displaystyle \left[\begin{matrix}R_{u} \left(1 - v\right) & R_{v} \left(1 - r\right) \left(1 - v\right)\\R_{u} v \left(1 - s\right) & R_{v} v \left(1 - r\right) \left(1 - s\right)\end{matrix}\right]$




```python
for eigenvalue, algebraic_multiplicity, eigenvectors in K.eigenvects():
    print(f'{eigenvalue=}, {algebraic_multiplicity=}')
    print(sy.simplify(eigenvectors[0]/sum(eigenvectors[0])))
```

    eigenvalue=0, algebraic_multiplicity=1
    Matrix([[R_v*(r - 1)/(R_u + R_v*r - R_v)], [R_u/(R_u + R_v*r - R_v)]])
    eigenvalue=-R_u*v + R_u + R_v*r*s*v - R_v*r*v - R_v*s*v + R_v*v, algebraic_multiplicity=1
    Matrix([[(1 - v)/(-s*v + 1)], [v*(1 - s)/(-s*v + 1)]])



```python
K
```




$\displaystyle \left[\begin{matrix}R_{u} \left(1 - v\right) & R_{v} \left(1 - r\right) \left(1 - v\right)\\R_{u} v \left(1 - s\right) & R_{v} v \left(1 - r\right) \left(1 - s\right)\end{matrix}\right]$




```python
(K.dot(vec))
```




    [-R_u*(1 - v)**2/((s*v - v)*(-(1 - v)/(s*v - v) + 1)) + R_v*(1 - r)*(1 - v)/(-(1 - v)/(s*v - v) + 1),
     -R_u*v*(1 - s)*(1 - v)/((s*v - v)*(-(1 - v)/(s*v - v) + 1)) + R_v*v*(1 - r)*(1 - s)/(-(1 - v)/(s*v - v) + 1)]




```python
sy.simplify(sum(K.dot(vec)))
```




$\displaystyle - R_{u} v + R_{u} + R_{v} r s v - R_{v} r v - R_{v} s v + R_{v} v$




```python

```

eaeba440536e417e2922214c166e721407aaceb1
ipynb
Jupyter Notebook
cookbook/notebooks/check_analytics.ipynb
benmaier/vaccontrib
1be75e049d3069ba465e7779e850c2e2504daae9
MIT
2021-12-14T15:51:19.000Z
2021-12-14T15:51:19.000Z
cookbook/notebooks/check_analytics.ipynb
benmaier/vaccontrib
1be75e049d3069ba465e7779e850c2e2504daae9
MIT
cookbook/notebooks/check_analytics.ipynb
benmaier/vaccontrib
1be75e049d3069ba465e7779e850c2e2504daae9
MIT
Qwen/Qwen-72B
1. YES
2. YES