Showing posts with label game theory. Show all posts
Showing posts with label game theory. Show all posts

2022/07/27

Nile basin mechanism design

Part 1 made the case for GERD in the short and medium term. Now for the really big picture

The human population of the Nile basin will probably double in the next century. Even if the Nile's water flow increases (some climate change scenario models indicate that rainfall could actually increase in the Nile basin over the next 50-100 years), it seems inevitable that demand will grow faster. And as mentioned in part 1, 100% of the flow is already being consumed. But this doesn't have to cause conflict. Globally, 70% of water use is for agriculture. So that's where the adjustments would have to be. From a natural resource optimization point of view, just like it doesn't make sense to grow almonds in California, or cotton in Kazakhstan, growing cotton and wheat in Egypt is probably not the most efficient use of water. 

What do we mean by efficient? Imagine for a second the whole region was one country; if an allocation of water to different uses maximizes total benefit, i.e. there is no other allocation that has a larger total benefit, then that's an efficient outcome. To achieve this efficiency, obviously some water intensive agriculture should migrate to other regions. But of course, the Nile doesn't have one owner and we don't have perfect cooperation, so we can't expect individual players (a country or a farmer or a business) to sacrifice their immediate interest and give up some water use for the greater good.  Game theory teaches us that an efficient resource allocation is useless if it is not feasible. And feasible means it's an equilibrium where each party benefits more from sticking to it than from deviating unilaterally. 

What would such an equilibrium look like? It's not as simple as dividing it equally.  For example, one issue is that if two people get the same amount of water, but one of them doesn't actually need it, that's a waste, i.e. inefficient.  Even the notion of need, beyond bare survival, is subjective: you can argue about the relative merit of washing clothes, how often people should take a shower or bath etc. 

Fortunately, there is a way to turn subjective values into an objective agreement: a price. What pricing mechanism might work in this scenario? For example, in a hypothetical v2.0 of the CFA all the countries in the basin could agree on a uniform Nile water tax. Each country would be liable to pay the tax for its total usage yearly. Of course, it would be up to each government to determine how the cost is distributed in its society: as a tax explicitly passed on to water consumers, or paid by general government revenue, or something in between. Passing the cost on is not as hard as it sounds since in most places that matter (homes and factories with running water, and farms with irrigation) water usage can easily be metered or is already. And non-consumptive uses like electricity generation would naturally be neutral. 

To keep each other honest, the countries could easily agree on verifiable data sources. Egypt doesn't have to trust the metering in Ethiopia and vice versa, they could rely on aggregate measurements of the water balance, a lot of which can be done using currently existing satellite data that is freely available from neutral sources.

The revenue from this would be collected in a common fund and automatically redistributed to member countries in pre-set proportions. The proportions are negotiated in advanced and fixed, and of course that would be the hardest part of the whole deal. One basis for this negotiation could be a share proportional to the present fraction of the total Nile basin population in that country (not the total population, obviously as countries have different fractions of territory and population falling within the basin).  

Naturally the price would have to be adjustable, say yearly, with a protocol agreed to in advance, so it regulates annual usage at sustainable levels i.e. below 100% of flow volume with a safety margin. If total usage is too high, the price goes up. If a lot of water goes unused, the price goes down. And if the total usage stays well below the sustainability level for a long time, the price would keep going down all the way to zero. This too is not as difficult as it may seem, it's basically the same idea as a carbon tax to fight climate change but much easier: the set of players that need to agree is much smaller (it's "only" 10 countries not 200), the consequences of water are immediately felt by all participants every year (unlike climate change which plays out over longer periods), and the target quantity is much easier to compute (total flow is well known, unlike the effect of different levels of greenhouse gases in the atmosphere which requires complex models with lots of uncertainty). (As an aside, the carbon tax itself is much better than cap and trade or carbon offsets, as I wrote on this blog a long time ago). With a pricing mechanism like that, no need for arguments about cotton in Egypt or irrigation in Ethiopia. Instead we would see a graceful phasing out of sub-optimal uses of water, and maximize the benefit of this shared resource. 

Finally to further solidify the positive economics and minimize the negative politics of the system, the countries should facilitate investments and trade across the region. If for example investors from each basin country were free to invest in other basin countries in farming and industry while still supplying the outputs to their domestic market, there would be less political friction around the natural geographic distribution of agriculture and industrial production. 

