Apple blocks Samsung sales. Samsung blocks Apple sales. Apple ban overturned. Samsung ban lifted. On any given day it's hard to keep track of which company's smartphones, tablet computers or other products are temporarily banned in which countries.

And it's not just Apple and Samsung which are at each other's throats - it seems that every week brings new stories of alleged patent infringement involving companies ranging from household names like HTC to more obscure outfits like VirnetX. (In case you're wondering, Apple was recently ordered to pay $368 million to Connecticut-based VirnetX after a US court ruled that its Facetime video chat tool infringed two of VirnetX's patents).

But what's the reason for this apparently endless series of patent battles involving smartphone and tablet firms? Why do they appear to be incapable of taking more effective steps to avoid infringing other companies patent rights?

One reason boils down to the nature of mobile devices like smartphones and tablets, according to Daniel O'Connor, a self-styled anti-trust and internet policy wonk as well as senior director of public policy at the Computer and Communications Industry Association. He says that software is a particularly active area for patents, especially anything to do with telecommunications, semiconductors and 4G data networks. Software patents are also particularly broad and vague, and that makes infringement difficult to avoid. "That creates the conditions for a kind of patent perfect storm," O'Connor says.

‘Fingers crossed’

To get an idea of the size of the problem facing the likes of Apple and Samsung, consider this: O'Connor believes - based on estimates from patent firm RPX - that there are about 250,000 active patents in the United States that may have some relevance to the activities of mobile device manufacturers out of a total of about 1.5 million active patents. That means that about 17% of all active patents in the United States are potentially patents on smartphone technology.

But that only begins to scratch the surface. That's because, as O'Connor points out, most of these patents don't just make a single claim to a particular intellectual property right - on average each patent makes more like 20 such claims. That means that this collection of 250,000 patents actually describes about five million restrictions on what mobile device makers can do while they design a new model. Realistically an individual may be able to keep five, 10 or maybe 20 restrictions in mind when designing a new feature for a mobile device, but probably not 50 or 500. And five million? Not a chance.

Now, you might think that large technology companies like Samsung or Apple must have busy legal departments brimming with patent attorneys whose job it is to make sure that any new products don't infringe other companies' patents. But in the VirnetX case, this was allegedly not the case. "Apple says they don't infringe, but Apple developers testified that they didn't pay any attention to anyone's patents when developing their system," a lawyer for VirnetX was quoted as saying.

Apple's behaviour may sound bizarre, but there's a very good reason why many companies ignore the patent system when it comes to software. A recent study found that if every software producing firm in America wanted to check just the new software patents issued in a given year, about two million patent attorneys working full time would be needed to do the job.

That's a problem because there are only about 40,000 registered patent attorneys and agents in the entire United States according to the United States Patent and Trademark Office. And even if two million hard working attorneys could somehow be found, at an hourly rate of $371 (the average cost of a patent attorney, as estimated by American Intellectual Property Law Association), their fees would come to about $1.5 trillion - or nearly 10% of the GDP of the USA. And that's assuming the attorneys didn't slack, spending no more than 10 minutes examining each patent.

Christina Mulligan, one of the authors of the report and a postdoctoral associate at Yale Law School, says that the main problem is that software patents are so broad and vague that they are essentially impossible to index, and that means they can't be searched efficiently. "It's because it is more or less impossible to search them that no-one does it, and even if you tried you'd probably only find 25 of the 50 patents your software may infringe," she explained. "It's cheaper just to cross your fingers and hope for the best."

And, she adds, since companies are likely to have to pay less if they accidentally infringe a patent than if they read a patent and then wilfully ignore it, the "cross your fingers and hope" strategy is probably the most rational strategy to adopt.

Of course this strategy inevitably leads to patent disputes, but many technology companies end up resolving them by coming to some cross-licensing agreement with the other party - just this month Apple and Taiwanese smartphone maker HTC halted their hostilities this way. But, before this happens, companies often spend considerable sums buying up patent portfolios that they can use as bargaining chips during negotiations.

And these defensive portfolios do nothing to protect against so-called non practicing entities (NPEs) or “patent trolls”, as they have become known. These NPEs manufacture nothing themselves, but buy up software patents with the sole purpose of making money from them by enforcing the patent rights against purported infringers. As they have no products of their own, they have no need to engage in cross licensing deals.

A possible solution to the problem uses the concept of “defensive patent aggregation”. Instead of individual companies spending cash to build up defensive patent portfolios, companies like California-based RPX buy up patents and make them available to their customers, who pay an annual subscription. John Amster, RPX's CEO, says that ultimately patent pooling companies could act like performance rights organizations such as American Society of Composers, Authors and Publishers (Ascap) do in the music industry. "We would like to see a mandated clearing house (for patents). Everyone should have to pay a reasonable price, and everyone could avoid having to pay outsized damages," he said.

Of course there are other solutions too, ranging from a complete overhaul of the patent system to more subtle changes such as the inclusion of laws that would allow companies to use an independent inventor defence – essentially meaning that an inventor could argue that they came up with the an idea on their own.

But, for the moment , the software patent perfect storm shows no sign of abating. The only likely winners are the patent attorneys.

If you would like to comment on this article or anything else you have seen on Future, head over to our Facebook page or message us on Twitter.