Copyright is considered to be a form of "intellectual property right," a right of ownership over something of an intellectual nature---in this case, a certain form of expression.
The law recognizes other forms of intellectual property right, including trademarks, which apply to names of products or services, and patents, which apply to inventions.
Under U. S. law, in order to be patentable, an invention must fall under one of the following four categories: "process, machine, manufacture, or composition of matter." Inventions falling in these categories are said to have "statutory" or "patentable subject matter."
In addition, the invention must be novel, useful, and non-obvious. Patents require an application to the U. S. Patent and Trademark Office (USPTO).
The application process is expensive, typically costing several thousands of dollars in attorney's fees. If the patent is granted, it gives the inventor an exclusive right to the invention, lasting for seventeen years, even if somebody else independently reinvents the same thing.
What about patenting computer programs or algorithms? Traditionally, mathematical algorithms and laws of nature could not be patented. To patent an algorithm or law of nature would be to restrict the freedom of thought, and would restrain inventors excessively (since almost all inventions depend on laws of nature).
However, an application of a natural law could be patentable. For example, you could not patent the theory of general relativity, but you could patent a space ship that uses relativity to go faster than light, if such a thing were possible.
However, in Diamond v. Diehr (1981), the Supreme Court allowed a patent in which an algorithm was used by a computer to control a rubber-molding press, ruling that the presence of a computer algorithm in an otherwise patentable invention does not make that invention unpatentable.
Since Diamond v. Diehr, the USPTO has allowed many patents for computer programs and algorithms ("software patents").
Many computer programmers deplore this tendency. First, they argue that patent examiners were insufficiently trained in computer science and consequently gave many software patents for techniques that were too obvious. The fact that many software techniques are independently reinvented supports the claim that most of them are too obvious to deserve patent protection.
However, even if this is true, the USPTO could remedy the problem by hiring better qualified examiners for software patents. Mistakes in judgment do not argue a mistaken policy. Second, programmers argue that software patents are not needed to stimulate invention in the software industry, and they may even hinder it because many small software development shops would not be able to afford the expense of searching for a prior patent on a technique they want to use, and may be deterred by the threat of lawsuits for patent infringement. Many programs contain hundreds of techniques, each of which is a possible patent infringement if software patents are allowed, so the danger is real.
The Supreme Court has not ruled on whether computer algorithms are patentable subject matter, and is unwilling to do so, since a proper decision requires the broad investigative powers of Congress to hold hearings on the matter. However, the Court has held that "an algorithm, or mathematical formula, is like a law of nature, which cannot be the subject of a patent." (Diamond v. Diehr)
Yet the USPTO has taken the position that the non-patentability of algorithms "applies only to mathematical algorithms since any process is an `algorithm' in the sense that it is a step-by-step procedure to arrive at a given result." (Barrett, 1989, emphasis added) We find this position almost incomprehensible, for two reasons.
First, "processes" (the kind that were traditionally patentable) transformed physical matter. Computer processes, however, are directed by programs toward the transformation of information, not matter. (It is true that matter is incidentally transformed, since the information is encoded in a material form; however, it is the information, not the matter, that counts.) Processes of thinking---mental steps---have long been recognized as unpatentable subject matter, but it is hard to find a distinction between "transoforming information" and "thinking."
Second, the USPTO appears to be making a distinction between mathematical algorithms, which are non-patentable, and computer algorithms, which (it holds) are patentable. The terms "mathematical algorithm" and "computer algorithm" are not strictly synonymous. For example, a person can use the algorithm for long division without the aid of a computer. So a mathematical algorithm is not necessarily a computer algorithm.
But isn't a computer algorithm necessarily also a mathematical algorithm?
Computer science grew largely out of mathematics, and it is hard to see any difference between computer algorithms and mathematical algorithms.
The only difference we can imagine is between mathematical algorithms dealing with numbers and algorithms for non-numerical problems. But to suppose that non-numerical problems are non-mathematical is to take an extremely narrow view of mathematics. For example, boolean logic and geometry are branches of mathematics, yet they do not deal with numbers.
Computer algorithms also deal with text (e.g., word processing), which seems to be a non-numerical problem, but text is represented in the computer in the form of numerical codes.
In fact, all information in the computer is represented by binary numbers. The USPTO appears to be making an artificial distinction between mathematical algorithms and supposedly non-mathematical computer algorithms. That distinction has no basis in reality.
If one cannot patent an algorithm, can one patent the use of a computer to carry out the algorithm? This would be either a patent on a process or on a machine, so it seems to qualify as patentable subject matter. However, a patentable invention must also be non-obvious.
Given any newly discovered algorithm, the decision to use a computer to "run" the algorithm is now a matter of routine. The use of a computer to carry out an algorithm may have been non-obvious in the 1940's, but it is very, very, very obvious by now.
The best argument against software patents appears to be the fact that the software industry has flourished for many years without the "protection" of patents.
Recently, a number of large companies have been trying to get as many software patents as possible. This proliferation of software patents may cause smaller software developers to go bust. To defend against a lawsuit for patent infringement, even where the patent is obviously invalid, may cost hundreds of thousands of dollars. The industry doesn't need patent protection; the most innovative (typically smaller) software companies will almost certainly be hurt by it. The purpose of the patent law is to stimulate invention, not to wither it up.