Re: Seeking overlap algorithm
| From: | Nathan Nobbe | Date: | Sat, 08 Dec 2007 02:28:29 +0000 |
| Subject: | Re: Seeking overlap algorithm | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265577@lists.php.net to get a copy of this message | ||
On Dec 7, 2007 10:12 AM, Ford, Mike <M.Ford@leedsmet.ac.uk> wrote:
> On 07 December 2007 02:14, tedd wrote:
>
>
> > Now, what I need is a way to analyze the distribution of the current
> > service providers to see if a given location is open to being sold as
> > a "preferred" position -- do you see what I mean?
> >
> > Another example, let's say we have four "preferred" service providers
> > at the same location. Obviously, we could not sell another
> > "preferred" position within 100 miles.
> >
> > Another example, let's say we have four "preferred" service providers
> > 100 miles apart, clearly we can sell more "preferred" positions. But,
> > the number of positions available depends upon the distribution of
> > the original four. If they were located in a straight line, then we
> > could sell two positions between each one. But, if they were
> > distributed in a square, we could only sell one. Do you see?
>
> A simplistic but effective way would be:
>
> (1) Locate all "preferred" providers within 50 miles of the potential new
> one (presumably a maximum of four!).
>
> (2) For each of these, find how many suppliers are within their 50-mile
> catchment radius.
>
> If any of the answers at step 2 is four, you lose; if none of them is, you
> win.
>
> I can't think of any obvious ways to optimize this, but then I never did
> properly "get" the travelling salesman or 4-colour problem!
im ashamed to admit i blew off a couple of linear algebra classes and a
calc-based stats class in college. had i paid attention, this might still
be
a trivial problem =/
..., bah!
-nathan