Archive for the ‘maths’ Category

The mission of government

Tuesday, February 23rd, 2016

National governments are some of the most powerful entities in the world today. But what are their missions (or what should they be)? What are they optimizing for? Democratic governments at least are supposed to represent the interests of the voting public, but this just means that the voters get to choose between one of several parties, each of which have their own mission.

The mission of parties on the right of the political spectrum seems to be maximization of GDP (or GDP per capita). On the left, things are a bit more complicated. The labour party's ideology is roughly social democracy, but what does that actually mean? Bouncing around on Wikipedia for a bit suggests that this ideology promotes social justice, of which the key tenet seems to be reducing inequality. So if we simplify the right down to "GDP maximization" then the corresponding simplification on the left is "equality maximization". Obviously these are gross caricatures of infinitely more nuanced policy sets, but bear with me.

Suppose we are considering two independent policy changes, A and B. Change A makes the poorest person in the country poorer by £1 and makes the richest person in the country richer by £2 (a net GDP increase of £1). Change B makes the poorest person in the country richer by £1 and makes the richest person in the country richer by £2 (a net GDP increase of £3). Both of these changes increase inequality. All else being equal, it seems that conservative policy would be to support both changes (since they both increase GDP) and labour policy would be to reject both (since they both increase inequality). I think that change A is bad and change B is good, and I think a lot of people feel the same way. I would prefer maximizing a metric which is increased by change B but decreased by change A.

What's an example of such a metric? Well, one example would be "how rich is the poorest person in the country?" It seems like quite a dumb metric at first - how can you judge the performance of a entire country on the outcome for a single person? But the more I've thought about it, the more sense it seems to make. The poorest are almost by definition those who need the most effort expended to help them. It doesn't take very much money to stop that person being the poorest, at which point you switch to the new poorest person. Then you need to raise up the poorest two people to the level of the initially third-poorest and so on.

Where do you get the money to help these poor people? Well, you can take it from the rich - the "poorest person" metric doesn't care about them one way or another to a first approximation (and rightly so - the rich don't need help from the government, they can help themselves). Now, the logical extrapolation of that is that we should take all the money and redistribute it evenly - give everybody N/M where N is the total amount of wealth and M is the number of people. That is a way to make a society that is extremely egalitarian but utterly impoverished. Without any inequality at all, there is practically no incentive for people to work hard to create wealth (if you did you'd only get an infinitesimal 1/M of it). Whenever this kind of thing has been tried in the past, that is the result.

So distributing all the money evenly does not maximize the wealth of the poorest - we can improve things for them even more by allowing some inequality and redistributing some of the wealth (but leaving enough to create incentives). So applying this metric does enforce some compromise between the capitalist and socialist sides.

As written above, the anti-poverty metric is very underspecified. Over what timescale should you maximize the wealth of the poorest? If you choose a very short timescale then that implies that you should just redistribute all the wealth evenly very soon (which is very bad in the longer term) and if you choose a very long timescale then that implies that you should aim to maximize GDP and then redistribute all the wealth evenly at some very far off point in the future (which doesn't actually do anything to help people that are hungry now). Perhaps the difference between left and right politics is that they really want the same things, but just disagree on the timescales that should be involved. As for me, I suspect the ideal timescale would be something between that of a typical political term and that of a typical human lifespan, but the exact length may depend on the specific policy under consideration.

There's more that governments do more than just the redistribution of wealth (or lack thereof). How can the other functions that we'd like governments to do be justified under this metric? Well, we can do so by taking proper care about how "wealth" and "poorest" are defined. There's more to wealth than just money. Somebody who is in need of medical treatment is (all else being equal) "poorer" than somebody who isn't, so governments should provide healthcare. Somebody who is a victim of crime (or who is living in fear of becoming one due to crime going unsolved) is also impoverished. Even a certain amount of military expenditure can be justified on the grounds that getting invaded by another country would be impoverishing. The more things we include in our definition of "wealth", the more government intervention is justified by the metric.

On positive and negative reputation

Sunday, February 21st, 2016

A nice feature of most places on the internet is that people can easily create a new identity (you might have to solve a captcha but that's about it). This wouldn't work so well in real life as it does on the internet - in real life if someone commits a crime they need to be held accountable for that, so it's important that we each have a real life identity that we can't just replace. Similarly, social safety-net programs need to ensure that any given person does not collect more money than they are entitled to, so they also need to use real-life identities.

Social media websites should not need to know peoples' real-life identities. But if identities can be discarded and replaced, how can we deal with the online equivalent of crimes (i.e. spam, abuse and malware)? I think the answer is just to ignore them with extreme prejudice. To decide if some message (whether it's an email, an RSS feed item, a link from an aggregator or whatever) is worth reading, we should ideally be able to look at the reputation of its originator. Completely new identities, not vouched-for by any identity with actual positive reputation would have no reputation and the messages they send should be consigned to the deepest levels of the spam filter.

Unlike in real life, there's no point in internet identities having negative reputation overall - if one did, the owner of that identity would have nothing to lose by abandoning it and spinning up a new clean one. Blacklists won't work, we'll have to use whitelists.

If you somehow grew up under a rock or something and were new to the internet, how could you build up reputation if nobody's reading your messages? Well, presumably you know some people in real life, and some of those may have some internet reputation. Contact them (offline if need be) and get them to vouch for you until you have enough reputation that strangers can read your messages.

Reputation scores should be subjective, not a single global score. So user A may have a different idea than user B about what user C's reputation is. The centralization of a global score would cause problems, and could be gamed (earning reputation from people who give it away easily and spending it where it more lucrative). My value of a reputation score for user C should be a influenced by whether I have liked their posts, and by the reputation scores for user C according to other people who who have high reputation scores according to me. It's sort of like Google's PageRank algorithm but for users instead of websites.

Abusive messages are mostly anonymous and would therefore generally have an extremely low reputation score. Otherwise, they would stand to quickly lose whatever reputation they had. So abuse is solved the same way as spam (and ends up in the same bucket).

Credit reporting agencies like Experian and Equifax keep reputation scores on our real life identities for non-crime purposes, like determining if it would be wise to lend us money. I sometimes think it would be a good idea if those companies were not allowed to use our real-life identities, so that "bad credit" could be escaped just by creating a new "credit identity". Then nobody would ever lend more money to someone than they had spent building up their credit reputation. The current system allows "no credit" young people to build up huge unsecured debts which they are then shackled with for an extremely long time. Student loan debts in the US cannot be discharged in bankruptcy, on the theory that the benefits obtained by attending college can't be given up, but this system can have some devastating consequences for those who ended up paying more for their degrees than those degrees were worth.

Cost of housing

Saturday, February 20th, 2016

The high cost of housing is a big problem for a lot of people. Younger adults in particular often can't afford to own their own homes like their parents did, despite earning similar wages corrected for (non-housing) inflation. Many of those who do own have huge mortgages that will take the majority of their careers to pay off, and face having to move should they suffer a significant drop in income. Many of those who can't own are priced out of the cities and regions they'd prefer to live in by spiraling rents and may face long commutes to work in those places.

What could be done about this? Well, one idea that keeps bouncing around my head is eliminating a situation which is quite rare and very unfortunate when it does occur - the foreclosure. If mortgage lenders lose the ability to take away the homes of borrowers who stop paying their mortgages, they'll stop lending people money to buy homes. This wouldn't be like a medieval anti-usury law - people would still be able to borrow and lend money with interest, it's just that people would no longer be able to secure those loans with their homes (because they need those homes for living in).

Wait a minute, though, doesn't that sound like it would make homes less affordable rather than more? Well, perhaps at first. But why are house prices so high in the first place? They're as high as there are because that's what people are prepared to pay. And they're only able to pay that much for houses because that's what lenders will lend them. So, in the presence of mortgage lenders (and absent any other restrictions) house prices will trend upwards until the cost of servicing a mortgage is equal to all the money that can be earned by the people living in that house minus what it costs them to live (food and utility bills). Rents will rise similarly, as otherwise it would make more sense for those who would buy property to rent to instead buy mortgage notes.

If this were to come to pass, what would the consequences be? Who would be the winners and who would be the losers? Well, anyone who owns their home or a rental property free and clear (or who owes less on their mortgage than the value of the property would decrease by) would suffer sudden drop in overall wealth, as would anyone who has invested in mortgage notes. However, most property owners with an income would suddenly find that a lot more of it would be disposable (no point making any more mortgage payments!) so there would be a massive influx of cash into the economy. Pretty much everyone but the aforementioned owners and investors would be better off. In other words, it would be a massive redistribution of wealth from the rich to the poor.

What about those who do not own their own property but instead rent? Most such people probably don't have large amounts of savings, so wouldn't be able to buy a house outright even at the new lower prices (if they could they would probably have enough for a mortgage down-payment under the current rules). So they will have to continue to rent. Since there's no money in mortgage notes anymore, buying rental properties becomes a relatively more lucrative investment. So those with the money to do so buy up all the (newly cheap) properties for rental. This (combined with the lack of mortgages), prices would-be homeowners out of the market again and forcing them to continue renting. New builds become less lucrative (since they can't be sold for as much) so the supply of housing goes down, which drives up rents to the limits of what the market can bear. So while getting rid of mortgages would help most current homeowners, everyone else would be screwed in the slightly longer term. Our little "tweak" has actually had the opposite of the desired effect! Not only is housing as expensive as ever, even more people are renting instead of owning.

We can fix this with another small adjustment to the rules - instead of just getting rid of foreclosures, get rid of evictions altogether. Everyone who is renting their home becomes the de-facto owner of that property. Sorry to the rental property owners, you're screwed right along with the mortgage note owners.

How would this work in practice? You can't evict someone from their home, but how do you define what "home" is for the purpose of this law? What if someone has multiple houses? I think my preferred implementation would probably be something like this: each person would be permitted to enter into a particular database a single address, which is the place that they are not allowed to be evicted from (their home address). People who don't like being in government databases don't have to be in this one, but would lose the benefit of having a home that they can't be evicted from. At the point of implementation of the law, you must have some claim on an address (i.e. ownership, rental agreement, or be a dependent of someone with an ownership or rental agreement, or have some reasonable evidence of occupancy) in order to make it your home. There would probably have to be quite a bit of wrangling and untangling to determine who should really have the right to live where. However, once the implementation is complete things become much simpler. From that point on, you'd only be permitted to change your home address to a new one with the permission (by power of attorney if necessary) of all living people who also claim that new address as home. This means that an inhabitable property that doesn't have anybody claiming it as their home could be claimed by anyone - a sort of "squatter's right" for this new regime.

Buying and selling property would be fine, as would any other contracts involving a change of home, with the limitation that at every point in the execution of a contract, every person has a home. So a new rental agreement or mortgage agreement would not be possible because there is a point in the execution of those contracts (i.e. non-payment of rent or mortgage) in which someone ends up without a home. Now in this form there is something very similar to a mortgage contract, namely "if you don't pay your mortgage, you have to change your home to this hovel in the middle of nowhere". It's a de facto eviction if not a de jure one. So, I think contracts involving home changes would have to not extend over time - they would have to specify a single point in time at which point all the home changes happen, and a home for every person involved afterwards. If one of those addresses turns out not to exist, then the entire contract would be void and everything would have to be put back the way it was at the start. If a contract did extend over time, the "hovel in the middle of nowhere" might turn out not to exist, and if too much time has passed then restoring the conditions at the start of the contract may also be impossible.

So in this world the concept of a chain becomes more important when buying and selling property. Every non-circular chain must begin with the splitting of a household or the destruction of an address, and end with the joining of households into a single address or the construction of a new address. "Construction" and "destruction" here do not necessarily mean physical housebuilding and demolition - it could be doing up a previously uninhabitable property or a previously habitable property falling into disrepair - both with the consequent changes to the "home" database.

The existence of "uninhabitable" property not listed in the "home" database presents a potential problem - a "shadow economy" of people living in "uninhabitable" properties with mortgages or rental agreements and all the accompanying baggage, with their "home" addresses (if any) pointing at some undesirable location. Perhaps this could be solved by forbidding people from living in addresses not in the "home" database and/or forcing property that is found to actually be inhabitable into the database. Forcing real estate to be in a database seems less onerous than forcing people who don't want to be in a database to be in one, but people not in the database may find it difficult to find housing if non-database housing is off limits. They'd have to live with somebody who is in the database.

Sometimes houses burn down, or the people living in them have a baby that there isn't room for, or a housemate turns out to be abusive, or any one of many other circumstances in which the supply of housing is insufficient for the people needing it. For these circumstances I think a basic minimum standard of social housing would be a necessary fallback when there's nowhere else to go. As a general rule people would not be expected to live in this high-density, no-frills accommodation indefinitely - it's just a stopgap measure until they can accumulate enough cash to buy their own property. It needs to be sufficient so that people living there can hold down a job (good night's sleep, sufficient facilities to remain clean and fed, no worrying about security) but doesn't need to be fancier than that.

A little care would need to be taken in the areas of hotel rooms, holiday lets and other short-term accommodation. Perhaps these things can be handled by saying something like "if someone stays somewhere for more than 183 nights in a given calendar year, that place is deemed inhabitable and can be claimed as home by that person", but we'd still need some way to allow people to go on holiday without making it possible for property owners to exploit the poor by making them rent and move every 4 months. There are other rough edges as well (what about people moving internationally?) but I'm confident these could be solved.

This all seems so sensible to me. It's too bad there's no apparent way to get from the grossly unjust system we have at the moment to this one - there are just too many powerful people who would stand to lose so much money that they would do everything they could to oppose it.

Nobody at the controls

Thursday, February 18th, 2016

Several very smart people are worried about artificial intelligences becoming smarter than people, taking over the world, and not necessarily having our best interests at heart. A specific concern is that some form of paperclip maximizer might optimize the world for something that is harmful to us if the optimization in question is taken too far.

I once tried to explain this to my grandma, who replied "if a computer is taking over the world, why can't you just unplug it?" A very sensible plan, if the computer in question isn't already running a lot of critical functions, without which people would die and society would devolve into chaos (and if it doesn't have batteries). Obviously we'd need to put a stop to something like that before it got started.

Except we can't - it's already too late. We already have a "paperclip maximizer" running the world. It's not optimizing for paperclips, though - it's optimizing for profit: GDP (on the level of nations), shareholder value (on the level or public companies) and personal income (on the level of individuals, especially those with bills to pay). No artificial intelligence is required - the "machine" uses the intelligence of the people that comprise it to do its thinking. But all of those people answer to someone else - employees answer to their managers, CEOs answer to their customers (usually) or investors, most investors are just trying to get the best returns so that they can retire as quickly and comfortably as possible, and consumers are just looking for the best performance/price ratios. Elected representatives answer to voters in their constituencies or lobbyists for various special-interest groups, mostly industries. Voters all too often vote for who the media tells them to, or who seems more likely to ensure that they can find work or keep their jobs. There's nobody in charge of the whole thing, putting the brakes on to ensure that profits don't come before the freedom and welfare of individual humans or humanity as a whole. There's no "plug to be taken out" short of a massive revolution which would also dismantle the systems that keep us fed, clothed, warm, clean, secure, healthy and entertained.

Taken to it's logical conclusion, what does a world fully optimized for profit look like? Well, predictions become a whole lot more difficult once super-intelligent AIs are in the picture, but here's what I think it would be if such things turned out not to be possible. As there are things that humans can do that machines can't, most human effort would go into profit-generating activities (in other words, we'd all be wage-slaves). If someone is rich enough not to have to work then they probably wouldn't, so the generated profits can't go to making a lot of people rich - this implies that almost all the generated wealth would be concentrated in the hands of a very small number of individuals. Most workers would probably have quite a lot of debt since if they could have an unchecked accumulation of capital they could get rich enough not to have to work. Social safety-nets for any but those absolutely unable to do any kind of profit-generating work would be dismantled since the more dire the consequences for not working the more people will work. Education of children would focus on those skills needed in the workplace, and pure research would only be funded to the extent that it could eventually lead to more profit. Retirement would probably not be a thing (or if it is, you would not expect to have a lot of quality post-retirement time).

It's not all bad, though. Unemployment would be very low (since if someone could do useful work, there's no value in letting them go idle). Amongst the employed, extreme poverty would be nonexistant as people who starving and/or overly stressed about lack of money aren't able to work as effectively. The standard of healthcare would be good (since getting sick makes you unavailable to work and dying means money spent training your replacement) but may focus more on expensive and continual management of disease rather than cures (since this can be paid for by the worker as another incentive to work). War, crime, and political instability would be non-existent as overall these things destroy wealth rather than creating it. As most of the work that can't be done by machines is intellectual in nature, workers are likely to be well-educated, working conditions are likely to be very good and workers would get as much vacation and leisure time as needed to keep them from burning out and to maximize their overall productivity. Time spent commuting is wasted, so people will tend to live close to their workplaces. Violent revolution would be bad for business, so the general standard of living would be good enough that people would not expect to be able to improve it by revolting. Entrepreneurship would be encouraged (and funded by the wealthy) as long it is profitable overall.

On getting to that point, the amount of wealth being generated will surely far exceed that needed to meet the basic needs of workers and keep them productive. The excess goes to the super-wealthy, but what would they do with it? They would be the few who have the luxury of being motivated by concerns other than profit, so depending on their interests they might invest in the arts, space travel, curing diseases and other ills of the world that are left unaddressed by profitability concerns, or blue skies research. Or perhaps they will just build gigantic monuments to their own egos that will be enjoyed by subseqeuent generations of tourists.

That actually sounds less awful than I thought it would be when I started writing this essay. It's still all rather unjust, though - ideally the excess profits would be distributed far more equitably so that more people have a say in what the priorities of the human race should be. I hope we can find a way to keep the good parts of this scenario while replacing the bad parts. In a future post I'll look more into how this might be achieved.

TPP and TTIP

Wednesday, February 10th, 2016

For years now, I've been seeing articles about the TPP and TTIP treaties showing up on the various link aggregators I read. Without exception these articles warn of all the terrible effects that will come to pass if these treaties are passed, in areas as diverse as copyright, consumer safety, democracy and the environment,

The general scheme seems to be this: instead of engaging in public debate to determine what the laws should be in order to properly balance corporate profits against the interests of individuals, negotiators representing various industries meet in secret to draw up a set of laws which are then presented to signatory countries to ratify as a fait accompli. There may be a lot of very positive changes in such a treaty, but separating these from the negative ones will be impossible, and as long as the positive changes outweigh the negative ones the treaty will get ratified and we'll all be subject to the result.

Why can't we all just agree to pass the good parts of the treaty and throw out the bad parts? The best explanation for this I've heard was from this episode of NPR's Planet Money podcast. Basically, different parties want different things so they will trade off against each other - "I'll improve the situation for your steel industry in my country if you improve the situation for my textiles industry in yours". Essentially, it's a set of barters, but what's being bartered is laws instead of actual goods and services.

We don't normally barter for things in everyday life - we use money instead, buying and selling. So why would we barter in our trade treaties? If these barters are mutually beneficial, why could they not be structured as a set of exchanges for money: "You pay me X to improve the situation for your steel industry in my country" and "I'll pay you Y to improve the situation for my textiles industry in your country". This should be much quicker and easier to negotiate since only one thing needs to be negotiated at a time - the value to country A of changing the laws of country B.

I think that a big part of the reason it doesn't happen like this is because that would be an explicit giveaway of public money for the benefit of a particular private industry, and therefore a bit of a hard-sell, politically speaking (which is too bad because such a series of giveaways would still leave us better off than TPP/TTIP). The cost could be offset by raising a tax on the industry in question but if the law change that that industry is trying to obtain is the elimination of a tariff then it's a wash - instead of paying country B directly with a tariff, that industry would be spending the same money in taxes to country A which then pays them to country B in the "law for money exchange".

Apart from eliminating tariffs, another major reason for these treaties seems to be harmonization of regulations. If you want to build a new product, it will have to pass certain tests before you're allowed to sell it. For a piece of consumer electronics, examples might be electrical safety tests and electromagnetic emissions tests. Now, because the laws requiring these standards are passed on a country-by-country basis, the regulations may differ from country to country. There is a thriving industry of test centers which will test your product to make sure it complies with applicable standards in all the countries where you want to sell it. In many cases, the tests don't even have to be repeated - the device just has to pass the test at the strictest setting and then all is good.

However, some unfortunate (though quite deliberate) provisions of the TPP and TTIP seek to "harmonize" these regulations by forcing them all to the lowest standard rather than the highest. Any country wishing to improve standards could be sued for it. There may be some regulations that are impossible to satisfy in two particular countries at once (meaning the companies would have to make different products for different markets, making them much more expensive than they would otherwise be) and I can see that such kinds of harmonization can be desirable for everyone (as long as they aren't weakened in the process). But again, these things can happen at the national level - no treaties need to be involved.

So essentially these trade treaties seem to be a way to take a set of massively regressive laws written by big corporations and package them up into something that can be sold to legislators as "you must pass this or our country will be left out of all this lucrative trade and the economic consequences will be disastrous".

A new protected class: things you've said

Saturday, October 27th, 2012

Some years ago, when this site was much smaller than it was today, it was suggested to me that I might want to be careful about what I wrote here lest it get read by a prospective employer who might find a reason in it to decline me employment. Having my website be nothing more than a online resume would be very boring, though, so I declined - in rather more polite terms than I really felt. Besides which, any employer who would do such a thing would clearly not be a good employer to work for. I'm lucky in that I have a pretty desirable skillset, though - not everyone is so fortunate.

I bring this up now because of this horrifying story that I read this morning. The very suggestion that such a thing might be done will have a massively chilling effect on participation in publicly archived discussions. Blogging is already hard enough knowing that everything I say is really part of my permanent record without imagining that it will be data-mined to discover all sorts of things about me that I didn't want to share in the first place!

We talk a lot about free speech in the western world, and take very seriously any possibility that government might limit that speech. But I think we don't take seriously enough threats to our free speech from public sector. Knowing that we can't get arrested for stuff we say online isn't terribly useful if that same stuff can make us unemployable.

So, I'd like to see some kind of legal framework that would prevent employers from discriminating against prospective hires based on things they've said. Such a framework wouldn't be completely unprecedented - there are already several pieces of information that are technically available to employers which they can't use in employment decisions. I propose that we just expand that to make "stuff you've said" a protected class. Naturally, that would also make it illegal to fire someone over something that they said (though exceptions would probably have to be made for things directly related to their job - it should still be possible to fire someone for violating an NDA, for example).

Companies don't like to have employees who say terrible things on the internet, because it reflects badly on them (and their hiring practices). But it only does so because they have the power to do something about employees who say terrible things on the internet. If they didn't have that power, they can just say "it's not work related - it's nothing to do with us". Essentially, because it's not prohibited it's essentially compulsory. So companies ought to be clamouring for this legislation - it would ensure they could concentrate on their core business and not have to go googling for dirt on their employees. It would also mean that they could choose the best person for the job without having to take into account stuff that fundamentally doesn't matter to them. And it would make it less likely that they would be left short-handed due to an ill-advised comment.

Practical considerations of a consumption tax

Friday, October 26th, 2012

I enjoy listening to NPR's Planet Money podcasts and I have learned a lot about economics from them.

One recent show that was particularly interesting and that has had me thinking is the one about the no brainer economic platform. That has made me reconsider several of my own economic opinions and throw several sacred cows on the barbecue (to mix up some metaphors).

In particular, I had always thought that income taxes were the best kind of taxes, being progressive and cheap to collect. However, as Planet Money points out - taxing something discourages that behavior and we don't want to discourage income and employment! A consumption tax makes much more sense in terms of incentives - discouraging consumption is environmentally friendly and, while it isn't naturally the most progressive form of taxation, can be tweaked to make it reasonably progressive. How to make it practical to collect is a different matter, though. Taxing something is always extremely invasive, as the government will require lots of information and documentation about that thing in order to make sure that you're not cheating on your taxes.

A carbon emission tax seems like one of the best kinds of consumption tax. We're pretty universally agreed that putting carbon dioxide in the atmosphere is an undesirable thing. Most of that net carbon comes from fossil fuels which tend to come from a few big mining operations, so it's natural and easy to tax these operations per tonne of carbon they sell. They will then pass these costs on to their customers and ultimately to the consumer, discouraging the consumption by means of increased fuel costs (of course, there are political problems with raising fuel prices but that's a bit out of the scope of this discussion - after all, Planet Money does point out that their economic platform would be political suicide!)

Fossil fuels aren't the only way carbon gets into the atmosphere, though. Should we also charge dairy farmers for the methane emissions from cows? That has a big effect on climate change too, although the carbon involved came out of the atmosphere much more recently than that from fossil fuels. The fairer we try to be, the more invasive the tax becomes. For example, consider someone who lives completely off the grid, growing trees and felling them for firewood. He's completely self-sufficient in terms of carbon cycles (while burning the trees puts out carbon dioxide, it's completely cancelled by growing them in the first place). So it doesn't seem like he should be paying any carbon tax. So we'd have to offset the emission tax against carbon absorption - in other words pay a credit to individuals and organizations causing a net reduction in the amount of carbon in the atmosphere. Growing trees is one such activity. What about landfill site operators, who sequester enormous amounts of carbon in the ground? That's not generally considered to be a hugely "green" activity, but by this measure it would be.

Of course, as we inevitably move away from fossil fuels, that form of tax becomes increasingly useless. We can tax other forms of "digging up stuff from the ground and using it up" consumption, but I suspect that getting all the tax money we need that way would have some really undesirable consequences (like pricing a lot of useful things like electronics right out of the range of what most people can afford).

What other things are consumed that we could tax? Well, there's a lot of energy falling on the earth in terms of sunlight that we can collect and reuse in various forms (and indeed I expect that's where much of our energy will come from in a few decades). But it's hard to think of that as "consumption" when it's so plentiful and so much of it just goes to waste. Harnessing solar energy is also something we don't really have any interest in discouraging.

There is one resource that we each have a finite amount of and have to be very careful how we use it. That is our time. Could we tax consumption of time? That sounds like a very regressive poll tax on the face of it. But what if we tax only wasted time? I subscribe to the view that time is only wasted if you're spending it doing something that you don't truly enjoy. There's an easy way to tell (from a taxation point of view) if you're doing something that you don't really enjoy - somebody has to pay you to do it. If you do it without being paid, then you're probably doing it because you want to and therefore not wasting your time.

So that brings us right back around to the income tax again. There's even a justification here for making the income tax progressive - if you need to be paid more to do some piece of work, obviously it's more unpleasant and therefore should be taxed at a higher rate (yes, I know that people don't really get paid in proportion to the unpleasantness of their jobs but it could be a useful legal fiction).

There's one aspect to income taxes that I don't really like, which is casual labour. Suppose I wanted to hire the kid next door to trim my hedges - if I had to fill in a big pile of tax paperwork in order to do so I probably wouldn't bother - I'd just do it myself instead. Lots of "under the table" work goes on and many blind eyes are turned to it which is a sad state of affairs - our laws ought to reflect actual practice rather than making huge swathes of our population (technically) outlaws. How do we draw the line between which jobs should be taxed and which shouldn't?

I haven't thought through all the ramifications of this, but I have an idea that perhaps income tax ought be linked to limited liability. We give this great gift to corporations, limiting the liability of investors to only the amount of money they invest - if the corporation does something which costs society more than that, society absorbs the remainder of that cost. The idea is that by doing this we encourage entrepreneurship, which is all very well but it seems like there should be a cost to limiting liability, so perhaps income tax should only be raised when the employer is a limited liability organization. The deal ends up being the same as it currently is for such organizations, but if you don't need to limit your liability, then your employees don't need to pay income tax either - I think it's quite a neat way to delineate. On the small business end of things, there will be a population of companies with limited liability and a population without, they will compete with each other and market forces will determine the size of business at which limiting liability becomes worth it. Perhaps there could be some kind of sliding scale of liability (and therefore taxation) to ease the transition for companies growing across that boundary. I suspect I don't have the economic chops to have a good sense of how well that would work out in the real world though.

Multifunction gates

Friday, September 28th, 2012

Recently, I came across an interesting article about unusual electronic components. One of the components that article talks about is the multifunction gate, which is a 6-pin integrated circuit which can act as one of several different 2-input logic gates depending on which input pins are connected to which incoming signal lines, and whether the ones that aren't connected are pulled high or low.

However, the gates mentioned by that article can't act as any 2-input logic gate, only some of them. The 74LVC1G97 can't act as NAND or NOR, the 74LVC1G98 can't act as AND or OR, and neither of the devices can act as XOR or XNOR. Their truth tables are as follows:

Inputs 74LVC1G97 74LVC1G98
0 0 0 0 1
0 0 1 0 1
0 1 0 1 0
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 0 1
1 1 1 1 0

That got me wondering if it's possible for such a 6-pin device to act as any 2-input logic gate. Such a 6-pin device is naturally equivalent to a single 3-input logic gate, since two of the pins are needed for power. There are only 256 (28) possible 3-input logic gates (since the truth table for a 3-input logic gate contains 23=8 bits of information). So it's a simple matter to just write a program that enumerates all the possible 3-input logic gates, tries all the possible ways of connecting them up, and sees what the results are equivalent to.

There are 16 possible 2-input logic gates: 0, 1, A, B, ~A, ~B, A&B, A|B, ~(A&B), ~(A|B), A~B, ~(A~B), A&(~B), (~A)&B, A|(~B) and (~A)|B. Discounting the trivial gates, the gates that ignore one of their inputs and treating two gates as identical if we can get one from the other by swapping the inputs, gives us 8 distinct gates: AND, OR, NAND, NOR, XOR, XNOR, AND-with-one-inverting-input and OR-with-one-inverting-input.

There are 4 possibilities for connecting up each of the three input pins: low, high, incoming signal line A and incoming signal line B. I originally thought that connecting the output pin to one of the input pins might also be useful, but it turns out that it isn't - either the value of the input pin makes no difference (in which case it might just as well be connected to one of the other four possibilities) or it does. If it does, then either the output is the same as the input pin that it's connected to (in which case it's underconstrained, and not a function of the other two input pins), or the opposite (in which case it's overconstrained, and also not a function of the other two input pins).

So we have 256 possible 3-input logic gates times four possibilities for each of the three input pins, times two possible states for each of the two incoming signal line - that's 65536 circuit evaluations to try, which a computer program can run through in a timespan that is indistinguishable from instantaneous by unaided human senses.

Running the program didn't find any 3-input gates which can be configured to act as any of the 16 2-input gates, but it find something quite interesting - a dozen 3-input gates which can be configured to make 14 of them. Since swapping the inputs around gives equivalent gates, there's actually just two different gates, which for the purposes of this essay I'll call Harut and Marut.

Inputs Harut Marut
0 0 0 0 1
0 0 1 0 1
0 1 0 1 0
0 1 1 1 0
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 0

Note that the truth tables for Harut and Marut are quite similar to 74LVC1G97 and 74LVC1G98 respectively, just with two of the rows swapped or inverted. I haven't been able to find Harut and Marut gates on Mouser - it would be interesting to know if anybody makes them. One possible downside is that the 3-input gate isn't as useful in its own right (the 3-input gates for 74LVC1G97 and 74LVC1G98 are just a 2-input multiplexer and same with inverted output respectively).

I think it should be possible to design a 6-pin device that can yield any 2-input gate by making the supply lines take part in the configuration as well. For example, if you have a Harut gate and a Marut gate which give high-impedence outputs when power is not applied, you could put diodes on their supply lines and connect them up in parallel with the supply lines interchanged. Then applying power in the normal way would yield a Harut gate and reversing the polarity would yield a Marut gate. There's probably better ways to do it.

Buying up the junk

Wednesday, September 26th, 2012

I recently moved from Seattle to the UK. Part of the process of doing a big move like that is getting rid of stuff that you don't need any more. For some things that's just a question of throwing it away (we had one visit from the haulers, two trips to the tip and several weeks of extra garbage charges). But there's other stuff that, while we didn't need it any more, would have some value to someone else. Getting rid of all that stuff was a consistent feature of all our todo lists, and we still didn't manage to get rid of as much stuff as we wanted. We gave some things away to friends, sold some things on a neighborhood email list and had a (not particularly successful) garage sale.

There really ought to be a better way than this. There must be a enormous amount of value locked up in peoples houses in the form of stuff that they don't use but which still has some value and therefore they don't want want to throw away, but getting rid of it is an annoying, difficult, low priority task, so never gets done.

I think somebody could make a fortune by setting up a company that takes away your unwanted stuff. You'd request a visit from them on their website (or maybe they could just show up on a regular basis) and take away anything that you didn't want. They'd do the work of valuing it, selling it and shipping it, and then send you the proceeds (after taking their cut). If, after the valuation stage, you decided that the item was worth more than that you could reject the offer and they'd bring it back with the next visit (perhaps for a small charge to avoid the service being abused as a free valuation service). Items that might leak liquids or emit odors would probably not be accepted (the small amount of value held in such items would probably not be worth the possible damage to other items).

They'd do all the work of making sure that items were packed sufficiently well for shipping, reusing packing materials as much as possible (and eliminating a large amount of waste). If they delivered items as well (instead of relying on UPS, Fedex or similar) they could take away the packing materials on delivery, helping the environment and saving the customer from another annoying job (my workshop in Seattle often used to get cluttered up with old cardboard boxes, packing peanuts and bubble wrap).

Another nice thing about this business is that it would be really easy to bootstrap - you could start it off in just one city with a couple of people, a van and a simple website and some insurance against breaking things. Deliveries to places too far away for the van to get to (or between two different cities where the company does have vans) could be done with the existing delivery services. After visiting one house for a requested pickup they could visit other nearby houses and ask if they have any items they want to get rid of.

eBay private bids

Tuesday, September 25th, 2012

There are all sorts of programs available for "eBay sniping" - automatically placing your bid in the last moments of the auction in order to minimize the amount of information available to your adversaries (the other bidders) and thereby maximize your chances of winning while minimizing the amonunt you expect to pay.

The trouble with this is that it creates two classes of eBay bidders - those who have paid extra (in money, effort or both) for the sniping software, and those who haven't. This makes the eBay user experience less friendly and more frustrating.

So I think eBay should offer its own (free) sniping software built right into the site - give bidders the opportunity to make a public or a private bid (or both). Only the highest public bid is shown but the highest bid overall (public or private) will actually win.

Why would anyone make a public bid if a private one is available? Wouldn't this turn all eBay auctions into silent (?) auctions? Not necessarily - there are some circumstances when a public bid is actually in the bidder's favour - for example if there are several auctions for equivalent items all ending around the same time, making a public bid on one of them is likely to push other bidders towards the other auctions.

Though that bit of game-theoretic oddness could also be eliminated with a closely feature closely related to private bids, which is the ability to (automatically) withdraw a private bid. This would allow one to bid on several auctions at once, while guaranteeing that you'll only win one of them. More complicated logic would also be possible, like "I want to buy either A or the combination of (B and any of C, D or E)". I'm not sure if this is currently possible with sniping software (I haven't used it). One could also set different bids for different auctions, if some are more desirable than others in some ways.

All these changes favor buyers rather than sellers, so eBay users who are primarily sellers probably wouldn't like them (after all, they help buyers save money!) But sellers already hate eBay - many of their other policies are drastically biased towards buyers. The only reason that sellers keep selling stuff on eBay is that is where the buyers are (and therefore that is where the best prices are, even after factoring out eBay's cut).

One other reason that eBay might want to do this would be that by having private bids go through the site, they get more accurate information about who is prepared to pay how much for what. I don't know if eBay currently does anything with this sort of information, but it surely must have some value to someone.