Smoke Over the Brickworks

externality · marginal social cost · deadweight loss · Pigouvian tax · corner solution

The brick kilns of a river town sell bricks in a competitive market, measured in pallets per week. With price P in dollars per pallet and quantity Q:

  • inverse demand (what buyers will pay for the Q-th pallet): P = a - bQ;
  • marginal private cost (the kilns' supply curve, what it costs them to make the Q-th pallet): P = c + dQ.

Every pallet also sends smoke over the town, which costs the people downwind e dollars per pallet (a constant marginal external cost) that the kilns do not pay. The marginal social cost is therefore c + dQ + e.

  1. The market quantity Q_m is where demand meets marginal private cost; it is 0 when a \le c.
  2. The efficient quantity Q^* is where demand meets marginal social cost; it is 0 when a \le c + e.
  3. The deadweight loss is the value lost by producing Q_m instead of Q^*: the area between the marginal social cost line and the demand line from Q^* to Q_m, that is \int_{Q^*}^{Q_m} \big((c + dQ + e) - (a - bQ)\big)\,dQ (0 when the two quantities are equal).
  4. The town may charge the kilns a tax of t dollars per pallet, which raises their marginal cost to c + t + dQ. Report the smallest t >= 0 for which the market quantity with the tax equals Q^*.

Write pigou(a, b, c, d, e) that returns the tuple (q_market, q_efficient, deadweight_loss, tax) as floats.

Examples

Input:  a = 100, b = 2, c = 10, d = 1, e = 15
Output: (30.0, 25.0, 37.5, 15.0)
Explanation: 100 - 2Q = 10 + Q gives Q = 30; 100 - 2Q = 25 + Q gives Q = 25.
The gap between the lines is 15 at Q = 30 and 0 at Q = 25: a triangle of area 37.5.

Input:  a = 40, b = 1, c = 20, d = 1, e = 30
Output: (10.0, 0.0, 200.0, 20.0)
Explanation: even the first pallet costs society 50 but is worth only 40 to a buyer,
so the efficient quantity is 0. A tax of 20 is the smallest that stops all sales.

Input:  a = 10, b = 1, c = 20, d = 1, e = 5
Output: (0.0, 0.0, 0.0, 0.0)

Goals

  • Find the market quantity and the efficient quantity when production harms bystanders
  • Measure the deadweight loss as the area between marginal social cost and demand
  • Find the smallest per-unit tax that brings the market to the efficient quantity, corners included
Starting Python…