Subproblem: Recurrence Relation of Minimum

Black

New member
Joined
Oct 24, 2016
Messages
1
Not a hw problem. I have a larger problem I'm trying to solve and think I can get a handle on it if I solve this piece of the puzzle. THE LARGER PROBLEM: I'm trying to get the distance to the nearest "0" of a function. 1(x)=1-|sign(x)| f(x)=dist(x) **dist(x) can be abs(x), x^2, a gaussian, really anything that can be transformed into abs(x) which would mean my answer is the minimum of f(x-n)*1(n) for all n min(a,b) == (a+b-|a-b|)/2 Which for the minimum of all n results in: THE SUB-PROBLEM: b[n] = ( g(x-n) + b[n-1] - |g(x-n)-b[n-1]| )/2.0 where g(x)=f(x-n)*1(n) I feel the -1 will eventually need to be -epsilon to be accurate but before I wander into Calculus-like territory I wanted to get this down for a sequence of integers. Unfortunately I was never really good in this area and don't understand generating functions, etc. even after long hours of reading. SO: Can I have help walking through the steps to get this in 'closed form' (I think that's what I want ?and in terms of g(x) I think?), so that I can work out the epsilon case? (Alternatively if you see the answer to my larger problem...). If it matters the eventual result will only be used on n and x [-1,1].
 
Top