Production model for administration of judicial decisions in the case of theft

The economic essence of the theft, as a crime against property, and its connection to unemployment is revealed. The general model of the support system making court decisions as fuzzy production system is developed. For the case of theft (Article 185 of the Criminal Code of Ukraine), two variants of the implementation of the fuzzy production system – the Mamdani and Sugeno algorithms – are proposed. Incorporation of the developed model into the “Electronic Court” system, which is a feature of the information society, is able to increase the level of automation of judicial practice and prevent corruption.


Introduction
In addition to the legal aspect, the concept of theft has an economic essence, since it is a crime against property. Theft is defined as a set of actions committed by one or a group of entities that provide for secret seizure or gainful possession of property, which subsequently harms the economic activity of both natural and legal persons. Thefts are the most frequent crimes committed in Ukraine -they account for more than 40% of the total number of reported crimes. The dynamics of the thefts is shown in Table 1. The data are taken from open sources, the website of the Prosecutor General's Office of Ukraine [1]. The main factors of the theft spread in Ukraine are: decrease in the living standards of the population as a result of the socio-economic crisis, changes in legislation on the qualification of such a crime as theft, unemployment. About 65% of thefts at the time of the crime commission were not taken in work and educational activities, more than a third were previously tried [2].
Punishment appointing is rather complicated and multidimensional process. According to the Art. 65 of the Criminal Code of Ukraine [3], the court imposes punishment within the limits established in the sanction of the Special Part Article of the Criminal Code, which provides for responsibility for the committed crime, in accordance with the provisions of the General Part of the Criminal Code, taking into account the gravity degree of the offense, the person of the offender the circumstances that mitigate and burden the punishment. During choosing a sentence, the judge must evaluate all elements of the crime and all the circumstances of its implementation in order to determine the extent of liability of the defendant and the appointment of him a co-sentence punishment. The degree of punishment, depending on the composition of the crime is regulated by the rules of law, which allows formally determine the limits of maximum and minimum penalty. In addition to the objective factors in this process, there is also subjectivity, the so-called judicial oversight. The choice of the type of punishment where the law provides for alternative sanctions remains for the judge. Consequently, the weakly formalized part of the sentence remains the assessment of the circumstances of committing a crime and the characteristics of the guilty person. While judges do not require a detailed comment on the criteria for evaluation, the need for a very motivated choice of punishment is clearly regulated. To unify the account of mitigating and burdening circumstances and the guilty person it is natural to formalize their assessments. The development of a general knowledge base for sentencing, with all possible combinations of different circumstances, gives hope for similar sentences in similar composition and circumstances of crimes.
The object of this study is the process of taking court decisions in case of theft. The subject of the study determines the methods of collecting and analyzing the parameters of real court decisions presented in the natural language.
The purpose of the article is to build a general decision support system (DSS) in court as a fuzzy production system, as well as to conduct a cycle of experiments with a developed DSS based on real case data from the Unified State Registry of Judicial Decisions in Ukraine [4].

Problem statement
Punishment appointing is rather complicated and multidimensional process. According to the Art. 65 of the Criminal Code of Ukraine, the court imposes punishment within the limits established in the sanction of the Special Part Article of the Criminal Code, which provides for responsibility for the committed crime, in accordance with the provisions of the General Part of the Criminal Code, taking into account: 1)the gravity degree of the offense, 2) the person of the offender, 3) the circumstances that mitigate and burden the punishment.
The legislative sanction of the article takes into account both quantitative indicators of the relevant circumstances and qualitative ones.
In accordance to this, were chosen the following input variables.
The linguistic variable Severity, which characterizes the degree of gravity of the offence, takes on the meaning of the term set {small, medium, large}. This variable allows you to take into account the repetition of a crime, the existence of past punishment, a collective crime, and so on.
The linguistic variable Personality characterizes the identity of the offender and takes value with the term set {negative, neutral, positive}. It allows for taking into account, for example, employment, availability of socially useful activities, description from the place of residence, etc.
It should be noted, that according to Part 3 of Art. 66 of the Criminal Code of Ukraine, if in any of the circumstances mitigating the punishment provided for in the Article of the Special Part of the Criminal Code as a sign of a crime that affects his qualification, the court can not once again take it into account when imposing a punishment as such that mitigate the punishment [3]. There are eleven mitigate circumstances. Two linguistic variables were chosen to assess the circumstances, that mitigate the punishment. The linguistic variable Mitigation evaluates the possibility of taking into account a judge of a certain number of realized circumstances. The linguistic variable LM assesses the level of punishment mitigation by circumstances, that were implemented.
Also, during constructing the algorithm of sentencing, we have taken the specified in Art. 67 of the Criminal Code of Ukraine, burdening circumstances. Such circumstances are determined by fourteen. When imposing a sentence, the court can not recognize that it is burdened by other circumstances. If any of the circumstances that burden a punishment is stipulated in the Article of the Special Part of the Criminal Code as a sign of a crime affecting its qualification, the court can not re-consider it when imposing a sentence as burden it [3]. Input variables to assess the circumstances that impose a punishment on Burden and LB. The linguistic variable Burden gives an assessment of the possibility of taking into account a certain number of realized circumstances. The linguistic variable LB assesses the level of punishment burden by the circumstances that were implemented.
The linguistic variable Lawyer characterizes the level of neutrality of the judge and takes on the meaning of the term-set {soft, middle, hard}. We will assume that the judge is fair in the level of "middle". Introduction of additional terms will put the problem of the adequacy of the sentence, the impact assessment of judges person.
The court may impose a measure of punishment, the constituent parts of which are fines, restrictions of freedom and imprisonment (real and conditional), public works. Assign the following output variables.
The output linguistic variable Fine determines the size of the fine. The output linguistic variable Years determines the term of imprisonment. The output linguistic variable RF (Restriction of freedom) determines the level of freedom restrictions. The output linguistic variable Public Works determines the public works The output linguistic variable Condition determines real and conditional imposition of punishment.
For all output linguistic variables were chosen the term-set, which contain three terms that characterize the implementation level {low, medium, high}.
The membership functions of the terms of input and output linguistic variables are determined by experts. Value ranges are regulated by the relevant legislation separately for each article. Thus, the general DSS model in court has the form: where F is the corresponding fuzzy output algorithm.

Literature review
The problem of limitation of the court decisions objectivity was raised in 1963 in Clark's work, "The Limits of Judicial Objectivity", which pointed to the basic rule for passing judgments: "Government of laws, and not of men" [5]. But achieving the perfect implementation of such a rule is impossible for a number of reasons, one of them is the uncertainty of many legal concepts. This is confirmed by the fact that the European Court, in view of the versatility of the notion of "justice" in decisions of national courts, does not define the criteria for a fair judicial discretion, but only sets out its tentative decision taking into account the provisions of Art. 6 "Convention for the Protection of Human Rights and Fundamental Freedoms" [6].
The approach to defining the fuzzy notion of "fair court" was proposed, in particular, in the work of Yu. Tobot [7], where the notion of "impartiality" was adopted as the criterion for a fair judicial discretion, indicating the same attitude of the court to the different sides of the dispute, resolving it without giving preference to one of the parties, that is, "neutrality" of the court. In this case, each judge has his own idea of justice discretion. According to V. Ladychenko [8], justice is not so much theoretically realized as it is intuitively perceived, sometimes with the subconscious understanding of it: people seem to consider the correctness of one or another act of the judiciary on the "internal scales" of justice.
The formalization of the decision-making process requires such scientific methods that would provide the opportunity, on the input data collected during the investigation and the pre-trial investigation, to propose the judge a version of the sentence, which is formulated in the subject field language and is the same for all courts of the country.
In the monograph D. Dyadkin [9] developed an algorithmic approach to the definition of a sentence according to the rules of law. The author advocates developing a more formal approach in determining the extent of punishment and reducing the proportion that is determined by the judge's care. D. Dyadkin demonstrates, on the example of assessing the social danger of crime, the possibility of a formal approach, using fuzzy logical deduction. Another example is the work [10] devoted to the development of a product model in making judgments based on the Mamdani algorithm for the case of moderate causing of serious harm to health.
There is a sufficiently developed theory of fuzzy / linguistic models, which is described in particular in [11]. Such fuzzy / linguistic models that are interpretable and can also be learned from the data. Also, we note that methods of fuzzy mathematics are widely used and are effective in formalizing the knowledge and experience of experts in various fields of human activity, as demonstrated in publications [9][10][11][12][13][14][15][16].
Previously, by the authors of this article in [17], was constructed fuzzy production system based on Sugeno's algorithm. Work was based on the materials of criminal sentences in relation to Part 1 of the Art. 185 of the Criminal Code of Ukraine. But unresolved issues were the choice validity of the fuzzy output algorithm, the study of the impact of different versions of sentences (according to various articles of the Criminal Code of Ukraine) on the complexity of the production rules base.

Materials and methods
Legal documents are characterized by a certain structuring and precision of the terminology that uses the terminology of the law. The style of legal documents is marked by the language standardization and unification, the wide use of consistent phrases, stencils, standard texts using. It can be argued that the good interpretation of the fuzzy logical conclusion is determined by the well-established theory of the semantics of the specialized language of the legal branch [11]. Despite this, not all legal terms are subject to formalization, which justifies the choice of fuzzy mathematics methods.
To construct the fuzzy production system, it is necessary to form a base of agreed fuzzy production rules that contain formalized domain experts knowledge. The basic formalism is the notion of a linguistic variable, which meaning can be the words and phrases of the experts specialized natural language. The linguistic variable takes on the term-set value, which elements are the terms given by a fuzzy set with a definite membership function, as described in detail in fundamental labor [11]. During constructing the system and conducting experiments, the authors sought to obtain an approximation of the known sentences values from the source [4], which would allow the source data of the system to be used later as a reference, the basis for sentencing a judge, common to all courts all over the country.

Experiments
As can be seen from formula (1), some output variables of common DSS model -Fine, Years -take numerical values, so it is interesting to compare the possibilities of the most common model of fuzzy logic output from Mamdani algorithm with fuzzy logic output from Sugeno algorithm, which has a clear output the value of some function of the input variables.
Consider the stages of the Mamdani algorithm and the Sugeno algorithm implementations in the Fuzzy Logic Toolbox MatLab [18].
Without losing generalization for greater certainty, we will continue to consider the process of making a judicial decision on the example of art. 185 of the Criminal Code of Ukraine [3], consisting of five parts. To conduct an experiment, choose part 3 of this article, whereby theft, which is associated with penetration into the home, other premises or repository, or which has caused significant harm to the victim, is punishable by imprisonment for a term of 3 to 6 years.
Thus, the general DSS model in court by the formula where F is the corresponding fuzzy output algorithm. Membership functions terms of input and output linguistic variables determined on materials of sentences for criminal case under part 3 of Art. 185 of the Criminal Code of Ukraine. The most successful were the trapezoidal term membership functions for the input variables Severity, Lawyer, Mitigation, Personality, Burden, and triangular for LB, LM.
Membership functions terms of input variables are presented in Fig. 1 and Table 2.
The membership functions of the terms of the output variables by the Mamdani algorithm characterizing the years of imprisonment are presented on Fig. 2 Table 3.   The membership functions of the output variable Years were built on the basis of judicial practice, according to which it is known that the shortest term, which is appointed according to Part 3 of Art. 185 of the Criminal Code of Ukraine, is one year. The longest term -six years -is a very severe punishment that occurs in court sentences very rarely.

and in
For an example of the DSS work result in Fig. 2 there is a response surface for the Mamdani model for the output variable Years from the input variables Severity, Mitigation.
For the Mamdani algorithm, such fuzzy production rules have been developed: IF the degree of gravity of the offence = big AND the personality = negative AND the mitigation circumstances = from 7 to 11 AND the burdening circumstances = from 8 to 14 AND the level of neutrality of the judge = middle AND the level of the burdening circumstances = big AND the level of the mitigation circumstances = big THEN punishment will be from 1 to 4.
In the case of the Sugeno algorithm, such fuzzy production rules have been developed: IF the level of neutrality of the judge = "middle" THEN the punishment will be y1, IF the level of neutrality of the judge = "soft" THEN the punishment will be y 2 , IF the level of neutrality of the judge = "hard" THEN the punishment will be y 3 .
In the case of the Mamdani algorithm, the knowledge base combines 28 production rules (Table 4), three of which coincide with the basic rules of the Sugeno algorithm. Due to such a number of rules, greater compliance with the non-linearity of the court decisionmaking process is achieved.

Results
In Table 5 and Table 6 summarize the results of the experiment on the DSS developed according to the sentences of six typical cases from the register of court decisions in Ukraine [4]. In all cases, given in Table 5, it was considered that the decision is made by a fair judge, that is, the input variable Lawyer takes the value Middle with the corresponding value of the membership function 0.5.
The Mamdani algorithm for the first four cases presented in Table 6, has generated the punishment that is either coincidental or more severe on 0.25 years than was pronounced by a court sentence. The Sugeno algorithm in these cases showed an absolute deviation of -0.4 to 0 years, with reducing the term of imprisonment.
For the last two cases from Table 6 both Mamdani and Sugeno algorithms generated milder punishment compared with the term of imprisonment by court decision. This is due to the influence of the more complex content of the sentence, which contains a reference to other articles of the Criminal Code of Ukraine. Reduce or avoid this discrepancy maybe the complication of the model (2) with the additional Condition provided in the general model (1).

Discussion
When substantiating the choice of fuzzy output algorithm, it is necessary to take into account possible errors in the generated solutions and the complexity of calculations by the chosen algorithm. Similar questions were raised for an individual case of approximation of the continuous function of one variable in the work [13]. At the level of the conducted experiment, both systems of fuzzy logic output Mamdani and Sugeno showed the adequacy of the generated results of sentences without the apparent advantage of one of the algorithms. But the linearity of the output functions of the Sugeno algorithm provides a more simple setup of the fuzzy output system and yields a gain from a computational point of view.
Both systems responded equally to the existence of additional conditions, which in practice proved to be mitigating of the court desicion. This is confirmation of the need to introduce qualitative, non-numeric parameters to the system's input. The introduction of such variables is more convenient in the system of fuzzy logic output using the Mamdani algorithm.
The following steps of improving DSS in the courts are dictated by the need of developing unified rules for initializing input variables, which will allow adjusting fuzzy production models to obtain the fair verdict in cases involving the crime in several parts of one article and / or several different articles of the Criminal Code of Ukraine.

Conclusions
The scientific novelty of the work determines the general model construction of the decision support system in court as fuzzy production system, as well as a cycle of experiments with the developed DSS on the basis of real data on convictions on cases from the database of the Unified State Register of Court Solution in Ukraine.
The practical value of this work is that the use of fuzzy logic methods is potentially productive to support