Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose you are in charge of an advertising platform that allows a client ( advertiser ) to bid on dif - ferent keywords, say, in
Suppose you are in charge of an advertising platform that allows a client advertiser to bid on dif ferent keywords, say, in the context of a search engine egfast solutionsalgorithmmachine learning solution etc For every possible keyword, such as algorithm the client may specify a certain budget balgorithm, which translates into a certain number of impressions, and eventually a certain amount of new traffic towards clients website. Your client obviously wants to increase the total amount of new traffic to their website, by way of allocating their total ad budget to various relevant keywords.
In order to improve the experience, you decide to offer to the clients a service that, given their total ad budget B will automatically allocate the budget among the keywords maximizing the total projected traffic to clients website. To model the latter, you already have a prediction algorithm f which maps a pair of keyword k dollar amount d into traffic amount. Note that the function is specific to each client, but this is not relevant here as we consider one client only at a time.
We formalize the problem as follows. Let n be the number of different keywords. You have access to the function f k d denoting the ad traffic generated by spending d dollars on keyword k Then given the total budget B of dollars to spend on the ads, you need to find the best way to allocate the budget amongst n keyword to maximize the total ad traffic. In particular determine integers bbn with Pnk bk B that maximizes Pnk fkbk
We will consider various solutions depending on properties of the function f As you will see, the properties of the function f can affect dramatically what algorithms we deploy.
Problem Supposethefunctionfkdislinear:fkdakdwhereakaresomefixed constants denoting traffic per dollar for the fixed keyword k Design an algorithm that allocates the budget maximizing the ad traffic. Hint: note that in that case you can assign the entire budget
to a single keyword. Your algorithm should run in time On only.
The above assumption of linearity of the function f is generally too simplistic: for example, some keywords are rare and hence the ad traffic may saturate Now suppose the function f is arbitrary, with the natural property that it is nondecreasing in the dollar amount d: namely, f k d f k d for all k in n d
For this version, you can design a dynamic programming solution as follows. Define Tkb as being the maximum ad traffic that can be generated from the best allocation of the budget b to the the keywords k only. Note that TnB is the overall maximum ad budget achievable ie the answer to the full problem
Problem Develop the recurrence for the quantity Tkb: ie show how to compute Tkb from T i j where i k and b j with one of them being a strict inequality
Problem What is the resulting runtime of the algorithm?
It may be possible to make the solution more efficient if we assume some extra properties of the function f A particularly natural property is that of law of diminishing returns, which means that adding more dollars to the same keyword will result in smaller increases in traffic: ie f i d f i d f i d f i d for any d
Problem Suppose the optimal allocation of B dollars is to allocate di dollars for keyword i where B Pi di Now suppose we have one extra dollar to spend. What is the best allocation now, ie for a budget of B Hint: it would be a simple modificationextension of allocation dddn
Problem Now design a greedy algorithm for this problem under the law of diminishing returns property with a runtime of OnBplease share all python codes.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started