Trading in a Town

Originating authors are Alberto A. Pintoa (University of Porto, cLIAAD-INESC Porto LA) and Telmo Parreira (University of Minho, cLIAAD-INESC Porto LA).

Have you ever been frustrated by the lack of choices when you go to buy something? Why do producers of the things we buy tend to make their products as similar to each other as possible? If we model how shoppers in a city will choose in which store they will make their purchases, the resulting mathematics leads us to an appreciation of Hotelling’s Law that making products similar to your competitor is actually a rational decision. We are also led into the mathematics of game theory and Nash’s Equilibrium.

1 Introduction

Consider a village where almost all the residents live along the principal street and in which there are only two stores: Manuel’s and Joaquim’s. The villagers can buy their products at either store.

We identify the main street with the line segment [0, L], and to simplify the model, we assume that Manuel’s store is at the point 0 and that Joaquim’s store is at point L, that is, the ends of the street. We denote by c_M and c_J the unit costs for each seller (store) and p_M and p_J the unit prices of the same products in the stores of Manuel and Joaquim, respectively.

Antonio, who lives in the house with the address d \in \{0,1, ..., L\} in the street, has the cost p_M + dt if he buys at Manuel’s store, and has cost p_J + (L - d)t if he buys at Joaquim’s store, where t is the unit cost of moving in one direction or the other. Antonio decides to buy in the store where the cost is least.
Thus if

    \[p_M + dt < p_J + (L - d)t\]

then Antonio will buy in Manuel’s store, and if

    \[p_M + dt > p_J + (L - d)t\]

then he will buy in Joaquim’s store. This kind of competition between two firms (sellers) is described by the Hotelling model ([1], [4]).

Now assume that each villager will buy one unit of a product by moving to one of the stores. Thus, the number of units, k, sold by Manuel is equal to the number of people who will buy in his shop, and his profit, k(p_M - c_M) is equal to the number of product units sold, k, times earnings p_M - c_M obtained in each sale. Profits from Joaquim are calculated similarly. What prices, p_M and p_J should Manuel and Joaquim charge to maximize their profit?

Should Manuel and Joaquim cooperate and charge high prices? If they do so each one of them will have the incentive to decrease its own price, because this action will increase its market share and, so, its own profit. Since they are competing and not cooperating, they will follow these incentives to change their prices. These phenomena will lead to a sequence of successive changes of prices by Manuel and Joaquim following their incentives to change their prices taking in account the prices that they see the other one is practicing. The relevant problem that arises consists in finding out if this incentive dynamical process of changing their prices leads to some equilibrium prices. The answer to this problem is well-known: the Nash equilibrium. The Nash equilibrium is a strategic optimal, i.e. the Nash equilibrium prices of Joaquim and Manuel are such that no one of them has an incentive to change its own price anymore. We are going to explain how to compute the Nash price equilibrium of Joaquim and Manuel.

2 Hotelling’s Model

Depending on the prices, p_M and p_J, charged by Manuel and Joaquims’ stores and assuming an indifferent consumer who lives in a house with address d_0 \in [0, L], for whom the cost of going to Manuel’s store and buy a product is equal to the cost of going to Joaquim’s store and buy the same product (see Figure 1), that is:

    \[p_M + td_0 = p_J + t(L - d_0)\]

Figure 1. Hotelling’s street

Figure 1. Hotelling’s street

We note that the position of the indifferent consumer d_0 is the intersection point of the lines p_M + td and p_J + t (L - d) with independent variable d. Thus the indifferent consumer lives in a house with address:

    \[d_0 = \frac{tL + p_J - p_M}{2t}\]

If d_0 \leq 0, no one will buy from Manuel’s store, consequently opening him to bankruptcy. If d_0 \geq L, nobody will buy from Joaquim’s store leading to his bankruptcy. If d_0 \in (0, L), both stores have buyers and not go bankrupt, that is, the market is competitive.
Assuming the market is competitive, people who live in homes in the range [0, d_0] will buy from Manuel’s store and those who live in homes with an address in the interval [d_0, L] will buy from Joaquim’s. Assume that N villagers are evenly distributed along the street, so that the number of people who will buy from Manuel’s store will be d_0N/L and the number of people who will buy from Joaquim will be (L - d_0)N/L. Thus, the gain to Manuel is given by:

    \[\pi_M (p_M) = (p_M-c_M)d_0 \frac{N}{L} = (p_M-c_M) \left(\frac{tL+p_J-p_M}{2t} \right) \frac{N}{L}\]

And, similarly, the gain to Joaquim is given by:

    \[\pi_J (p_J) = (p_J-c_J)(L-d_0) \frac{N}{L} = (p_J-c_J) \left(\frac{tL+p_M-p_J}{2t} \right) \frac{N}{L}\]

Manuel and Joaquim wish to determine the prices, p_M and p_J, to maximise their profits \pi_M(p_M) and \pi_J(p_J). To this end, by writing x = p_M and f(x) = \pi_M(p_M), we obtain that

    \[f(x) = (x-c_M) \left(\frac{tL+p_J-x}{2t} \right) \frac{N}{L}\]

    \[= -\frac{N}{2tL}x^2 + \frac{N(tL+p_J+c_M)}{2tL}x - \frac{N(c_MtL+c_Mp_J)}{2tL}\]

Since the coefficient of the term of degree two is negative, the function f has a unique maximum which is reached at the midpoint of the two roots x^*. Since the two roots of f are c_M and p_J + tL we obtain that the indifferent consumer is located at

    \[x^* = (c_M + p_J + tL)/2.\]

Thus, the price that Manuel should charge to maximise his profit is:

    \[p_M = \frac{1}{2}(c_M + p_J + tL)\]

And, similarly, the price that Joaquim should charge to maximise his profit is:

    \[p_J = \frac{1}{2}(c_J + p_M + tL)\]

Thus, the prices to be charged by Manuel and Joaquim are obtained by solving this system of two equations with two unknowns p_M and p_J:

    \[\begin{cases} p_M=(c_M+p_J+tL)/2 \\ p_J=(c_J+p_M+tL)/2 . \end{cases}\]

Rearranging, the prices charged by the stores in order to maximise profit, should be as follows: (1)

    \[\begin{cases} p_M=tL + \frac{2}{3}c_M + \frac{1}{3}c_J \\ p_J=tL + \frac{2}{3}c_J + \frac{1}{3}c_M . \end{cases}\]

Note that the stores have to sell products at a price greater than its cost, that is p_M > c_M and p_J > c_J. For (1), these conditions hold, which is equivalent to saying that:

    \[| c_M - c_J | < 3tL\]

Thus, if the condition holds, then the market is competitive, that is, the two stores have customers and prices in Manuel and Joaquim’s stores are given by (1). The pair of prices (p_M, p_J) is the Nash equilibrium ([5]) of the problem, that is they are the best prices that both stores can charge taking into account the prices of the other store. Charging these prices, both Manuel and Joaquim make the profits:

    \[\pi_M = (p_M-c_M) \frac{N}{L} \left(\frac{tL+p_J-p_M}{2t} \right) = \frac{N}{L} \frac{(3tL+c_J-c_M)^2}{18t}\]

    \[\pi_J = (p_J-c_J) \frac{N}{L} \left(\frac{tL+p_M-p_J}{2t} \right) = \frac{N}{L} \frac{(3tL+c_M-c_J)^2}{18t}\]

Profits, like prices, are determined by the cost of transporting, t, and by production costs c_M and c_J. Note that (i) if c_M > c_J + 3tL then Manuel is open to bankruptcy and d_0 = 0 and (ii) if c_J > c_M + 3tL then Joaquim is open to bankruptcy and d_0 = L. In both cases, the the price formula (1) does not apply if the market is competitive.

Exercise: Consider a village with a population, N = 1000, and whose main thoroughfare is 1km long and the unit cost of transportation is t = 1 (per meter).
a) Given that at costs c_M = 2100 and c_J = 5200 one store becomes open to bankruptcy, which store is it?
b) Given that costs c_M = 2100 and c_J = 2700 make the market competitive, calculate the prices and profits in each store.

3 Shopping in a town

Now consider that our city is a set of main roads (represented as edges of a graph) in which the stores are located at the intersections of k routes (with k > 2). The number of incident edges, k, is the degree of the node.

Figure 2. Hotelling’s City

Figure 2. Hotelling’s City

The buyers of products sold by the stores are spread throughout the city. Every store, F_A, situated at node of degree k, competes with k stores located on neighboring nodes. We denote by V_A the set of k neighboring stores of F_A. See the example in Figure 2, where the store F_A, located at a node of degree 4, competes with neighboring stores F_B, F_C, ​​F_D and F_E.

The store F_A has a unit cost c_A and the same unit price p_A for all consumers. Consumers from different places of the same crossroads pay the price p_A of store F_A plus the shipping cost that is proportional to the distance that they travel between their home and the store F_A. Suppose that the path between any stores F_A and F_B has length L and N inhabitants to simplify the mathematical model.
Thus, the indifferent consumer is at a distance d_{A,B}, from store F_A, and distance L - d_{A,B} from store F_B determined by: (2)

    \[p_A + td_{A,B} = p_B +t(L - d_{A,B})\]

Solving equation (2), we find the location, d_{A,B}, of the indifferent consumer:


The profit associated with this market to the store F_A is given by:

    \[\pi_{A,B}=(p_A-c_A) \frac{N}{L} d_{A,B} = \frac{N}{2tL}(p_A-c_A)(tL-p_A)+\frac{N}{2tL}(p_A-c_A)p_B\]

For each store F_A, on k_A, with neighboring store F_B \in V_A, the profit function \pi_A is the sum of profits in each market, ie,

    \[\pi_A(p_A) & = k_A \frac{N}{2tL}(p_A-c_A)(tL-p_A)+\frac{N}{2tL} \sum_{B\in V_A} p_B(p_A-c_A)\]

    \[= \frac{N}{2tL}(p_A-c_A)(k_A tL-k_A p_A + \sum_{B\in V_A} p_B ).\]

So, for a competitive network with M nodes, the prices p_A charged by stores F_A in the Nash equilibrium, are the solutions of the following linear system of M equations (3)

    \[p_A = \frac{1}{2} \left( c_A + tL + \frac{1}{k_A} \sum_{B\in V_A} p_B \right)\]

for all A \in \{1,...,M\}. The proof of this result is an extension of what was done in the previous section and can be studied in [2] and [3]. Given a concrete network of stores, solving this system of equations can be done using a computer.

Exercise: Consider a (square-shaped) quarter with a store in each corner, M = 4, as in Figure 3. Consider also that each route has N = 1000 inhabitants, is 1 km long, and the unit cost of transportation is t = 1 (per meter).
a) Given the costs c_A = c_B = c_C = c_D = 2000, show that competitive prices are p_A = p_B = p_C = p_D = 3000 and that the profits of each store are 100 0000.
b) Given the costs c_A = c_C = 1800 and c_B = c_D = 2100, show that competitive prices are p_A = p_C = 2900, p_B = p_D = 3000, and the corresponding profits are \pi_A = \pi_C = 1210000 and \pi_B = \pi_D = 810000.

Figure 3. The City Quarter

Figure 3. The City Quarter

4 Conclusion

Hotelling’s model is central in Industrial Mathematics and Game Theory (see other models, for example, in [3]). We have found the optimal strategy (price) for each player (store), taking into account the strategies of the other players and what is usually called the Nash Equilibrium. In particular, we have seen how a chain of stores that sell the same product competitively in a city set their prices, and how consumers decide which store to use to make their purchases at the lowest price.
The paradigmatic example of Game Theory is the Prisoner’s Dilemma which is easily described and we recommend this for further study. Applications of Game Theory are vast, including to the fundamental understanding of human behaviour.

[1] H. Hotelling. Stability in Competition, The Economic Journal 39 (1929) 41-57.
[2] A. A. Pinto & T. Parreira. A hotelling-type network. Editors: M. Peixoto, A. A. Pinto, and D. Rand. Dynamics, Games and Science I. Springer Proceedings in Mathematics series 1, Chapter 45, (2011) 709-720.
[3] A. A. Pinto. Duopoly Models and Uncertainty. Interdisciplinary Applied Mathematics series. Springer-Verlag (2012).

This post is also available in: German, Arabic

This entry was posted in Mathematics Within the Last 100 Years. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *