Saturday, October 29, 2011

Hints for Gaming Math Problem 18

ROT13 to read:

18A. Qba'g sbetrg gung pbfgf pna or artngvir.

18B. Fcyvg rnpu abqr vagb gjb.

18C. Guvf zvtug vaibyir nqqvat fbzr nqqvgvbany abqrf.

Gaming Math - Problem 18

Problem 18: Rating Trading

Consider the following problem, which we will refer to as the Math Trade Problem:

Consider a set of N players, each of which has one game that they want to trade. Assume that each player has a different game. Each person also has a list of games that he wants (You may assume that nobody lists a game they already have as a game they "want".) The goal is to determine how to distribute the games between players such that the number of trades (i.e. the number of people that end up with a game they want) is maximized subject to the constraint that everyone ends up with exactly one game, and each person ends up with either a game he wants or he keeps the game he already has.

The minimum-cost network flow problem with node capacities is as follows:

Consider a graph G with a set of vertices V (also known as "nodes") and (directed) edges E between these vertices. Each edge has a maximum capacity, which states how many units of flow can be sent along that edge, and a "cost", which gives the cost of sending each unit of flow along that edge. The goal is to find a way of sending flow such that the amount of flow going into each node is the same as the amount of flow going out, and the total cost of all the flow sent is minimized. Additionally, nodes may have "node capacities" which give the maximum amount of flow that can flow through that node. (In some versions of the network flow problem, there can be "source" nodes or "sink" nodes for which the amount of flow going in need not be the same as the amount going out, but these will not be necessary for our purposes.)

---

Problem 18A. Given an instance of the Math Trade Problem, show how to transform it into an instance of the Minimum-Cost Network Flow Problem with Node Capacities, such that a solution to the network flow problem will give a solution to the given Math Trade Problem.

Problem 18B. Given an instance of the Minimum-Cost Network Flow Problem with Node Capacities, show how to transform it into an instance of the Minimum-Cost Network Flow problem without node capacities. (There are several well-known algorithms that can be used to solve this problem.)

Problem 18C. Consider the following generalization of the problem. Suppose that each player owns multiple games, and we want to maximize the number of trades (i.e. total number of games that people want that they get) subject to the constraint that each player ends up with the same number of games he or she started out with, and each of those games is either one he already had or one that he wants. However, we also add the complication that several players may want to trade the same game, and nobody wants to end up with two or more copies of the same game.

I will put some hints up later tonight and I will put the solution up tomorrow.

Tuesday, October 25, 2011

More Gaming Math Problems Coming Soon!

As you probably have noticed, I haven't posted up many Gaming Math problems in a while though. However, that will soon change. Today at board game night I learned about a new big thing in board game related commerce called "Math Trades." These "Math Trades" are generally run on the web site Board Game Geek and the way they work is everyone posts what games they want and what games they want to trade. Then a computer program uses a mathematical algorithm to figure out how to maximize the number of beneficial trades, which often involves "trade circles" - i.e. if person A has a game that person B wants, person B has a game that person C wants, and person C has a game that person A wants, they can they can trade in a circle. Obviously there are a lot of interesting math problems in here, but I haven't posted any up today because I will have to think about the problem some more in order to figure out what the right way to formulate the problem is. (Of course, I could just read the web site for the software that explains how it works, but where's the fun in that?)

Sunday, October 23, 2011

Shipping Jobs Overseas?

One of the members of our local Belegarth group, John Degraffenreid, is running for Congress as an independent candidate. One of the planks of his platform (direct link won't work; click on "Platform" then "Trade") is that it is "time to hold corporations accountable for moving jobs overseas" and that American corporations should be required to pay overseas workers a "fair wage" to protect other countries from being "taken advantage of" and to eliminate the advantage of "moving jobs overseas."

Of course, most economists would say that most "moving jobs overseas" is actually a net benefit because each country can specialize in what it produces best, thus improving overall output - i.e., if a company saves money by "moving jobs overseas" and importing products rather than producing them in the U.S., that just creates jobs for the people in the U.S. that produce exports to exchange for the imports, and this analysis is not affected by whether the reduced costs are caused by the overseas workers being "taken advantage of". Of course, this argument has been discussed to death, and I don't really have anything new or interesting to say about it.

What I find more interesting is the implied moral claim that there is something blameworthy about a corporation "moving jobs overseas", such that the corporation needs to be held "accountable" for it. (Of course, I'm not picking on Degraffenreid here; lots of the public and politicians seem to have similar view, which is part of why I find this interesting.) Consider the following two cases:

A. Acme Corporation currently employs 100 American workers. It has an opportunity to expand into a new market and hire 50 more American workers, but instead decides to stay its current size.

B. Acme Corporation currently employs 100 American workers. It has an opportunity to expand into a new market and hire 50 more American workers, but instead it builds a factory in Pakistan and hires 200 Pakistani workers instead because it is cheaper.

I doubt very many people would say that in case (A) Acme Corporation did anything blameworthy, but in case (B) they would say that Acme Corporation was "shipping jobs overseas." But in either case, the change in number of American workers was exactly the same - zero. What principle could justify the difference? You can't just say that corporations have a responsibility to hire as many American workers as possible, because that would make (A) as blameworthy as (B). One possibility is to say that corporations have a responsibility NOT to hire foreign workers, but that seems hard to justify. Why is giving an American worker a job good but giving a Pakistani worker a job bad? I can understand why Americans value other Americans more than they do Pakistanis, but I don't understand why people would put a negative value on Pakistani jobs.

One possibility is that people think that Pakistani workers aren't actually being helped by the new jobs. But that doesn't make sense, because if the new jobs were really inferior to whatever they would be doing in the absence of the new jobs, then why would anyone take the new jobs? Another possibility is that people think that corporations have a responsibility to hire foreign workers AND pay them well, so that their lot would be improved by even more than before. But that doesn't explain attitudes like Degraffenreid's, since he says (probably correctly) that making American firms pay foreign workers more will induce them to hire fewer foreign workers. (Unless the idea is that it is better to help a few foreign workers a lot than to help a lot of foreign workers a little each.)

Possibly a better explanation might be to go back to the principle that "American companies have an obligation to hire as many American workers as possible", and explain the reluctance of people to assign blame in case (A) a different way. One possible explanation would be that my premise (that people don't assign blame in cases like A) is false. After all, people do sometimes consider companies blameworthy when they lay off workers, and Barack Obama did exhort companies to start investing and spending more if they had the money to do it. Another explanation might be that people think that (A) is theoretically blameworthy, it's just that "not expanding as much as you can" is much less visible than "opening up factories in foreign countries".

Here is another question: let's say that reforms designed to "bring jobs home" were implemented, and because of that, corporations pulled their investments out of Pakistan and brought them "back home" to the United States. In that situation, would Pakistanis be right to complain that the corporations are "sending jobs overseas" back to the United States? If so, then why does a corporation that operates in both the U.S. and Pakistan have greater obligations to American workers than to Pakistani workers? If not, then what is the relevant distinction?

Finally, consider the following third case:

(C) Acme Corporation currently employs 100 American workers. It sees room to expand and hire 50 more American workers. Instead, it buys more machinery to make each worker more productive, so that it doesn't need to hire any new workers.

I think most people would think there's nothing wrong with (C); or at least much less wrong with (C) than with (B). Sometimes people do lament the fact that technology puts people out of work, but certainly I have never heard any politician saying that we have to slow down progress on labor-saving technology in order to preserve jobs. But in both cases (B) and (C) you are choosing an option that allows you to hire fewer American workers in order to reduce costs. So a general principle that "it's wrong to hire fewer workers just so you can reduce costs" is not the driving force here.

A possibility is that there is some sort of (implicit) cost-benefit analysis going on. That is, people think that reducing costs is a legitimate benefit, but that it has to be balanced against the (perceived) costs of putting people out of work. With labor-saving technology, it's really obvious that the benefits are enormous: if we had never developed any labor-saving technology whatsoever, we would still be hunter-gatherers living in caves. But with international trade, the benefits are a lot less obvious, so it is easier for people to think that the costs exceed the benefits.

Of course, a lot of this is just speculation, and I don't know what the right answer is. I found an interesting web site called "Experimental Philosophy" that discusses research where they do surveys to ask people these types of questions in order to understand how people actually form judgements about these questions (like what makes someone morally responsible for something, or when it makes sense to say that someone "intended" for something to happen.) Reading that web site is part of what gave me the idea to think about this issue in this way, although I don't see any posts on that web site that discuss political/economic questions like this one. Also see here for a related discussion about "moving overseas" and moral responsibility (although I think that discusses a slightly different issue).

Wednesday, September 21, 2011

Saving Green By Going Green, Followup

Today, I sent the following letter to my congressman Cory Gardner:

I am writing to urge you to vote against the TRAIN Act, which will delay implementation of key environmental protections that could save thousands of lives. While proponents of the TRAIN Act claim that they are interested in ensuring that the benefits of regulation exceed the economic costs, their actual actions clearly show that this is not what they are concerned about. First of all, the EPA already does cost-benefit analyses of its regulations. If TRAIN Act proponents believe these analyses are flawed, why wouldn't they just fix them, rather than wasting time starting all over? Second, the latest version of the TRAIN Act explicitly blocks the Cross-State Air Pollution Rule and Mercury and Air Toxics standards. If proponents were really interested in making an honest inquiry as to the costs and benefits, why would they write into the bill what conclusions they want before even doing the analysis? Finally, the pro-pollution lobby's own words prove their dishonesty. The American Coalition for Clean Coal Electricity, a key pro-polluter lobbying group, on the front page of its website (www.americaspower.org) states that proposed EPA regulations would "eliminate more than a million American jobs". However, if you click through to their own analysis you will find that is not true - they actually claim it will eliminate 1.4 million "job-years", totaled over an 8-year period, which is not the same thing. If the pro-polluter lobby can't even get basic facts straight, why should we believe anything they say?

I'm not too hopeful as to what Gardner will think about this issue, given that he is a staunch conservative and as far as I can tell from his votes, has hasn't voted on the pro-environment side on any recent bills. I don't see anything on his web site where he supports "protecting the environment." However, one of the proposals he supports, the Business Cycle Balanced Budget Amendment, says it will "force government to budget itself in a countercyclical manner", which actually makes economic sense. However, the actual proposal says that the budget limit for each year is an (inflation-adjusted) average of revenues for the past three years, and I don't think that's what "countercyclical" means.

Tuesday, September 20, 2011

Saving Green by Going Green ... Or Is It?

Today, I received an email from the Environmental Defense Fund urging me to protect clean air by calling my congressman and urging him to vote against the TRAIN Act, a law that will create an independent committee do do cost-benefit analyses of new EPA regulations before implementation. Opponents of the bill argue that it is unnecessary because the EPA already does cost-benefit analyses of its regulations and the new law would just duplicate that effort and delay implementation of the regulations. On the other hand, proponents say that the EPA analyses may be biased (after all, they're not exactly a disinterested party) and that an independent analysis is necessary to make it unbiased. (Actually, the latest version of the act does a lot more than just call for cost-benefit analyses; it also explicitly blocks certain regulations, see here.)

What I was interested in is just what, in particular, proponents believed the flaws of the EPA studies were. The American Association for Clean Coal Electricity, (ACCCE), a power-company lobbying group, has a web page that discusses the issue from their point of view. They identify two perceived flaws: first, that the EPA considers only one proposed rule at a time and does not lump multiple proposed rules together in its analysis; and second, that the EPA does not consider other negative economic effects such as lost jobs. (Note that on the association's front page, they claim that the regulations the TRAIN Act will block will cost 1.4 million jobs. However, on the actual page that discusses the TRAIN Act, they say it will cost 1.4 million job-years, totalled over an 8-year period. These are very different.)

Anyway, the first criticism does not, at first, seem to make any sense. If regulation A has costs which exceed benefits, and regulation B has costs which exceed benefits, then added together, regulations A and B will collectively have costs which exceed benefits. The only way this will not be true is if either:

(a) The benefits of implementing both regulations A and B are less than the benefits of implementing A alone plus the benefits of implementing B alone.

(b) The costs of implementing both regulations A and B are greater than the costs of implementing A alone plus the costs of implementing B alone.

This, of course, raises the question of in what circumstances these can be true. For case (a), I can think of a simple example: suppose that both regulations will reduce exposure to the same pollutant, and the pollutant has a hormetic dose-response relationship. But for some reason I don't think that's the case that the ACCCE is thinking about. For case (b), I can think of a different case, that seems to be the case that the ACCCE is discussing. Suppose that both regulations reduce the production of electricity, and electricity (like most goods) has diminishing marginal value. Then just looking at each regulation individually, and estimating the cost by multiplying the current price by the amount of reduction (let's say), will understate the total costs. In the diagram below, the true cost is C+D but the "looking at each regulation individually) approach will give you something closer to C.
We can now estimate about how big this difference is. For the sake of argument, I will use the assumptions that are most favorable to the ACCCE's position. They mention that there will be a total reduction in coal power production of 30 to 100 gigawatts (GW) due to "these and other rules". 100 GW is equivalent to 876,000,000 MWh over the course of a year, or about 25 percent of the total U.S. electricity consumption 3,741,485,000 MWh per year. Of course this is not a good estimate of total electricity consumption lost because some of the capacity lost in coal gets replaced by other energy sources. If I am interpreting the chart labeled "2016 CATR+MACT impacts" of their own report correctly (it's on page 6 of the PDF, or page 5 going by the page numbers on the page), it looks like about 60 percent of capacity lost in coal gets made up in increased natural gas. So you end up with a total of about 10 percent reduced consumption. According to the review here, the short-run price elasticity of demand for electricity is about 0.2. So 10 percent reduced consumption corresponds to about a 50 percent increase in price. That means that the triangular area D is about 25 percent of the area C.

However, my understanding (at least based on what it says here) is that for most of these regulations the benefits exceed the costs by at least several times. So just a 25 percent error won't make a significant difference.

----

The comment about jobs, however, is more interesting conceptually, and I think they have it backwards. Here's how I am thinking about it. Let's say that electricity and labor are perfect complements, so a business can produce a "widget" by using one worker and one unit of electricity. Suppose that currently the business is producing X widgets, and so it is using X units of electricity, and the new regulation will increase the price by Y. Suppose you ignore the issue of jobs. Presumably that means you assume that the business will just produce the same number of widgets as before. Then the total cost is X times Y. But suppose you take jobs into account, and you take into account the fact that now the business will produce fewer widgets because the cost of producing them went up. But if they made this change, then that means the change was beneficial (compared to just absorbing the extra cost). In other words, the "reduction in jobs" is partially a benefit because it means that you are now using less of the more expensive electricity.

-------------------------------

Of course, conservatives aren't the only ones who often use faulty economic reasoning when talking about environmental issues. During the 2008 presidential campaign, Barack Obama claimed that oil companies had 68 million acres of land they were "not using" and that we needed to make them "use it or lose it." Most importantly, this claim was false: most of the 67 million acres of "non-producing land" was actively being explored and prepared, it's just that no oil was coming out of it yet. But even if it was true that oil companies were deliberately ignoring large portions of their land, why is that necessarily a problem? There are only two reasons I can think of as to why they would do that. One reason is because they think that oil will become more expensive in the future and they would rather wait and sell the oil when it's more expensive rather than extract and sell the oil now. But if that's the case, then the oil companies' actions would raise the price now (when it's cheaper) and lower the price when they get around to extracting it (when it's more expensive), thus reducing the volatility of oil prices over time. Isn't that a good thing; to save it for when it's scarcer? Another possible reason is if they are colluding to reduce supply in order to raise the price now. But that theory doesn't seem to hold water because oil is traded on a world market, and the vast majority of world oil and gas reserves are controlled by companies outside the United States, so it doesn't seem like U.S. oil companies could reduce the world supply that much just by drilling a bit less. And in any case, if the problem is that we are using too much oil, isn't it good if the oil price goes up because that means that people will have an incentive to switch to renewable sources?

Saturday, September 10, 2011

Mini News Quiz

President Obama's proposed new "American Jobs Act" prohibits employers from discriminating against job applicants who are...

(a) politically active
(b) environmentally conscious
(c) recently divorced
(d) currently unemployed