# The centralized shift from barter to currency economy

Suppose some ancient king of small bronze age city-state wants to introduce universal currency instead of barter that is currently in overwhelming practice in his kingdom. In order to smooth the shift, he wants to impose such intial prices that will correspond to current barter rates, for example, if ten pounds of fish are usually exchanged for one one pound of olive oil, that one pound of olive oil shall cost 10 times more than one pound of fish, etc. So king order his scribes to conduct a survey in order to determine traditional barter rates of all crucial products in the kingdom. In result, the following table was created:
$$\begin{bmatrix} k_{11} & k_{12} & ... & k_{1n} \\ k_{21} & k_{22} & ... & k_{2n} \\ ... & ... & ... & ... \\ k_{n1} & k_{n1} & ... & k_{nn} \end{bmatrix}$$
In this table $$k_{ij}$$ is number that express barter how many units of product j are usually given for one unit of product i. Of course, $$k_{ji} = \frac{1}{k_{ij}}$$ and for all $$i$$, $$k_{ii}=1$$. The idea was to find the cheapest commodity, establish its price as 1 and assign all prices accordingly from exchange of this commodity. However, it was discovered, that some of barter relationships are not in equilibrium. In other words, you can exchange commodity A to commodity B to commodity C and finally back to commodity A end up with significantly more or less than you started. King wants to achieve equilibrium for initial prices with minimized disruption to existing economic relationships in the market, thus the set of prices $$P = \{p_1,p_2,...,p_n\}$$ should satisfy the following properties:
1)$$\sum_{i=0}^{n}\sum_{j=0}^{n}(k_{ij}\frac{p_j}{p_i})=n^2$$
2)$$\sum_{ij}(k_{ij}\frac{p_j}{p_i}-1)^2$$ has minimum possible value of all that satisfy the first condition.

The first condition basically says that arithmetic mean $$k_{ij}\frac{p_j}{p_i}$$ is 1.
The second condition minimizes mean variance of individual $$k_{ij}\frac{p_j}{p_i}$$ from this desired value.

Is there any mathematical approach used in economics that can express prices for given set of rates explicitly (up to common scaling factor, of course)? King's story is just for flavor, don't overanalyze it.

• Could you perhaps elaborate on properties 1) and 2) a little bit. The notation is somewhat difficult to follow: what is $\min$? Is the goal to minimize the sum in 2)? Do you add up separately over $i$ and $j$, that is $\sum_i\sum_j$? Does 1) have any particular meaning? Seems a bit arbitrary. – Giskard Oct 20 '19 at 15:04
• @Giskard, I made edits to clarify what I meant. – Мікалас Кaрыбутоў Oct 20 '19 at 19:36