Back in the euphoric early days of the Web, people liked to claim that much of t
ID: 3817487 • Letter: B
Question
Back in the euphoric early days of the Web, people liked to claim that much of the enormous potential in a company like Yahoo! was in the “eyeballs”—the simple fact that millions of people look at its pages every day. Further, by convincing people to register personal data with the site, a site like Yahoo! can show each user an extremely targeted advertisement whenever he or she visits the site, in a way that TV networks or magazines couldn’t hope to match. So if a user has told Yahoo! that he or she is a 20-year-old computer science major from Cornell University, the site can present a banner ad for apartments in Ithaca, New York; on the other hand, if he or she is a 50-year-old investment banker from Greenwich, Connecticut, the site can display a banner ad pitching Lincoln Town Cars instead.
But deciding on which ads to show to which people involves some serious computation behind the scenes. Suppose that the managers of a popular Web site have identified k distinct demographic groups G1, G2, . . . , Gk. (These groups can overlap; for example, G1 can be equal to all residents of New York State, and G2 can be equal to all people with a degree in computer science.) The site has contracts with m different advertisers, to show a certain number of copies of their ads to users of the site. Here’s what the contract with the ith advertiser looks like.
. For a subset Xi {G1, . . . , Gk} of the demographic groups, advertiser i wants its ads shown only to users who belong to at least one of the demographic groups in the set Xi.
. For a number ri, advertiser i wants its ads shown to at least ri users each minute.
Now consider the problem of designing a good advertising policy— a way to show a single ad to each user of the site. Suppose at a given minute, there are n users visiting the site. Because we have registration information on each of these users, we know that user j (for j = 1, 2, . . . , n) belongs to a subset Uj {G1, . . . , Gk} of the demographic groups. The problem is: Is there a way to show a single ad to each user so that the site’s contracts with each of the m advertisers is satisfied for this minute? (That is, for each i=1,2,...,m, can at least ri of the n users, each belonging to at least one demographic group in Xi, be shown an ad provided by advertiser i?)
Give an efficient algorithm to decide if this is possible, and if so, to actually choose an ad to show each user.
Please give the algorithm and the proof and the running time.
Explanation / Answer
ANS:-
Organize streams are frequently great approaches to express task issues. You let one set be the sources and let the other set be sinks and after that let a maximal stream demonstrate who is alloted to whom There are productive calculations for finding a maximal stream.
To express this as a system stream issue say that you have digraph associating publicists to clients. Every publicist vertex is associated with a client if that client is worthy to that sponsor. On the off chance that you demonstrate a promotion let the stream on that edge be 1 generally 0. You need the aggregate stream out of sponsor i to be the agreement sum ri while the aggregate stream into a client ought to be at most 1 So, let the publicist vertices be sources with limit ri and let the clients be sinks with limit 1 and locate a maximal stream on this system. In the event that there is a stream with aggregate volume iri then it is conceivable to fulfill the agreements by demonstrating the advertisements showed by the edges with stream 1
What does it mean on the off chance that you have a maximal stream of the correct volume so that the course through one client is 0?
On the off chance that the diagram is extensive, then it may be more helpful to part this system into various layers. You can give the publicists a chance to be associated not to the clients but rather to vertices speaking to the statistic gatherings and let every statistic gathering be associated with the clients in that groupFlow from a promoter through a statistic gathering to a client still means the sponsor is fulfilled by demonstrating an advertisement to that client. Regardless you need to make the sponsors sources with limit ri for the ith promoter despite everything you need to make the clients sinks with limit 1.
What limit should you provide for an edge interfacing a promoter to a statistic gather
case littler than the one you should develop to some extent b. Assume there are three promoters and two statistic bunches. Promoter 0 is keen on gathering 0 publicist 1 is occupied with gathering 1. what's more, publicist 2 is occupied with both. Assume there are 4 clients in gathering 0 alone, 4 clients in gathering 1 alone and 2 clients in both Suppose publicist 0 needs to show 5 promotions sponsor 1 needs to show 2 advertisements and promoter 2 needs to show 2 promotions There are arrangements. For instance every one of the 4 clients in gathering 0 alone may see a promotion from sponsor 0 as might 1 client in both gatherings. At that point 2 clients in gathering 1 alone may see a promotion from sponsor 1 and the rest of the 3 clients 2 in gathering 1 alone and 1 client in both see a promotion from promoter 2 .
ALgoritham Example:-
For a subset Xi {G1, . . . , Gk} of the statistic bunches, promoter i needs its advertisements
demonstrated just to clients who have a place with no less than one of the statistic gathers in the set
Xi
.
• For a number ri
, promoter i needs its advertisements appeared to in any event ri clients every moment
Presently, consider the issue of outlining a decent promoting arrangement - an approach to demonstrate a solitary advertisement
to every client of the site. Assume at a given moment, there are n clients going by the site. Since
we have enrollment data on each of these clients, we realize that client j(for j = 1,2, . . . , n)
has a place with a subset Uj {G1
, . . . ,Gk
} of the statistic bunches. The issue is: is there a
approach to demonstrate a solitary promotion to every client so that the site's agreements with each of the m sponsors is
fulfilled for this minuteThat is, for every i = 1, 2, . . . , m in any event ri of the n clients, each having a place
to no less than one statistic amass in Xi are demonstrated a promotion gave by promoter.
Give an effective calculation to choose if this is conceivable, and assuming this is the case, to really pick a promotion to
demonstrate every client.
Specially appointed systems made up of low-controlled remote gadgets, have been proposed for
circumstances like catastrophic events in which the facilitators of a save exertion may need
to screen conditions in a difficult to-achieve range. The thought is that a vast accumulation of these
remote gadgets could be dropped into such a range from a plane, and after that be designed
into a working system.
Take note of that we're discussing (a) generally cheap gadgets that are (b) being dropped
from a plane into (c) perilous domain; and for the mix of reasons (a), (b),
also, (c), it winds up plainly important to incorporate arrangements for managing the disappointment of a sensible
number of the hubs.
We'd like the facts to confirm that on the off chance that one of the gadgets v recognizes that it is in threat of
fizzling, it ought to transmit a portrayal of its present state to some other gadget in the
organize. Every gadget has a restricted transmitting range — say it can speak with other
gadgets that exist in d meters of it. Additionally, since we don't need it to have a go at transmitting
its state to a gadget that has as of now fizzled, we ought to incorporate some repetition: a gadget v
ought to have an arrangement of k different gadgets that it can conceivably contact, each inside d meters of
it. We'll get back to this an up set for gadget v.
(a) Suppose you're given an arrangement of n remote gadgets, with positions spoke to by an
(x, y) facilitate combine for each. Outline a calculation that decides if it is conceivable
to pick a move down set for every gadget (i.e. k different gadgets, each inside d meters), with the
facilitate property that, for some parameter b, no gadget shows up in the move down arrangement of something beyond
than b different gadgets. The calculation ought to yield the go down sets themselves, gave
they can be found.
The possibility that, for each combine of gadgets v and w, there's a strict division between
being "in range" or "out of range" is a rearranged deliberation. All the more precisely, there's a
control rot work f(·) that determines, for a couple of gadgets at separation , the flag quality
f() that they'll have the capacity to accomplish on their remote association. (We'll expect that f()
diminishes with expanding
We might need to incorporate this with our idea of move down sets as takes after among the k
gadgets in the go down arrangement of v there ought to be no less than one that can be come to with exceptionally
high flag quality no less than one other than can be come to with modestly high flag
quality, et cetera. All the more solidly, we have values p1 p2 · pk so that if the
move down set for v comprises of gadgets at separations d1 d2 · dk, then we ought to have
f(dj) pj
for every j.
Give a calculation that decides if it is conceivable to pick a move down set for each
gadget subject to this more point by point condition, as yet requiring that no gadget ought to show up
in the move down arrangement of more than b different gadgets. Once more, the calculation ought to yield the
move down sets themselves gave they can be found.
Assume you are given a stream connect with whole number limits together with a greatest
stream f that has been registered in the system. Presently, the limit of one of the edges
e out of the source is raised by one unit. Demonstrate to figure a greatest stream in the
coming about system in time O(m + n) where m is the quantity of edges and n is the number
of hubs.
Youre planning an intuitive picture division device that fills in as takes after. You
begin with the picture division set-up portrayed in Section 5.9, with n pixels, an arrangement of
neighboring sets, and parameters {ai}, {bi}, and {pij} We will make two suppositions
about this occurrence. To begin with we will assume that each of the parameters {ai} {bi}, and {pij}
is a non-negative whole number in the vicinity of 0 and d, for some number d. Second, we will assume that
the neighbor connection among the pixels has the property that every pixel is a neighbor of at
most four different pixels
You first play out an underlying division (A0, B0) in order to augment the amount q(A0, B0).
Presently, this may bring about specific pixels being relegated to the foundation, when the client
realizes that they should be in the frontal area. So when given the division
the client has the choice of mouseclicking on a specific pixel v1,thereby conveying it to the
forefront. However, the apparatus ought not just bring this pixel into the frontal area rather it
ought to process a division (A1, B1) that boosts the amount q(A1, B1) subject to
the condition that v1 is in the forefront. Practically speaking this is helpful for the accompanying kind
of operation in fragmenting a photograph of a gathering of individuals maybe somebody is holding a
pack that has been incidentally named as a feature of the foundation. By tapping on a solitary
pixel having a place with the pack, and re-registering an ideal division subject to the new
condition, the entire pack will frequently turn out to be a piece of the frontal area.
Truth be told, the framework ought to permit the client to play out a succession of such mouse-clicks
v1, v2, . . . , vt
; and after mouse-click vi
, the framework ought to deliver a division (Ai
, Bi)
that augments the amount q(Ai
, Bi) subject to the condition that all of v1, v2, . . . , vi are in
the closer view.
Give a calculation that plays out these operations so that the underlying division is
figured inside a steady component of the ideal opportunity for a solitary most extreme stream and after that the
collaboration with the client is taken care of in O(dn) time per mouse-click.
is a helpful primitive for doing this. Additionally, the symmetric operation of
compelling a pixel to have a place with the foundation can be taken care of by practically equivalent to implies however you do not need to work this over here
Promote on the off chance that you utilize the second system structure with statistic gather vertices then the stream comparing to along these lines to appoint advertisements is not one of a kind since when sponsor 2 demonstrates an advertisement o a client in both socioeconomic sa this could originate from a course through gathering 0 or through gathering 1.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.