Thursday, March 12, 2009

Legal Algorithms

I wrote the following article in 1989 or so, for the Madras Law College magazine. That was the first time I used "artificial intelligence". The porting of law to computers should happen at a faster pace within a decade.


Legal Algorithms

by K. Ramanraj


Many rules, especially legal rules are very complicated, involving exceptions, qualifications and provisos. To assist our understanding of the structure and meaning of complex rules, we can employ a method of diagrammatic presentation of rules - the algorithm. An algorithm is a precise set of instructions for solving a well defined problem. It takes the form of a structured series of questions with answers providing instructions for total or partial resolution of the problem.1


An algorithm comprises a sequence of questions to which the answer is either yes(true) or o(false). Each answer automatically takes the reader to the next question relevant to his case. Either of these answers may take the reader outside the ambit of the rule or provide a solution to his specific case.


Illustration 1:


Section 41 of the Indian Transfer of Property Act, 1882, reads as follows:


"Where with the consent, express or implied, of the persons interested in immovable property, a person is the ostensible owner of such property and transfers the same for consideration, the transfer shall not be voidable on the ground that the transferor was not authorized to make it: provided that the transferee, after taking reasonable care to ascertain that the transferor had power to make the transfer, has acted in good faith."

The above section deals with the transfer by an ostensible owner. To test the applicability of this section to a particular case, the following algorithm could be used:



+----------+
| Start |
+----------+
|
V
+-----------------------+ +-----------------+
| Is the transferor the | no | Section 41 is |
| ostensible owner? |--->---------->| not applicable |
+-----------------------+ | +-----------------+
| yes |
V |
+-----------------------+ |
| Is he the ostensible | no |
| owner by the express |--->--+
| or impled consent of | |
| the true owner? | |
+-----------------------+ |
| yes |
V |
+-----------------------+ |
| Was the transfer for | no |
| consideration? |--->--+
| | |
+-----------------------+ |
| yes |
V |
+-----------------------+ |
| Did the transfree take| no |
| reasonable care to |--->--+
| ascertain that the | |
| transferor had power | |
| to transfer? | |
+-----------------------+ |
| yes |
V |
+-----------------------+ |
| Did the transfree act | no |
| in good faith? |--->--+
| |
+-----------------------+
| yes
V
+-----------------------+
| Section 41 applies |
| |
+-----------------------+

The algorithm breaks up the rule into digestible parts. It begins with a "Start" box. The questions are arranged in the correct logical sequence. The questions, answers and instructions are boxed. Each question can have only one yes and one no. The lines connecting the boxes are arrowed.


The algorithm presents rules and sections in a visually more comprehensible form than conventional forms. It helps to identify a range of possible courses of action that might be taken in order to solve a given problem. A well devised algorithm can evaluate and predict the outcome of a case.


Illustration 2:


Under English law, all killing is murder, unless the contrary is
established by the accused2. Malice is the grand criterion which distinguishes murder from other killing. The Indian Penal Code, 1860, defines culpable homicide in
Section 299 and murder in section 300. The causing of death is common to both the offenses. The distinction between the two sections is important as it determines the gravity of the offense and the severity of the punishment. Sections 299 and 300 of the Indian Penal Code are extracted below for reference.


299. Culpable homicide

Whoever causes death by doing an act with the intention of causing death, or with the intention of causing such bodily injury as is likely to cause death, or with the knowledge that he is likely by such act to cause death, commits the offence of culpable homicide.


Illustrations


(a) A lays sticks and turf over a pit, with the intention of thereby causing death, or with the knowledge that death is likely to be thereby caused. Z believing the ground to be firm, treads on it, falls in and is killed. A has committed the offence of culpable homicide.

(b) A knows Z to be behind a bush. B does not know it A, intending to cause, or knowing it to be likely to cause Z's death, induces B to fire at the bush. B fires and kills Z. Here B may be guilty of no offence; but A has committed the offence of culpable homicide.

(c) A, by shooting at a fowl with intent to kill and steal it, kills B who is behind a bush; A not knowing that he was there. Here, although A was doing an unlawful act, he was not guilty of culpable homicide, as he did not intend to kill B, or to cause death by doing an act that he knew was likely to cause death.

Explanation 1- A person who causes bodily injury to another who is labouring under a disorder, disease or bodily infirmity, and thereby accelerates the death of that other, shall be deemed to have caused his death.

Explanation 2- Where death is caused by bodily injury, the person who causes such bodily injury shall be deemed to have caused the death, although by resorting to proper remedies and skilful treatment the death might have been prevented.

Explanation 3- The causing. of the death of child in the mother's womb is not homicide. But it may amount to culpable homicide to cause the death of a living child, if any part of that child has been brought forth, though the child may not have breathed or been completely born.


300. Murder
Except in the cases hereinafter excepted, culpable homicide is murder, if the act by which the death is caused is done with the intention of causing death, or-

