In Example 11.9, assume that we start with a hybrid bred to a hybrid. Find \(u^{(1)}\) , \(u^{(2)}\) and \(u^{(3)}\). What would \(u^{(n)}\) be?
g_matrix = matrix(c(.5,.25,0,.5,.5,.5,0,.25,.5), nrow=3,ncol=3)
g_matrix
## [,1] [,2] [,3]
## [1,] 0.50 0.5 0.00
## [2,] 0.25 0.5 0.25
## [3,] 0.00 0.5 0.50
As in problem it is stated to start from hybrid, so u vector is:
u = c(0,1,0)
u
## [1] 0 1 0
\[ u^{(n)} = uP^{(n)} \\ u^{(1)} = uP^{1} \]
P1 = g_matrix
u1 = u%*%P1
u1
## [,1] [,2] [,3]
## [1,] 0.25 0.5 0.25
\[ u^{(n)} = uP^{(n)} \\ u^{(2)} = uP^{2} \]
P2 = g_matrix%*%g_matrix
P2
## [,1] [,2] [,3]
## [1,] 0.375 0.5 0.125
## [2,] 0.250 0.5 0.250
## [3,] 0.125 0.5 0.375
u2 = u%*%P2
u2
## [,1] [,2] [,3]
## [1,] 0.25 0.5 0.25
\[ u^{(n)} = uP^{(n)} \\ u^{(3)} = uP^{3} \]
P3 = g_matrix%*%P2
P3
## [,1] [,2] [,3]
## [1,] 0.3125 0.5 0.1875
## [2,] 0.2500 0.5 0.2500
## [3,] 0.1875 0.5 0.3125
u3 = u%*%P3
u3
## [,1] [,2] [,3]
## [1,] 0.25 0.5 0.25
\[u^{(n)} = (.25, .5 , .25)\]