in the above problem," x,y,z" are given and
one more constraint:
-z1 < z < z2
z1,z2 > 0.
i want to find values of a,b,c such that..
(x-a)^2 + (y-b)^2 + (z-c)^2 less than equal to R(z)
(x-a)^2 + (y-b)^2 + (z-c)^2 greater than equal to r(z)
can anyone help me solving this?? I need to write c++ code for this so which method should b computationally better?
One of the better books on optimization is this one. I found it very helpful in that most elusive of all topics: choosing appropriate algorithms for your specific problem.
Ok, so to restate your problem slightly: you need to minimize a linear function over a spherical annular region in space. As a clarification, you do mean , right? As in, the two radii are squared? Another clarification: are you minimizing , or ?
To me, this suggests evaluating the linear function on the boundaries of your region (i.e., the inner and outer spherical surfaces that bound your region) and looking for the minimum there. What if you were to switch to spherical coordinates? As in, take the following definitions for the inner surface (here I'm using for the polar angle, and for the azimuthal):
with a similar definition for the outer sphere.
Your problem then reduces to minimizing the function
, subject to , and . You have effectively eliminated one variable.
Now, if you are minimizing, as you originally said, , I think it's pretty clear there can be only one solution. Moreover, all the functions you're dealing with are very well-behaved. Therefore, I would hazard a guess that most any algorithm you choose will converge fairly well. I would probably use a sampling algorithm: take the intervals for and , and sample the function to be minimized at various regular points in those intervals. Take the minimum point, and construct smaller intervals about that point. Continue "zooming in" until the point doesn't change much. You're essentially claiming that such a Cauchy sequence converges, which is true if the space is complete.
Here's another approach. If you're minimizing the linear function, without the absolute value signs, then I think it is a theorem of linear programming that your max and min will occur somewhere on the boundaries of your region. So picture your annular spherical region (hollowed-out sphere). Now consider the family of planes . What you're interested in, due to that theorem of linear programming, are places where members of the family of planes are tangent to either the inner or the outer sphere (probably the outer sphere contains the solution, but you want to be careful). So compute the four locations where the family of planes are tangent to either the inner or the outer sphere, evaluate the sum to be minimized at each of those four locations, and pick the minimum. Done.
Hope this helps.
Ok, with that function to be minimized, you're not going to be able to use the planes approach, since the function does not correspond to a plane. The question also arises whether the first approach I mentioned, with the spherical coordinates, will work. If you can convince yourself that the min will occur on a boundary of the domain, then you can still use the earlier approach I mentioned. You're just going to have to evaluate the function
instead of the the one I mentioned earlier.
If, however, you can't convince yourself that the extremum occurs on the boundary, you're going to have to define your variables this way (I think I'd still use spherical coordinates, because of the symmetry and organization they provide for this problem):
where , , and . Then you do your "zooming in" in all three variables, .
Thanks for the help so far,
(a,b,c) is centre and (x,y,z) is on the sphere , my goal is to minimize the displacement of centre (a,b,c)
and yes, I am convinced that minimum will occur on a boundary of domain.
can u tell me how to minimize this function??
l x + r sin( θ)cos( ψ) l + l y + r sin( θ)cos( ψ) l + l z + r cos( θ) l