Secondly- If it is done with the intention of causing such bodily injury as the offender knows to be likely to cause the death of the person to whom the harm is caused, or-

Thirdly- If it is done with the intention of causing bodily injury to any person and the bodily injury intended to be inflicted is sufficient in the ordinary course of nature to cause death, or-

Fourthly,- If the person committing the act knows that it is so imminently dangerous that it must, in all probability, cause death or such bodily injury as is likely to cause death, and commits such act without any excuse for incurring the risk of causing death or such injury as aforesaid.

Illustrations

(a) A shoots Z with the intention of killing him. Z dies in consequence. A commits murder.


(b) A, knowing that Z is labouring under such a disease that a blow is likely to cause his death, strikes him with the intention of
causing bodily injury. Z dies in consequence of the blow. A is guilty of murder, although the blow might not have been sufficient in the
ordinary course of nature to cause the death of a person in a sound state of health. But if A, not knowing that Z is labouring under any
disease, gives him such a blow as would not in the ordinary course of nature kill a person in a sound state of health, here A, although
he may intend to cause bodily injury, is not guilty of murder, if he did not intend to cause death, or such bodily injury as in the
ordinary course of nature would cause death.


(c) A intentionally gives Z a sword-cut or club-wound sufficient to cause the death of a man in the ordinary course of nature. Z
dies in consequence. Here, A is guilty of murder, although he may not have intended to cause Z's death.


(d) A without any excuse fires a loaded cannon into a crowd of persons and kills one of them. A is guilty of murder, although he may not have had a premeditated design to kill any particular individual.


Exception 1- When culpable homicide is not murder- Culpable homicide is not murder if the offender, whilst deprived of the power
of self-control by grave and sudden provocation, causes the death of the person who gave the provocation or causes the death of
any other person by mistake or accident.


The above exception is subject to the following provisos:-


First- That the provocation is not sought or voluntarily provoked by the offender as an excuse for killing. or doing harm to any
person.


Secondly- That the provocation is not given by anything done in obedience to the law, or by a public servant in the lawful
exercise of the powers of such public servant.


Thirdly- That the provocation is not given by anything done in the lawful exercise of the right of private defence.


Explanation- Whether the provocation was grave and sudden enough to prevent the offence from amounting to murder is a question
of fact.




Illustrations

(a) A, under the influence of passion excited by a provocation given by Z, intentionally kills. Y, Z's child. This is murder, in as
much as the provocation was not given by the child, and the death of the child was not caused by accident or misfortune in doing an
act caused by the provocation.


(b) Y gives grave and sudden provocation to A. A, on this provocation, fires a pistol at Y, neither intending nor knowing himself to
be likely to kill Z, who is near him, but out of sight. A kills Z. Here A has not committed murder, but merely culpable homicide.


(c) A is lawfully arrested by Z, a bailiff. A is excited to sudden and violent passion by the arrest, and kills Z. This is murder, in as
much as the provocation was given by a thing done by a public servant in the exercise of his powers.


(d) A appears as witness before Z, a Magistrate, Z says that he does not believe a word of A's deposition, and that A has perjured
himself. A is moved to sudden passion by these words, and kills Z. This is murder.


(e) A attempts to pull Z's nose, Z, in the exercise of the right of private defence, lays hold of A to prevent him from doing so. A is
moved to sudden and violent passion in consequence, and kills Z. This is murder, in as much as the provocation was given by a thing
done in the exercise of the right of private defence.


(f) Z strikes B. B is by this provocation excited to violent rage. A, a bystander, intending to take advantage of B's rage, and to
cause him to kill Z, puts a knife into B's hand for that purpose. B kills Z with the knife. Here B may have committed only culpable
homicide, but A is guilty of murder.


Exception 2- Culpable homicide is not murder if the offender, in the exercise in good faith of the right of private defence of person
or property, exceeds the power given to him by law and causes the death of the person against whom he is exercising such right of
defence without premeditation, and without any intention of doing more harm than is necessary for the purpose of such defence.


Illustration

Z attempts to horsewhip A, not in such a manner as to cause grievous hurt to A. A draws out a pistol. Z persists in the assault. A
believing in good faith that he can by no other means prevent himself from being horsewhipped, shoots Z dead. A has not committed
murder, but only culpable homicide.


Exception 3- Culpable homicide is not murder if the offender, being a public servant or aiding. a public servant acting for the
advancement of public justice, exceeds the powers given to him by law, and causes death by doing an act which he, in good faith,
believes to be lawful and necessary for the due discharge of his duty as such public servant and without ill-will towards the person
whose death is caused.


Exception 4. -Culpable homicide is not murder if it is committed without premeditation in a sudden fight in the heat of passion upon a
sudden quarrel and without the offender having taken undue advantage or acted in a cruel or unusual manner.


Explanation- It is immaterial in such cases which party offers the provocation or commits the first assault.


Exception 5- Culpable homicide is not murder when the person whose death is caused, being above the age of eighteen years,
suffers death or takes the risk of death with his own consent.


Illustration

A, by instigation, voluntarily causes, Z, a person under eighteen years of age to commit suicide. Here, on account of Z's youth, he
was incapable of giving consent to his own death; A has therefore abetted murder.



An algorithm could be
used to decide if the offense is murder under Section 300 or culpable homicide under Section 299.





+-------+
| Start |
+-------+
|
V
+-------------------------------+ +---------------+ +---------+
| Was there the killing of a | no |Not covered by | |Murder |
| human being by a human being? |---->|algorithm | +------------->|under |
+-------------------------------+ +---------------+ | |S. 300 |
|yes | +---------+
| |
V |yes
+-------------------------------+ +-----------------------------+ +------------------+
|Was the act by which death | |Does it fall under | |Culpable Homicide |
|ensued done with the intention | yes |any of the exceptions | no |not amounting to |
|of causing death? |---->|to Section 300? |---->|murder |
+-------------------------------+ +-----------------------------+ +------------------+
|no ^
| |
V |no
+-------------------------------+ +-----------------------------+ +-----------------------------+
|Was the act by which death was | |Was that act done with the | |Was that act done with the |
|caused, done with the intention| |intention of causing bodily | |intention of causing such |
|of causing such bodily injury | yes |injury to any person and the | no |bodily injury as the offender|
|as is likely to cause death? |---->|bodily injury intended to be |---->|knows to be likely to cause |
+-------------------------------+ |inflicted is sufficient in | |the death of the person to |
|no |the ordinary course of | |whom the harm is caused? |
| |nature to cause death? | +-----------------------------+
| +-----------------------------+ |yes
| |yes |
| +--->-----------------------------+ |
| | |
V V V
+-------------------------------+ +-----------------------------+ +-----------------------------+
|Was the act by which death was | |Was the act done with the | |Does the act fall under any |
|caused done with the knowledge | |knowledge that the act is so | yes |any of the exceptions to |
|that the act is likely to cause| yes |imminently dangerous that it |---->|Section 300? |
|death? |---->|must in all probability cause| +-----------------------------+
+-------------------------------+ |death or such bodily injury | |yes |no
|no |and without any excuse for | | |
| |incurring the risk of causing| V V
V |death or such injury? | +-----------------+ +---------+
+----------------+ +-----------------------------+ |Culpable homicide| |Murder |
|Lawful Homicide | |no |not amounting to | |under |
+----------------+ +--->-------------------------->|murder. | |S. 300 |
+-----------------+ +---------+



Lord Macaulay, who drafted the Code, had the genius to formulate in
such clear language the intricate essentials of murder in Section 300. The algorithm
is based on the distinction made by Mevil, J., in Reg v. Govinda. This algorithm can
be expanded to include the exceptions under Section 300 and the punishment for the said
offenses under Section 302 and 304.


Algorithms and Programming


Algorithms form the basis of computer programs. A different
species of diagrammatic presentation, the flowchart, is used instead. An algorithm
or a flowchart, once drawn can be translated into a language which the computer
understands. The algorithm will determine the scope and utility of a computer
program.


"Jurimetrics" is a term coined by computer analysts to
denote the scientific investigation of legal problems. It includes the application
of electronic techniques in solving legal problems. The computer which is an
essential component of jurimetric research, can aid the lawyer in several areas including
information storage and retrieval3, behavior analysis of judicial decisions4 etc.



Computers can sort and search data (legal equivalent of data is
facts) very quickly. Once all decisions are entered into a computer, it can be
programmed to search for cases relevant and material to the case in hand. It can
scan through volumes of reports in minutes. Over ruled cases could be automatically
erased or marked to inform the user. Computerization can also standardize
documentation. Preparing pleadings, statements and deeds are simplified by the
computer. A lawyer can also find several other uses for it.



The Indian Law Commission, in its 125th Report, while considering
the problem of pending cases in the courts, suggested the use of computers to streamline
administration of justice in the courts. Extensive use of computers will shorten the time taken for disposal of cases, and improve our legal system.



Elsewhere, while the frontiers of artificial intelligence are being
explored, we are currently discovering the existence of the computer. Programs that
suit our legal system have to be evolved. It is important that some positive steps
are taken to strengthen faith in our democracy without which there cannot be peace and
harmony.


____________________



Notes:


[1] For a detailed analysis refer to How to do things with Rules, William Twining and David Miers (1980).

[2] Hari Singh Gour, The Penal Law of India, Volume III, (1967), p. 1903.

[3] For further reading on this, refer to "Computers for Lawyers", Lex et Juris, September 1987, p.40.

[4] T.K. Viswanathan, "Slot Machine Justice", Madras Law College Magazine, Vol.LII, p.14.



Copyright (C) 2001 K. Ramanraj

Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.