There are many examples of more complex cooperative agreements between countries around the world today, so it doesn't seem infeasible for the Nile basin countries to reach this kind of equilibrium. And recall we have plenty of time to achieve this long term goal, as the short term issue of GERD itself is win-win as discussed in part 1. But the chances of achieving this outcome will be greatly enhanced if in the meantime, the region's economies grow and become better diversified  across farming, industry and services.  Which brings us back to the present. Electrification is the sine qua non of developing a diversified economy. And GERD is a big step in the right direction, one which is immediately beneficial to not just Ethiopia but also Sudan and Egypt. 

2022/07/25

The case for GERD

As the third filling of the Grand Ethiopian Renaissance Dam (GERD) goes ahead, we should expect what is now becoming an annual uptick in media coverage and geopolitical controversy.  I've been thinking of writing a version of this blog post ever since the project started more than 10 years ago, but always ended up assuming this is adequately covered elsewhere. Years later, I'm still surprised by the frequency of incorrect assumptions dominating the discussion.  Not just in the media, but also in countless conversations. So it sounds like there might be some value in exposing the basic facts.

Power

GERD will have the capacity to generate 6GW of power at peak. However, due to seasonal variations, the average is expected to be about 40% of the peak. So on average, it should generate about 80 million GJ or 20 billion kWh of energy per year. Electricity production in 2019 was about 15 billion kWh, so GERD will more than double the  country's capacity. 
Electricity generation by source, Ethiopia 1990-2019


Economic impact

What is the economic value of this additional energy? Note that we are not asking what is the cost to produce it, nor the price at which it is sold. We are asking what is the economic value of consumer and industrial uses that it enables.  One way to estimate that is to look at the relationship between energy and GDP.  From a widely cited paper, "Energy and Economic Growth: The Stylized Facts",  we can deduce that each Gigajoule of energy corresponds to about $100 of GDP:  
Double checking with another source, "Our World in Data", gives us about $0.40 of GDP for every kWH.  This data has the added benefit that it shows a similar relationship, not just across countries but also on the same country over time: 


The two datasets are in almost perfect agreement. And they imply GERD's impact will be about $8B/year, or an increase of about 7% of GDP.[1] 

Considering the cost of the dam is about $5B, a return of $8B per year is great. Of course it will take a couple of more years for it to reach it's maximum generation capacity,  many years to develop the transmission and distribution of all this additional power to 100M consumers, and even more years for industries to grow that will take advantage of it. So the full impact is still far down the road, and depends on quite a few things happening correctly (not the least of which is finding ways to sell the "stranded" generated energy to finance the development of the distribution infrastructure, a topic which I will expand upon in the future). Still, the long term benefit is so large that there is no question the dam is a phenomenally good investment by Ethiopia.

You can also view it with a "social impact" lens if you are so inclined. Can you think of many projects where a one-time investment generates 160% return per year for many many years, increasing income by 7% for more than 100M people, most of whom are among the poorest in the world? Indeed GERD is possibly the biggest and perhaps most effective poverty reduction effort in the entire world today.


Climate impact

Of course, hydroelectric power is 100% renewable, and outside of the materials used in construction, the on-going operations have zero greenhouse gas emissions. Less obvious but also important is the fact that this electricity will displace current sources of energy which are dirtier. For example, millions of people in Ethiopia today often cook with wood charcoal, which from an emissions perspective, is worse than oil, let alone gas, or clean electricity. The amount is tiny on the scale of global emissions and climate change, but still moving from burning wood to electricity is a positive transition from dirty energy to clean energy. Further, the wood comes from cutting trees. Thus, electrification helps combat deforestation, and trees take CO2 out of the atmosphere through photosynthesis. For a good discussion on the relationship between electrification, deforestation and climate, I recommend the book "Apocalypse Never",  which explains this same point in detail using an example from the Democratic Republic of Congo. (As an aside, I also recommend my  review of that book on this blog).  So GERD not only does not emit, it reduces other carbon emissions, and saves trees which take carbon out of the atmosphere, a triple win in terms of reducing anthropogenic climate change


Water balance

Increased rainfall?

An additional argument, articulated by Ugandan president Museveni in this video, is that saving trees helps rainfall, which is a positive for total water balance of the overall Nile basin (water balance is a crucial point of contention as we shall see below).  
   
This particular argument is debatable since forests increase rainfall but trees also consume water. Here's a good paper on the links between forest cover and rainfall.  So it's probably a stretch to argue that water balance will increase. But hey, trees do enough for us even if they are neutral in the water balance equation. The overwhelming consensus is that preserving forests as much as possible is good, and electrification happens to help that.

No reduction in flow

The bigger question regarding water balance is of course whether the dam itself will reduce water availability downstream. This is where there is the biggest misunderstanding. Egyptians are extremely fearful that the dam will reduce the flow of the Nile, and they view it as an existential threat. But the reality is that the GERD will not reduce the amount of water that gets to Sudan and Egypt:
  1. Electricity generation doesn't consume water. As water, pulled by gravity, flows through turbines, the kinetic energy of the water becomes electric energy, and all the water comes out on the other side and flows downhill from there as always. 
  2. When there is loss of water from a dam, it is because it has a reservoir, a lake. The larger the area of the lake, the larger the loss due to evaporation. Indeed at the High Aswan Dam in Egypt, located more than a thousand kilometers downstream from the GERD in a flatter and hotter area, the reservoir (Lake Nasser) is large and shallow, causing a significant loss of water to evaporation. The GERD however is situated in a gorge, so the lake it creates is much narrower and deeper (about 1,900 km2 for GERD vs 5,250 km2 for Lake Nasser). It's also in a cooler area. Thus the evaporation impact of GERD is much less than Aswan's. Further, the purpose of the reservoir is to regulate the flow, like a battery. In theory, if you have a reservoir upstream, you can reduce the size of a reservoir downstream. So if we naively forget political boundaries for a second, and assume Egypt, Sudan and Ethiopia were 100% cooperative, to manage the total flow optimally, they would achieve the same magnitude of regulation by reducing the volume of Lake Nasser by the volume of GERD lake. Since GERD has relatively lower evaporation, this would be a net reduction in evaporation. But to keep things in perspective, evaporation accounts for less than 2 billion out of about 90 billion m3 /year of water flow on the Nile, so it's a minor issue.
  3. A much larger fear for downstream people is that the GERD might enable additional consumptive uses, like irrigation for agriculture. This is a legitimate general concern of course, and fairness and efficiency in consumptive uses is important. However, in the case of the GERD, its location at the most downstream point in Ethiopia, near the point where the river exits to Sudan, means that it would be infeasible to use any of the water from that point for agriculture, as you would have to pump it uphill to reach farms within Ethiopia. This effectively guarantees that GERD cannot physically be used for irrigation or any consumptive activity in Ethiopia.  
For more on this, see the seminar on 'The economic impacts of large dams: a comparative analysis of the Nile and Colorado Rivers' . In particular the evaporation question and non-consumptive nature of GERD are addressed at 1:09:23 in the video

Bottom line: GERD will not decrease the net amount of water that reaches Egypt and Sudan. Regardless of what you think about the historical sharing of water, the fear that it can harm downstream people is just not supported by facts.


Floods and drought mitigation

In fact it's actually beneficial to them. As I tweeted some time ago, this excellent paper entitled 'Understanding and managing new risks on the Nile with the Grand Ethiopian Renaissance Dam' explains it:
  1. "Sudan will clearly be better off ... because GERD operations will smooth Blue Nile flows, eliminating flood losses, increasing hydropower generation, decreasing sediment load to the reservoirs and canals, and, most importantly, increasing water for summer irrigation in the Gezira Scheme and other irrigated areas along the Blue Nile".  To get a sense of the magnitude of this benefit, consider that flooding in 2020 caused over 100,000 homes to collapse and Sudan to declare a 3-month state of emergency.
  2. During droughts, it is expected that the existence of the GERD will cause "decreased water deficits to Egypt and increased water availability". 
It is also extremely important to note that, as the paper explains, these benefits to Egypt and Sudan do not depend on generosity and goodwill from Ethiopia. Keeping the flow steady by boosting it during droughts and throttling it during floods is also necessary from the self-interested electricity generating perspective of GERD, so it's a win-win-win proposition even without explicit cooperation.  In other words, long term incentives are aligned between Ethiopia, Sudan and Egypt, which should offer the strongest reassurance to back whatever political understanding is (hopefully) reached.


Filling

Now besides the long-term incentives, there is a separate question of what happens during the initial filling of the GERD reservoir, which started in 2020 and is expected to last 4 to 7 years. Filling the reservoir obviously must temporarily decrease the downstream flow. But here two facts should be understood. First, filling takes place in the rainy season (July and August) each year, where typically there is "too much" flow, so there should be no detrimental effect downstream.  Second, by chance, the first and second fillings took place during above average rainfall years 2020 and 2021. It's almost as if nature decided to be pro-GERD at this most critical time!
It's possible that the filling has already helped reduce the severity of floods in Sudan, although that effect may be limited by the fact that filling stopped as scheduled halfway through the rainy season (the Sudanese irrigation minister even complained that the filling didn't go fast enough to help).


Geopolitics

That is not to say Egypt and Sudan don't have any legitimate concerns. Future upstream uses of the Nile water could reduce their supply. The total water flow, while abundant, is currently almost 100% consumed: no Nile water actually reaches the Mediterranean Sea, except what's needed to push back salinity. So, even though GERD itself is a win-win-win,  in the bigger picture, the Nile water use is a zero sum game.  Currently, Egypt consumes 79%, Sudan 18%, and the rest of the countries combined less than 3%.

But there is international law and precedent on how to share rivers between multiple countries. The right way to deal with this case is the Nile Basin Initiative's Cooperative Framework Agreement  (CFA) which should be able to handle the issues of the next few decades at least. Uganda, Ethiopia,  Rwanda, Tanzania, Kenya, Burundi and South Sudan are on board. Sudan and Egypt initially joined, then "froze" their participation, but from what I gathered at the aforementioned seminar, Sudan has recently rejoined.  

The main problem is the recalcitrance of the Egyptian government. Given that their country consumes 79% of the Nile's water, perhaps they feel that acceptance of any upstream change jeopardizes this entitlement. The military government of Egypt has taken a hard line and it seems like they fear any compromise abroad might weaken their political power at home. This political trap has far reaching consequences for the region's stability and peace. Very unfortunate. Let's hope reason beats politics for once and things work out rationally, since GERD itself is actually beneficial to Egypt. 

Part 2 of this post explores the longer term sharing of the Nile beyond GERD.

P.S. This post is dedicated to my dear friend Ahmed Amr. A brilliant and hyper-informed Egyptian who during a conversation last year, was surprised by some of these technical facts.  Sadly Ahmed passed away from a long illness a few months ago. Ahmed, wherever you are, I hope you enjoy this post and I look forward to chatting with you again in the afterlife!

[1]Another way of getting economic impact is to multiply production by average price to get the direct value of the energy, and then apply a GDP "multiplier" which estimates the downstream GDP impact (electricity enables goods and services, which in turn enable other goods and services etc.) The problem as you can imagine is that multipliers are very inexact. In a tweet on this topic a couple of years ago, I used the a multiplier of 1.6 which I now realize is too low. I also incorrectly used peak power instead of average. Coincidentally the two inaccuracies cancelled out and the GDP estimate was about the same.

2022/06/03

The 4th wave of Bitcoin FUD

I just came across Why This Computer Scientist Says All Cryptocurrency Should “Die in a Fire”. I can't find any point in there that hasn't already been refuted many times. But it's relatively rare to find so many of them in one place, and it has been going around, so I thought I should make a little effort to rebut it. 

Security

Though not the most important aspect of the article, the "computer scientist" in the title is a not-too-subtle argument from authority, so it behooves us to take a look. The computer scientist in question is Nicholas Weaver, who I haven't heard of before, though from a brief look at his publications, I recognize some of his co-authors. It seems like his expertise is network security. So his most important contribution as an expert would be if he could find an actual technical security problem in Bitcoin. But of course he hasn't, in fact no one has successfully exploited Bitcoin. This is a rarely appreciated aspect of the network. Even though it's the world's largest honey pot, with literally several hundred billion dollars there for the taking, the entire codebase is open source, and all the data is on the public blockchain, no one has actually technically been able to "crack" Bitcoin. There is plenty of theft of Bitcoin of course, because people make mistakes with their keys etc. A scary bug was luckily fixed in the early days. Still no one has exploited the system itself. For any computer scientist, or anyone who has ever written software, this is very remarkable. As a network security expert,  you'd think Weaver would at least mention it. 

Maybe he has motivation for not saying anything positive? Indeed, apparently he's been declaring the death of Bitcoin so many times since 2013 that Weaver has earned a place in the Bitcoin Skeptic Hall of Fame.  It seems like he has dug himself into an anti-Bitcoin emotional trap which is hard to climb out of.

Bubbles

