Re: I need help with some algorithm
- From: Patricia Shanahan <pats@xxxxxxx>
- Date: Tue, 26 Dec 2006 03:28:18 GMT
Pawel_Iks wrote:
I have following problem:
Let's f,g be a continous, piece-wise linear functions in range
[0,1], which have finite number of
extreme values, and
(1) f(0)=g(0)=0, f(1)=g(1)=1.
Find functions fi1, fi2 - continous in [0,1] and also fullfil (1)
which satisfy for all t from [0,1] following
equation:
(2) f(fi1(t))=g(fi2(t))
When we'll imagine that f and g describe shapes of two mountains, then
fi1, and fi2 describe walkers' ways for which both of walkers are on
the same level.
I can plot functions f,g and in another figure plot walker's way, which
satisfy condition from exercise (projections of f's argument - say x,
g's argument - say y). From this way I can easy obtain fi1, f2, but
problem is: how to write algorithm for findind this way?
I note that:
1) when both functions f,g increase in some range [a,b] then both
walkers go in the same direction
2) when one function is constant in some range [a,b] then one walker
wait for second until he go this piece of his way,
3) when one function decrease and second increase then one walker have
to return (to be on the same level with second walker)
but I can't any idea for algorithm for this problem.
Any sugestions?
I don't think I understand the question. What answer would you want
given the following values for f and g?
In range [0,0.5] f(t) = 10t and g(t) = -10t.
In range (0.5,1] f(t) = 9-8t and g(t) = 12t-11.
f is strictly increasing and g is strictly decreasing over [0.0.5].
f and g are both continuous, piecewise linear, and have the correct
values at 0 and 1. Each has a single extreme value, and t=0.5.
In effect, the problem asks one walker to climb over a peak, while the
other goes through a valley, but they have to stay at the same height.
Patricia
.
- Follow-Ups:
- Re: I need help with some algorithm
- From: Pawel_Iks
- Re: I need help with some algorithm
- References:
- I need help with some algorithm
- From: Pawel_Iks
- I need help with some algorithm
- Prev by Date: I need help with some algorithm
- Next by Date: Re: Analog = digital?
- Previous by thread: I need help with some algorithm
- Next by thread: Re: I need help with some algorithm
- Index(es):
Relevant Pages
|