read W1Dp:
S:={[1,1/2],[-1,1/4],[-2,1/4]}:
gu:=InfoHp(S,n,N,10):
k:=-min(seq(S[i][1],i=1..nops(S)))-1:
print(`The linear recurrence operator annihilating the sequence of probabilities for n-step walks with the probability distribution`):
print(S):
print(`that start at 0, never go to the negatives, and end anywhere on the non-negatives`):
print(`where N is the shift operator in n, (followed by the initial conditions) is:`):
print(``):
print(gu[1]):
print(``):
print(`and in Maple input notation`):
print(``):
lprint(gu[1]):
print(``):
for i from 0 to nops(gu[2])-1 do
print(`The linear recurrence operator for those walks that end exactly at`, i, ` (followed by the initial conditions) is `):
print(``):
print(gu[2][i+1]):
print(``):
print(`and in Maple input notation`):
print(``):
lprint(gu[2][i+1]):
od:
print(`This took`, time(), `seconds. `):
quit: