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.
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 , and to simplify the model, we assume that Manuel’s store is at the point and that Joaquim’s store is at point , that is, the ends of the street. We denote by and the unit costs for each seller (store) and and the unit prices of the same products in the stores of Manuel and Joaquim, respectively.
Antonio, who lives in the house with the address in the street, has the cost if he buys at Manuel’s store, and has cost if he buys at Joaquim’s store, where is the unit cost of moving in one direction or the other. Antonio decides to buy in the store where the cost is least.
then Antonio will buy in Manuel’s store, and if
then he will buy in Joaquim’s store. This kind of competition between two firms (sellers) is described by the Hotelling model (, ).
Now assume that each villager will buy one unit of a product by moving to one of the stores. Thus, the number of units, , sold by Manuel is equal to the number of people who will buy in his shop, and his profit, is equal to the number of product units sold, , times earnings obtained in each sale. Profits from Joaquim are calculated similarly. What prices, and 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, and , charged by Manuel and Joaquims’ stores and assuming an indifferent consumer who lives in a house with address , 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:
We note that the position of the indifferent consumer is the intersection point of the lines and with independent variable . Thus the indifferent consumer lives in a house with address:
If , no one will buy from Manuel’s store, consequently opening him to bankruptcy. If , nobody will buy from Joaquim’s store leading to his bankruptcy. If , 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 will buy from Manuel’s store and those who live in homes with an address in the interval will buy from Joaquim’s. Assume that villagers are evenly distributed along the street, so that the number of people who will buy from Manuel’s store will be and the number of people who will buy from Joaquim will be . Thus, the gain to Manuel is given by:
And, similarly, the gain to Joaquim is given by:
Manuel and Joaquim wish to determine the prices, and , to maximise their profits and . To this end, by writing and , we obtain that
Since the coefficient of the term of degree two is negative, the function has a unique maximum which is reached at the midpoint of the two roots . Since the two roots of are and we obtain that the indifferent consumer is located at
Thus, the price that Manuel should charge to maximise his profit is:
And, similarly, the price that Joaquim should charge to maximise his profit is:
Thus, the prices to be charged by Manuel and Joaquim are obtained by solving this system of two equations with two unknowns and :
Rearranging, the prices charged by the stores in order to maximise profit, should be as follows: (1)
Note that the stores have to sell products at a price greater than its cost, that is and . For (1), these conditions hold, which is equivalent to saying that:
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 is the Nash equilibrium () 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:
Profits, like prices, are determined by the cost of transporting, , and by production costs and . Note that (i) if then Manuel is open to bankruptcy and and (ii) if then Joaquim is open to bankruptcy and . In both cases, the the price formula (1) does not apply if the market is competitive.
Exercise: Consider a village with a population, , and whose main thoroughfare is 1km long and the unit cost of transportation is (per meter).
a) Given that at costs and one store becomes open to bankruptcy, which store is it?
b) Given that costs and 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 routes (with ). The number of incident edges, , is the degree of the node.
The buyers of products sold by the stores are spread throughout the city. Every store, , situated at node of degree , competes with stores located on neighboring nodes. We denote by the set of neighboring stores of . See the example in Figure 2, where the store , located at a node of degree , competes with neighboring stores , , and .
The store has a unit cost and the same unit price for all consumers. Consumers from different places of the same crossroads pay the price of store plus the shipping cost that is proportional to the distance that they travel between their home and the store . Suppose that the path between any stores and has length and inhabitants to simplify the mathematical model.
Thus, the indifferent consumer is at a distance , from store , and distance from store determined by: (2)
Solving equation (2), we find the location, , of the indifferent consumer:
The profit associated with this market to the store is given by:
For each store , on , with neighboring store , the profit function is the sum of profits in each market, ie,
So, for a competitive network with nodes, the prices charged by stores in the Nash equilibrium, are the solutions of the following linear system of equations (3)
for all . The proof of this result is an extension of what was done in the previous section and can be studied in  and . 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, , as in Figure 3. Consider also that each route has inhabitants, is 1 km long, and the unit cost of transportation is (per meter).
a) Given the costs , show that competitive prices are and that the profits of each store are .
b) Given the costs and , show that competitive prices are , , and the corresponding profits are and .
Hotelling’s model is central in Industrial Mathematics and Game Theory (see other models, for example, in ). 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.
 H. Hotelling. Stability in Competition, The Economic Journal 39 (1929) 41-57.
 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.
 A. A. Pinto. Duopoly Models and Uncertainty. Interdisciplinary Applied Mathematics series. Springer-Verlag (2012).