Preprocessing
Probabilistic Analysis
Probabilistic Program after Preprocessing
Start: f
Program_Vars: X₀, X₁
Temp_Vars:
Locations: f, g
Transitions:
g₁:f(X₀,X₁) → t₂:g(X₀,X₁) :|:
g₃:g(X₀,X₁) → [1/2]:t₄:g(X₀,1+X₁) :+: [1/2]:t₅:g(X₀+UNIFORM(0, 10),1+X₁) :|: X₀ ≤ X₁ ∧ 0 ≤ 1
Show Graph
G
f
f
g
g
f->g
p = 1
t₂ ∈ g₁
g->g
p = 1/2
t₄ ∈ g₃
η (X₁) = 1+X₁
τ = 0 ≤ 1 ∧ X₀ ≤ X₁
g->g
p = 1/2
t₅ ∈ g₃
η (X₀) = X₀+UNIFORM(0, 10)
η (X₁) = 1+X₁
τ = 0 ≤ 1 ∧ X₀ ≤ X₁
Run classical analysis on SCC: [f]
Classical Approximation after Lifting Classical Results
All Bounds
Timebounds
Overall timebound:inf {Infinity}
g₁: 1 {O(1)}
g₃: inf {Infinity}
Costbounds
Overall costbound: inf {Infinity}
g₁: inf {Infinity}
g₃: inf {Infinity}
Sizebounds
(g₁,g), X₀: X₀ {O(n)}
(g₁,g), X₁: X₁ {O(n)}
Run probabilistic analysis on SCC: [f]
Run classical analysis on SCC: [g]
Classical Approximation after Lifting Classical Results
All Bounds
Timebounds
Overall timebound:inf {Infinity}
g₁: 1 {O(1)}
g₃: inf {Infinity}
Costbounds
Overall costbound: inf {Infinity}
g₁: inf {Infinity}
g₃: inf {Infinity}
Sizebounds
(g₁,g), X₀: X₀ {O(n)}
(g₁,g), X₁: X₁ {O(n)}
Run probabilistic analysis on SCC: [g]
Plrf for transition g₃:g(X₀,X₁) → [1/2]:t₄:g(X₀,1+X₁) :+: [1/2]:t₅:g(X₀+UNIFORM(0, 10),1+X₁) :|: X₀ ≤ X₁ ∧ 0 ≤ 1:
new bound:
2/3⋅X₀+2/3⋅X₁+6 {O(n)}
PLRF:
• g: 6+2/3⋅X₁-2/3⋅X₀
Show Graph
G
f
f
g
g
f->g
p = 1
t₂ ∈ g₁
g->g
p = 1/2
t₄ ∈ g₃
η (X₁) = 1+X₁
τ = 0 ≤ 1 ∧ X₀ ≤ X₁
g->g
p = 1/2
t₅ ∈ g₃
η (X₀) = X₀+UNIFORM(0, 10)
η (X₁) = 1+X₁
τ = 0 ≤ 1 ∧ X₀ ≤ X₁
Use expected size bounds for entry point (g₁:f→[t₂:1:g],g)
Use expected size bounds for entry point (g₁:f→[t₂:1:g],g)
Use classical time bound for entry point (g₁:f→[t₂:1:g],g)
Results of Probabilistic Analysis
All Bounds
Timebounds
Overall timebound:2/3⋅X₀+2/3⋅X₁+7 {O(n)}
g₁: 1 {O(1)}
g₃: 2/3⋅X₀+2/3⋅X₁+6 {O(n)}
Costbounds
Overall costbound: 4/3⋅X₀+4/3⋅X₁+13 {O(n)}
g₁: 1 {O(1)}
g₃: 4/3⋅X₀+4/3⋅X₁+12 {O(n)}
Sizebounds
(g₁,g), X₀: X₀ {O(n)}
(g₁,g), X₁: X₁ {O(n)}
(g₃,g), X₀: 5/3⋅X₁+8/3⋅X₀+15 {O(n)}
(g₃,g), X₁: 2/3⋅X₀+5/3⋅X₁+6 {O(n)}