Credentialism aside, his actual criticism consists of economic arguments. He points to the price of Bitcoin in USD and "bubbles" where it rose from $10 to $100 then "crashed". Then to $1000 and crashed. Then to $20,000 and crashed. Then to $60,000 and crashed. And confidently asserts that there won't be a fifth bubble, that this time it's really dead.  But this only inadvertently points to the fact that he's been wrong so many times. Without any coherent explanation of why his previous predictions have failed, it's hard to believe him this time. A more honest view is to zoom out and look at it on a log scale, and notice that each "crash" bottoms out much higher than the previous one. So if one is going to reason purely from historical prices, then a reasonable observer would not confidently say that the last peak happens to be the final one before it goes to zero forever. That's like looking at a toddler learning how to walk and after the fourth time he falls down saying the kid will never walk. A more reasonable take is that if the Bitcoin price chart tells us anything, it's more likely the story of an emergent store of value.   Of course, chart analysis to predict future prices is generally a fool's errand, and even more so with this unique phenomenon. There are not many analogues in history -- we don't have exchange rates of gold from 2500 years ago. It's better to think about Bitcoin from first principles and think about long term adoption while avoiding short term price predictions.   

Adjacent crypto: altcoins, blockchains etc.

To make matters more confusing, most critics (and Weaver is no exception) put Bitcoin in a bucket with all the other cryptocurrencies, ICOs, NFTs etc. But almost all of the other stuff around "crypto" is junk, much of it unethical or even fraudulent.

Leaving aside the many outright frauds, the whole "altcoin" space reminds me a bit of the history of the Internet.  In the 1980s and 90s, TCP/IP had alternatives like ATM (Asynchronous Transfer Mode). A lot argued that the IP network wouldn't scale, or wouldn't offer good enough QoS, etc. They argued that the net would never be used for serious things like the phone network or television. It's true that there are various trade-offs in the design of TCP and IP, even some arbitrary choices. You can argue for different ones in hindsight. And things do evolve, albeit slowly. Witness IPv6 getting deployed in a backward compatible way over more than 2 decades, while IPv4 continues to chug along. Even ATM was absorbed as a short-lived layer 2 protocol under IP. But there's only one Internet. That's the so-called network effect. If the protocol is good enough, early enough, it becomes the standard.  

And that is where proponents and critics of "altcoins" are causing confusion and driving unjustified hostility to Bitcoin. Viewing Bitcoin as one of many "cryptocurrencies" masks a basic reality: Bitcoin is like the Internet of money and it is here to stay.

That said, I'm not against all other cryptocurrencies. For example a broader smart contract platform makes sense long term, and Ethereum may be the one for the ages. But there are significant technical hurdles remaining. And it's already so bloated very few people actually run a full Ethereum node. And that's all before the much delayed eth 2.0 migration, which if it succeeds may introduce a potentially fatal governance change called proof-of-stake. Building a "world computer" as it needs to be is much harder than what has been achieved to date. 

"Blockchain not Bitcoin" is another common theme among "crypto" hopefuls. But without a real reason for decentralization, a blockchain is just an expensive and slow database. Most of the envisioned applications for blockchains can be more easily achieved with traditional databases.

Bitcoin's proof-of-work ledger for sound commodity money is to date the only real world blockchain use case.

Energy and Proof-of-Work

Speaking of proof of work, energy use is the most common and dangerous vector of FUD against Bitcoin, and Weaver recycles the usual points. He claims that Bitcoin miners are "wasting tons of electricity". This topic is deep and generally misunderstood. Here's my attempt to distill it in my paper entitled "Dynamics of Bitcoin mining":

Does mining use too much energy?

This question assumes the system requires some amount of computation to be done and that it ”wants” to minimize the energy to achieve it. That is indeed how most systems work. But not Bitcoin. Proof-of-work does the reverse of that. The system ”wants” a certain value to be spent on energy, and the amount of computation adjusts to achieve it. Of course individual miners compete by being as efficient as possible, but the resulting collective behavior is to achieve a certain cost of energy with variable amounts of computation, not to perform a specific amount of computation with variable amounts of energy. 

This unusual combination – individual participants being efficiency-seeking but their collective behavior being efficiency-neutral – is very counter-intuitive and probably the root cause of much misguided hostility. It’s also worth emphasizing that the amount of energy doesn’t matter, only the cost. If the price of electricity relative to everything else in the world doubles, but nothing else changes, then Bitcoin would simply use half the amount of energy to achieve the same relative cost[...] The cost of energy is a feature not a bug, and ”waste” is impossible by design. All of the energy is ”work”. 

And where there’s no ”waste”, the question of energy use boils down to a moral judgement. Can you argue that heating in the winter, even if perfectly efficient, is not justified and people should move to warmer climates? What about air conditioning, or electric clothes dryers, or ice cream? When is any purposeful energy use justified? Morally, as long as access to and the price of energy is fair, what it’s used for should be accepted as a subjective choice. Bitcoin offers the possibility of inflation-resistant savings, low-cost long-distance value transfer, and censorship-resistant money. For its users, these are important benefits which are no less justified than most other uses of energy.

In the same interview, Weaver attacks the notion that Bitcoin "incentivizes green power", and goes on to misrepresent the incentives, and the supply and demand dynamics of electric power. I covered this too in the same paper:

Many sources of renewable energy are highly variable: solar and wind power depend on time of day and weather, hydroelectric power is seasonal, etc. In general, these ups and downs on the supply side do not line up perfectly with the demand for electricity. Further, even with the largest possible batteries, water reservoirs, etc., electric energy remains extremely difficult to store for later use at a large scale. Thus there is often a lot of ”stranded” energy when using renewable sources. Just like off-peak bandwidth in telecommunication networks, or empty seats on scheduled airline flights, the cost of production is already sunk, and so for the supplier, selling stranded power at any price is better than letting it go unused. [...] The competitive dynamics of Bitcoin mining are such that it shifts in time and space to the lowest available cost of electricity. This occurs not just by deploying hardware to various locations, but also by turning miners on or off instantly. This flexible demand-side support makes mining the ideal customer to balance variable supply, and as variability tends to affect renewable much more than fossil fuel sources, in effect, Bitcoin subsidizes the development of ”green” electricity.

Adoption

Finally, Weaver claims that Bitcoin will permanently fall apart Real Soon Now™, when it runs out of suckers. But there's really no basis for his claim. He doesn't give any reason why the number of suckers is a particular fraction of the world's population and why that limit has been reached now. Why didn't it run out after 1M people? Or 100M? Why not 8 billion people?  

Of course, the success of Bitcoin depends on widespread adoption. Why is gold used as money? You can try to explain it based on some key properties: it's impossible to synthesize, the supply is limited, it's fungible and can be shaped easily, it doesn't degrade... Those are useful, but we don't know if they are sufficient.  The emergence of a monetary good is a fascinating topic, one that most people don't understand and don't even realize that they don't know. ("The Origins of Money", an article which predates Bitcoin, is a good read). Ultimately, Bitcoin is just a Schelling point whose emergence is highly path dependent.That's just a fancy way of saying "we'll see", but every day that passes makes the ultimate success more likely, and it's been almost 5000 days already.

2018/09/01

Desire and scapegoating

A couple of years ago, I stumbled upon the thoughts of René Girard. It's a pretty rare occasion when something makes you really think about the most basic things in a new way. That tweet led me to reading a bit more about it (thanks Dan!).

People are driven by memetic desire. Beyond our objective needs, what drive us most is wanting what others want. To put it in game theory terms, my utility function is a function of the utility function of others. This most obviously explains things like fashion for example. But also, more deeply, the notion of status in society.

I want something because others want it. This is a self-reinforcing mechanism, and the object of desire can become scarce, so it creates occasional  instability, frenzies of desire, and ultimately violence. This is a fundamental process in all human societies.
 
The way societies deal with it is through scapegoating. As the frustrated desires get stronger and stronger and become unsustainable, societies create scapegoats: some individual or group which is blamed for the inability of the many to satisfy the memetic desire. The frustration of desire reaches a paroxysm of violence on the scapegoat. Scapegoating works as an auto-immune mechanism: by channeling the violence onto the scapegoat, and even institutionalizing it, society avoids self destruction. And societies that don't scapegoat fall apart into chaotic violence. Thus scapegoating is an evolutionary adaptation to memetic desire.

This sheds some light on the institutionalization of violence throughout history, whether it is Mayan human sacrifice or the politics of immigration.

2014/10/18

Random matrix and phase shifts

I just stumbled across this great article on Tracy-Widom distribution. It talks about random matrices and phase shifts.  This reminded me of some work I did on resource allocation in network interconnection. We derived routing matrix conditions for "peering" and "dis-peering" (the latter a new term) to be equilibria in the decentralized resource allocation game. I wonder what a probablisitic approach with the routing matrix randomized would add to the game theoretic results. Large scale self organizing interconnections (or failure thereof).

2014/08/22

Don't buy the second item on the menu

Yesterday a door to door salesman from Time Warner Cable came to our door. He was a nice guy so I listened to him even though I've been avoiding cable for a long time. Anyway here are the current options for Internet access from Time Warner Cable:
"If Internet is all you need, however, TWC offers its “Everyday Low Price” plan for just $15 per month. This includes 2 Mbps download speeds, 5 emails accounts and 100 MB of email storage. Need to go faster? Try Basic (3 Mbps and $30 per month) or Standard ($35 per month with 15 Mbps). If you’re an online gamer or download large files on a regular basis, the 20Mpbs of TWC’s Turbo plan ($45 per month) may be the best option, while home business users may want to try out the Extreme plan, which offers 30 Mbps download speeds at $55 per month. Finally, if you have a large family or Internet users or connect multiple devices on a daily basis, you may need the Ultimate plan, which provides download speeds of 50 Mbps, 30 email accounts and 10 gigabytes (GB) of email storage for $65 each month."
OK now consider the slope or marginal prices:
  • The first 2 Mbps costs $7.50 per. Fair enough. 
  • But then the next 1Mbps costs $15!
  • The next 12Mbps cost  just $0.42 per!!!
  • Then the next 5Mbps cost $2, 
  • And the following 10Mpbs are $1,
  • And then 20Mbps more at $0.50 each.
The first and the last three are totally reasonable. But notice the second item on the list is a horrifically bad deal.  Why does it exist, who in their right mind would pick that? It's like  a trap. Maybe some people will just ignore the Mbps amidst all the verbiage about storage and email etc (extras which really are insignificant in terms of cost) and think to themselves: "Hey, I'm not poor and "Everyday Low Price" that sounds like the plan for poor people.  And I don't understand the high end stuff, so let me get Basic, that sounds reasonable." And boom, they are paying an astronomical price. Even if not many people fall for it, it's very profitable.  It's also kind of unethical in my opinion. (This is not the first time I'm finding fault with Time Warner in these pages, and I don't even use them. )

A more innocent version of the same thing is wine lists at restaurants. Never order the second item! It's for suckers. To see why, imagine a naive and status-conscious customer who doesn't know much about wine: he will skip the first one to avoid looking cheap, but will hesitate to go to far down the list because they can't justify buying the expensive ones. So he will settle for the second one. The restaurateur willing to exploit this can profit by putting the cheapest wine at the second cheapest price.  Thus gouging the suckers without affecting others. The moral of the story is, even if you don't know about wine, you can still have a wine list strategy.

2011/06/11

Cognomics: what is the market price of your mind?

Last year, I came across a post about a very interesting study of CAPTCHA economics (in fact, this post is a slightly expanded re-post of an email I sent to a mailing list in Agust 2010).  CAPTCHAs are the little boxes you see on login pages across the web. They are meant to prevent software bots, run by spammers, crackers and other Internet bad guys, from pretending to be real users and abusing web services.
The key feature of a CAPTCHA is that it's a puzzle that is very easy for humans to solve but very hard for computers. So to defeat the CAPTCHAs, the bad guys have created online "farms", platforms where people are payed to solve the CAPTCHAs for them.

Leaving aside the nefarious nature of the application, it is fascinating to note that this is one of the first large scale instances of humans renting out their brains for a few seconds at a time. It raises the question: what is the market value of your mind? Or more precisely, of your ability to think? In a sense, of course, billions of people are renting out their brains every day by doing cognitive work in exchange for a salary. But normal employee/employer relationships are complex in ways that are not fully captured by price alone, in other words it's not a commodity. But with the CAPTCHA farm, you get as close as possible to cognition as a commodity.

Note that I said "one of the first" instances... There's another bigger one that's been around much longer: advertising. When advertisers pay for ad placement, they are paying for your attention, so in a sense they are renting your mind. Particularly with Internet advertising, the advertiser literally buys a few seconds of a person's attention, one person at a time. This was a big meme during the dot-com era, the "attention economy".

So, if indeed there's a market for cognition, how do the prices compare across these two sub-markets?
  • Spammers* pay O($1) per thousand CAPTCHAs solved.
  • Advertisers pay O($1) per thousand impressions
