Eine Markow-Quelle ist das Mathematische Modell einer Informationsquelle, bei dem die aufeinanderfolgende Auswahl von Quellenzeichen, d. h. die Folge der Zustände, sowohl von der momentanen Verteilung der Auftritts- bzw. Zustandswahrscheinlichkeiten als auch von der Verteilung der Übergangswahrscheinlichkeiten abhängt.
double[] stateProbability = {1, 0, 0, 0};
double[][] transitionProbability =
{
{0.0, 0.2, 0.7, 0.1},
{0.1, 0.6, 0.0, 0.3},
{0.2, 0.4, 0.2, 0.2},
{0.2, 0.3, 0.1, 0.4}
};
Calculate c = new Calculate(transitionProbability, stateProbability);
c.PrintTransitionProbability();
System.out.println();
c.PrintDetailedStateProbability(20);
c.PrintStateProbabilityTable();
c.WhenChangedStateProbability();
Transition Probability:
-----------------------
0.0 0.2 0.7 0.1
0.1 0.6 0.0 0.3
0.2 0.4 0.2 0.2
0.2 0.3 0.1 0.4
State Probability for t = 0 -> ( 1.0 0.0 0.0 0.0 )
------------------------------------------------
(1.0*0.0) + (0.0*0.1) + (0.0*0.2) + (0.0*0.2) = 0.0
(1.0*0.2) + (0.0*0.6) + (0.0*0.4) + (0.0*0.3) = 0.2
(1.0*0.7) + (0.0*0.0) + (0.0*0.2) + (0.0*0.1) = 0.7
(1.0*0.1) + (0.0*0.3) + (0.0*0.2) + (0.0*0.4) = 0.1
State Probability for t = 1 -> ( 0.0 0.2 0.7 0.1 )
------------------------------------------------
(0.0*0.0) + (0.2*0.1) + (0.7*0.2) + (0.1*0.2) = 0.18
(0.0*0.2) + (0.2*0.6) + (0.7*0.4) + (0.1*0.3) = 0.43
(0.0*0.7) + (0.2*0.0) + (0.7*0.2) + (0.1*0.1) = 0.15
(0.0*0.1) + (0.2*0.3) + (0.7*0.2) + (0.1*0.4) = 0.24
State Probability for t = 2 -> ( 0.18 0.43 0.15 0.24 )
------------------------------------------------
(0.18*0.0) + (0.43*0.1) + (0.15*0.2) + (0.24*0.2) = 0.12
(0.18*0.2) + (0.43*0.6) + (0.15*0.4) + (0.24*0.3) = 0.43
(0.18*0.7) + (0.43*0.0) + (0.15*0.2) + (0.24*0.1) = 0.18
(0.18*0.1) + (0.43*0.3) + (0.15*0.2) + (0.24*0.4) = 0.27
State Probability for t = 3 -> ( 0.12 0.43 0.18 0.27 )
------------------------------------------------
(0.12*0.0) + (0.43*0.1) + (0.18*0.2) + (0.27*0.2) = 0.13
(0.12*0.2) + (0.43*0.6) + (0.18*0.4) + (0.27*0.3) = 0.43
(0.12*0.7) + (0.43*0.0) + (0.18*0.2) + (0.27*0.1) = 0.15
(0.12*0.1) + (0.43*0.3) + (0.18*0.2) + (0.27*0.4) = 0.29
State Probability for t = 4 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 5 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 6 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 7 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 8 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 9 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 10 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 11 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 12 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 13 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 14 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 15 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 16 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 17 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 18 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 19 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
State Probability for t = 20 -> ( 0.13 0.43 0.15 0.29 )
------------------------------------------------
(0.13*0.0) + (0.43*0.1) + (0.15*0.2) + (0.29*0.2) = 0.13
(0.13*0.2) + (0.43*0.6) + (0.15*0.4) + (0.29*0.3) = 0.43
(0.13*0.7) + (0.43*0.0) + (0.15*0.2) + (0.29*0.1) = 0.15
(0.13*0.1) + (0.43*0.3) + (0.15*0.2) + (0.29*0.4) = 0.29
P1 1.0 0.0 0.18 0.12 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13 0.13
P2 0.0 0.2 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43 0.43
P3 0.0 0.7 0.15 0.18 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15 0.15
P4 0.0 0.1 0.24 0.27 0.29 0.29 0.29 0.29 0.29 0.29 0.29 0.29 0.29 0.29 0.29 0.29 0.29 0.29 0.29 0.29 0.29 0.29
---------------------------------------------------------------------------------
From the t = 6. The State Probability ( 0.13 0.43 0.15 0.29 ) will not change anymore!
---------------------------------------------------------------------------------