<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Machine Learning Methods and \Real-Time" Economics</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Volodymyr Dorozhinsky</string-name>
          <email>vdorozhinsky@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Arsen Khadikov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nina Zholtkevych</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Economics, V.N. Karazin Kharkiv National University</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>School of Math. and Comp. Sci., V.N. Karazin Kharkiv National University</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2016</year>
      </pub-date>
      <fpage>21</fpage>
      <lpage>24</lpage>
      <abstract>
        <p>In the paper some machine-learning method for synthesis an on- y event acceptor is proposed. Such an acceptor has become necessary for the technique of the on- y event processing. This technique is increasingly being used in the design of information systems of economic destination. In the paper the synthesis problem for such an acceptor is considered in a rigorous mathematical formulation. The method for solution of the problem and the computer experiment to study the method are described. The directions for the further research are proposed.</p>
      </abstract>
      <kwd-group>
        <kwd>on- y event processing</kwd>
        <kwd>acceptor</kwd>
        <kwd>regular language</kwd>
        <kwd>pre xfree language Key Terms</kwd>
        <kwd>Component</kwd>
        <kwd>MathematicalModel</kwd>
        <kwd>MachineIntelligence</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Modern Information Communication Technology (ICT) causes intensive
changes in, practically, all areas of human activity. These changes, in
particular, impose non-traditional restrictions for decision processes in the
eld of economy. New approaches for modelling economic processes such
as \econophysics" [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] are responses on these challenges in the information
society. The key reason of a huge number of the changes is a reduction
of the time scale for decision making to manage of economic processes.
This reduction can be argued that business management systems gain
more and more features inherent in real-time control systems for complex
technical objects. Thus, we may talk about real-time economic processes
and use the corresponding technique to analyse and design them on the
base of ICT. Today Event-Driven Architecture (EDA) is the generally
accepted architecture solution to construct an information system that is
scalable, adaptable, and capable to operate in real-time [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
Mathematical fundamentals to analyse component behaviour of such a system have
been established in the papers [
        <xref ref-type="bibr" rid="ref1 ref7 ref8">1, 7, 8</xref>
        ]. The practically important class of
      </p>
      <p>
        - 470
message detectors for systems built on EDA has been de ned and
considered in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The implementation of these ideas and theoretical results
in the development process of information systems for business a priori
constrained by the complexity of identifying message patterns of system
events. In such situations, the usage of the machine learning methods is
one possible way to overcome the complexity of the problem in progress of
solving it. The advantage of this approach is needlessness to construct a
general theory, covering all logically possible occasions. Instead, it creates
a mechanism to adapt the system to new situation that is not consistent
with the current knowledge of the system. The main goal of the paper is
to present the principal suggestions of our approach and the preliminary
results.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Basic Mathematical Model and Problem Statement</title>
      <p>
        Here we describe the model proposed in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] for a component of a system
based on EDA.
2.1
      </p>
      <sec id="sec-2-1">
        <title>Basic Notation and De nitions</title>
        <p>Below we use the following notation:
f : X 99K Y
f (x) "
f (x) #
f (x) #= y</p>
        <p>X+
X
X!
X1
x
j j
x[0]
x[1 : ]
denotes that f is a partial mapping from X into Y ;
denotes that f (x) is not de ned for the member x of
X;
denotes that f (x) is de ned for the member x of X;
denotes that f (x) # and y = f (x) for the member y of
Y ;
denotes the empty (zero-length) sequence;
denotes the set of all non-empty nite sequences
composed of elements of X;
denotes the set f g S X+;
denotes the set of all in nite sequences composed of
elements of X;
denotes the set X S X!;
denotes the length of the nite sequence x;
denotes the rst element of a nite or in nite sequence
x;
denotes the sequence obtained by removing the rst
element of the sequence x.
De nition 1. For a nite set X a subset L of X is called a language
and, in the context, X is called an alphabet, and its members are called
symbols.</p>
        <p>
          We interpret symbols as a prime messages informing that the
