Input Format

We use an adapted version of the format for Integer Programs (see for example here or here) from the Termination and Complexity Competition extended by costs and probabilities (see below).

Integer Programs (IPs)

(GOAL COMPLEXITY)
(STARTTERM (FUNCTIONSYMBOLS f))
(VAR x y)
(RULES
  f(x,y) -{0}> g(x,y)
  g(x,y) -> g(x-1,y+x) :|: x>0
  g(x,y) -> h(x,y)
  h(x,y) -{y}> h(x,y-1) :|: y>0
)

Probabilistic Integer Programs (PIPs)

(GOAL EXPECTEDCOMPLEXITY)
(STARTTERM (FUNCTIONSYMBOLS f))
(VAR x y)
(RULES
  f(x,y) -{0}> g(x,y)
  g(x,y) -> 0.5:g(x-1,y+x) :+: 0.5:g(x,y+x) :|: x>0
  g(x,y) -{0}> h(x,y)
  h(x,y) -> h(x,y-1) :|: y>0
)