First observation: In both cases, they are paying to get your mind for O(10seconds). So the mind is really a commodity worth the same whether you are renting it out to store and propagate a commercial message or to do some computation!

Second, if you draw a little diagram of the flow of value, the cognitive supply chain as it were, the two are like mirror images of each other, with the same values circulating in opposite directions. Like electrons and anti-electrons in the same circuit! Here's what we get clockwise for the advertising business:

Advertiser → $1 → Publisher → (payload) → User → (profit from product) → Advertiser

And here's what we get, anti-clockwise for the web-spam business:

Spammer ← (profit from scam) ← Publisher ← (payload) ← User ← ($1) ← Spammer

Funny stuff. Spammers are like the anti-matter to the matter of advertisers, the evil twin from the underworld.   Fortunately, they are not quite symmetric in size. It's a lot harder for the bad guys to grow the same size as legal ads/content ecosystem!

Note: of course, the main difference between the minds rented for ads and the minds rented for solving CAPTCHAs is wealth... Rich people's minds are valuable to advertisers,  poor people's minds are useful to spammers. But despite this split along wealth lines, the prices are of the same order of magnitude.


2011/02/19

Rent splitting mechanism

I just came across this blog post on "How to split the rent?". Most people split the rent equally between apartment mates. The problem is that not all rooms are equal. How do you value their differences in size, light, accessibility. How do you value the shared areas? Further, different people have different preferences. So it's an interesting problem... so how do you find a fair price and allocation of rooms?

It reminded me of a solution my roommates and I came up with many years ago. It's basically an auction. Say there are 4 apartment mates, 4 bedrooms, and the total rent is $1000. Each roommate writes a bid with prices for each room, with the condition that the total has to be $1000. So the bids might look like
- person 1: ($200, $250, $250, $300)
- person 2: ($100, $250, $300, $350)
- person 3: ($250, $250, $250, $250)
- person 4: ($150, $200, $250, $400)

Then you gather all the bids and you assign each room to the person who has the highest value for it and they pay the average price of that room in all bids. You start with the highest priced room and go down (so that if a person wins two rooms you give them the one with the higher price). If you have a tie for first place on two different rooms with the same two people, you flip a coin. In the above case, no coin flip needed, the solution is:
- room 1 goes to person 3, for a rent of (200+100+250+150)/4 = $175
- room 2 goes to person 1 for $237.50
- room 3 goes to person 2 for a price of $262.50
- room 4 goes to person 4 for a price of $325

The beauty is that the solution guarantees that each room goes to the person who values it the most, and the room prices add up to the correct total rent.

We did it for one year with a 4 bedroom apartment with 4 co-tenants. The biggest room went for about 31% of the total rent, and two rooms of smaller size but with the most light went for 25%, 24% and the dining room converted into a bedroom went for 20%. The second year we were down to three tenants and for a variety of reasons, we did a direct adjustment rather than rerun the auction...

But the moral of the story is that mechanism design works in every day life! Surprisingly not many people do this.

2006/07/28

wikipedia

I just read an article about wikipedia (New Yorker magazine, July 31, 2006. Alongside the usual praise, it captures some pretty good criticisms:

"Wikipedia has gone from a nearly perfect anarchy to an anarchy with gang rules."

"...infested with moonbats."

"...the open-source model is simply inapplicatible to an encyclopedia. For Software, there is an objective standar: either it works or it doesn't. There is no such test for truth."


Hmmmmm. Aren't we forgetting that other pillar of epistomiological virtue? Popper would say there's natural selection, the market, and ... voting.

So why not add voting to Wikipedia? Like Digg, each article would be voted on by users, and therefore have a score. Each reader would get a binary vote, thumbs up (+1) or thumbs down (-1). Uniqueness of votes can be easily enforced by IP address for each article. The article's score is then simply the sum of all the votes (+1 and -1). This score would of course help the reader adopt the appropriate degree of scepticism.

But the score could also be used in a derivative way. One of the problems on Wikipedia is situations where two contributors get into a big battle if repeteadly deleting the other's changes because say the article is on a controversial topic, or simply because whoever is wrong is stubborn or fanatical... Well each contributor could have a an editor rank based on the value they have added to articles they haved edited in the past (which would be something like the average change in score of the articles before and after their edits), and presto, in a dispute, the person with the higher rank, which should the one proven more reliable over time, wins! Truth wins, and Wikipedia lives happily ever after....

Seems simple enough... Why not? Imagime Ebay without the seller rankings... Yaiks.