corresponding elementary event has happened. Some nite sequences of symbols
inform about complex events and below these sequences are called events.
Other nite sequences of symbols do not carry information about
complex events and below we call them words. Sets of complex events must
meet the certain conditions. The most important of these conditions is
that any stream of elementary events is uniquely subdivided into a series
of complex events by directed viewing the stream from left to right. This
condition leads to the requirement that L is pre x-free [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. Now we can
require that any set of complex events related with a system would be
pre x-free.
2.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Mathematical Model</title>
        <p>Let us brie y remind the principal tenets of the used model. Any
component of a system based on EDA is modelled by using the concept of a
CEP-machine.</p>
        <p>De nition 2 (Structure of CEP-machine). Any CEP-machine is a
quintuple M = (X; Y; H; h0; ) with the following constituents:
{ the alphabet of atomic messages X, which is a nite set;
{ the alphabet of machine responses Y , which is a nite set;
{ the set of handlers H, which is a nite set, whose each member is
a partial mapping h : X+ 99K Y such that its domain is a pre x-free
language;
{ the initial handler h0, which is some xed element of H;
{ the response function , which is a mapping with domain Y and
codomain H.</p>
        <p>
          The general behaviour of any CEP-machine is described in [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. However
in the general case it is possible that a CEP-machine can become hung
while trying to recognize an event. But in our study we consider simpler
case, which was rst considered in [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. In this case the situation, when
the CEP-machine is hanging, is impossible. To specify this special case
we are in need in the following de nition.
        </p>
        <p>De nition 3 (Regular handler). A handler h : X+ 99K Y is called
regular if there exist some nite set Z with the marked element z0 2 Z
and some mapping : Z X ! Z S Y such that for any u 2 X+ and
y 2 Y the condition h(u) #= y is ful lled i there exist z1; : : : ; z juj 1 2 Z
such that
zi+1 = (zi; u[i]) for 0
y = (z juj 1; u[juj 1]):
i &lt; juj
1
and
In this case we say that the handler h is realized by the triple (Z; z0; ).
Remark 1. It is evident that a handler is regular if there exist a nite
state machine realising it.</p>
      </sec>
      <sec id="sec-2-3">
        <title>De nition 4 (Regular CEP-machine). A CEP-machine is called reg</title>
        <p>ular if all its handlers are regular.
2.3</p>
      </sec>
      <sec id="sec-2-4">
        <title>Problem Statement</title>
        <p>In practice we propose restrict our technique by methods of synthesis
for regular CEP-machines. This restriction is caused by technical and
theoretical di culties of more general technique. Further, it is evident
that the synthesis problem for a regular CEP-machine is decomposed into
series of synthesis problems for regular handlers each of which has only
one possible response \accepted". In this case we use the term \a regular
acceptor" instead the term \a regular handler". Thus, a machine-learning
problem for synthesis process of a regular handler can be formulated in
the following manner.</p>
        <p>Problem. Let E = fu1; : : : ; uM g be a nite pre x-free set of nite
sequences composed by elements of X and C = fv1; : : : ; vN g be a nite set
of nite sequences composed by elements of X such that E T C = ? then
we interpret elements of set E as examples and elements of set C as
counterexamples; we need to nd a regular acceptor h : X+ 99K facceptedg
such that
1. h(ui) #= accepted for all 0 i &lt; M ;
2. h(vi) " for all 0 i &lt; N ; and
3. the corresponding set Z has the least number of elements among all
possible.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Progress Review</title>
      <p>Here we present a method to build a regular acceptor and describe a
computer experiment that instills con dence in the existence of a
mathematical justi cation for this method.
We premise our presentation with a few simple theoretical results. The
techniques used to prove these results are quite common in automata
theory therefore we omit the corresponding proofs for simplicity of the
presentation. First of all, let us return to Remark 1 and discuss more
detail the interrelation between regular acceptors and nite state machines.
Namely, if we consider for any regular acceptor h : X+ 99K Y that
realized by the triple (Z; z0; ) the machine (Q = Z S Y Sfqtrapg; X; :
Q X ! Q; q0 = z0; Qaccept = Y ) where qtrap 2= Z S Y and (y; x) =
qtrap; (qtrap; x) = qtrap for any x 2 X and y 2 Y then the regular
language accepted by this machine coincides with the set of events accepted
by the regular acceptor. After this brief theoretical review, we can return
to our problem.
The general view of the method to nd an acceptor is presented by Alg. 1.
This method consists of the series of redirections for acceptor transitions
leading into the trap starting with the minimal acceptor for the set of
examples. Two functions used by the algorithm init and modify are
speci ed separately.</p>
      <p>To complete the speci cation of the proposed method we need to
describe algorithms for the function init (see item 3 of the Alg. 1) and
for the function modify (see item 7 of the Alg. 1).</p>
      <p>Function init. To build the minimal acceptor the following ideas are
used:
1. states of the acceptor are de ned recursively as special sets of words;
2. we choose the set E as z0 and add it to Z;
3. we choose the empty set as trap;
4. if for x 2 X in E there is not a word with the rst symbol x then
assign (z0; x) = trap else the set fu 2 X j xu 2 Eg add to Z;
5. repeat recursively this consideration for all member of Z until Z is
stabilized;
6. denote the set f g by accepted.</p>
      <p>The acceptor obtained in this manner is assigned as a result of the
function init.</p>
      <p>Algorithm 1. Speci cation of the proposed method
1 def learning method(E; C):</p>
      <p>Require : the nite pre x-free set of events E</p>
      <p>the nite set of words that are not events C</p>
      <p>Ensure : the required acceptor
2 do that:
3 initiate the learning process by applying function init to the set E
and denoting the result by acceptor
# initialize the set of transitions that cannot be redirected
4 frozen transitions = set()
5 while halting condition is not fulfilled:
6 do that:
7 modify acceptor by redirecting a transition leading into the trap
and minimize the resulting acceptor wherein the redirected
transition cannot belong to frozen transitions
8 do that:
9 check that acceptor is admissible in the sense that it does not
accept any word from C
if the checking is successful: continue
else:
do that:
roll-back the modi cation and add the redirected transition</p>
      <p>
        into frozen transitions
Function modify. To select a transition for redirection we use the
following simple remark: the minimal regular acceptor has at most one state
that is an attractor, i.e. any transition that goes out from this state has
this state as a target. Moreover, if this acceptor accepts a nite language
then the existence of the attractor is guaranteed. Further, to minimize
the new acceptor we use standard Hopcroft's algorithm [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
3.3
      </p>
      <sec id="sec-3-1">
        <title>Computer Experiment Schema</title>
        <p>Thus, we assume that the described above method gives a solution of
our problem. To check reasonability of this assumption we designed the
computer experiment for searching counterexamples to the assumption.
The Alg. 2 speci es the schema of the experiment.
3.4</p>
      </sec>
      <sec id="sec-3-2">
        <title>Case Study</title>
        <p>
          To implement the mentioned experimental schema we have used language
Python with libraries \scipy" and \numpy" [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. Particularly, all random
choices have been provided by the standard function random.choice
contained in the library \numpy". To randomly generate a regular expression
the following schema has been used. An expression is represented by a
syntactic tree. Each leaf of this tree is marked by a token and each
internal node of the tree is marked by a functor. Moreover, the number of
children for an internal node equals the arity of the corresponding
functor. The recursive structure of the syntactic tree that represents some
regular expression indicates the way of this tree random generation. To
make decision whether the root of the current subtree is an internal node
or a leaf we propose to use the following function p(n) that determines the
conditional probability to mark the current node as internal if its depth
is equal to n
&gt;&gt;: 21 exp 1
The results of the more than 10,000 experiments have shown that for a
randomly generated acceptor with the obtained sets E and C, the
presented method of learning was restoring this acceptor using these sets.
Thus, we can assume that the proposed method is precise on regular
acceptors. The last assumption can be considered as evidence in favour of
the validity of the proposed method of machine learning.
4
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusion and Future Study</title>
      <p>The presented paper cannot be considered as a complete research. The
obtained results are preliminary, but they are very important because they
demonstrate a chance to substitute the complete logical analysis of
situation by the learning on the examples and counterexamples during software
development of the on- y processing systems. Also these results make the
need for further research in the following directions: future experimental
study of the proposed method in order to clarify the boundaries of its
applicability; nding rigorous formulations of the method convergence
conditions; mathematical justi cation of the method; evaluation of the
e ectiveness of the method.</p>
      <p>Acknowledgement. The authors thank Prof. Gregoriy Zholtkevych for
the idea proposed to them: to use machine learning methods for the
synthesis of the logical structure of the on- y event processing mechanism.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Dokuchaev</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Novikov</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zholtkevych</surname>
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>Partial Actions and Automata</article-title>
          . Alg. Discr. Math.
          <volume>11</volume>
          (
          <issue>2</issue>
          ),
          <volume>51</volume>
          {
          <fpage>63</fpage>
          (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Dorozhinsky</surname>
          </string-name>
          , V.:
          <source>Regular Complex Event Processing Machines. Systemy obrobky informacii. 8</source>
          ,
          <issue>82</issue>
          {
          <fpage>86</fpage>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Etzion</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Niblett</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          : Event Processing in Action. Manning
          <string-name>
            <surname>Publications</surname>
          </string-name>
          (
          <year>2010</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Hopcroft</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>An n log n algorithm for minimizing states in a nite automaton</article-title>
          .
          <source>In: Proc. Internat</source>
          . Sympos.,
          <string-name>
            <surname>Technion</surname>
          </string-name>
          , Haifa.
          <source>Theory of machines and computations</source>
          , pp.
          <volume>189</volume>
          {
          <fpage>196</fpage>
          . Academic Press, New York (
          <year>1971</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>5. Scienti c Computing Tools for Python. http://scipy.org/</mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Stanley</surname>
            ,
            <given-names>H.E.</given-names>
          </string-name>
          : Interview on Econophysics.
          <article-title>Published in: \IIM Kozhikode Society &amp; Management Review"</article-title>
          ,
          <source>Sage publication (USA)</source>
          .
          <volume>2</volume>
          (
          <issue>2</issue>
          ), pp.
          <volume>73</volume>
          {
          <issue>78</issue>
          (
          <year>2013</year>
          ) http: //www.saha.ac.in/cmp/camcs/Stanley-interview.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Zholtkevych</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Novikov</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dorozhinsky</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Pre-Automata and Complex Event Processing</article-title>
          . In: V.
          <string-name>
            <surname>Ermolayev</surname>
          </string-name>
          et al. (eds.)
          <article-title>ICTERI 2014</article-title>
          .
          <article-title>CCIS</article-title>
          , vol.
          <volume>469</volume>
          , pp.
          <volume>100</volume>
          {
          <fpage>116</fpage>
          . Springer International Publishing,
          <string-name>
            <surname>Switzerland</surname>
          </string-name>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Zholtkevych</surname>
          </string-name>
          , G.:
          <article-title>Realisation of Synchronous and Asynchronous Black Boxes Using Machines</article-title>
          . In: V.
          <string-name>
            <surname>Yakovyna</surname>
          </string-name>
          et al. (eds.)
          <article-title>ICTERI 2015</article-title>
          .
          <article-title>CCIS</article-title>
          , vol.
          <volume>594</volume>
          , pp
          <volume>124</volume>
          {
          <fpage>139</fpage>
          . Springer International Publishing,
          <string-name>
            <surname>Switzerland</surname>
          </string-name>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>