Re: Seeking overlap algorithm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 6, 2007 4:59 PM, tedd <tedd@xxxxxxxxxxxx> wrote:

> Hi gang:
>
> This post is related to the zip lat/long request I recently made and
> received such an overwhelming response -- many thanks to all.
>
> In any event, let's say we have a end-user who is looking for
> services within his zip-code AND we have a dB of service providers
> who are willing to render service within a set distance (like 50
> miles) from their location.
>
> Now, it's a simple matter to convert the user's zip code to lat/longs
> and then find out how many service providers there are within their
> area and then show that list to the end-user. That's not the problem.
>
> The problem is, could you guarantee to a "preferred" service provider
> that they would receive top-listing 25 percent of the time? Keep in
> mind that preferred service providers will overlap. So, the question
> is how to accommodate for that overlap?
>
> If anyone has an algorithm, I would be interested in hearing it.


i think that should be pretty easy.
the algorithm is dependent upon 2 values.  the number of listings you
consider
as top-listings for each result set and the number of customers that are
registered as preferred customers.
let me illustrate.
imagine you designate only the first entry of the resultant listings as a *
top-listing*.
in that case you can support a maximum of 4 preferred customers before you
can
no longer guarantee to each of the preferred customers their listing will be
a top-listing
25% of the time.  so, if you want more capacity you can increase the number
of
results that are designated as top-listing results.  suppose you increase
the number
to 2, now you have a capacity of 8 customers you can guarantee top-listing
status 25%
of the time.
what you would need to determine is what to do if ever you didnt want to
increment the
number of listings that are designated as top-listing customers and you were
already
at capacity for the number of customers the current capacity supports.
perhaps you
could start charging more at that point.

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux