<!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>
      <journal-title-group>
        <journal-title>Workshop, Stavropol and Arkhyz, Russian Federation</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>The Quantum Version Of Classi cation Decision Tree Constructing Algorithm C5.0</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Kamil Khadiev Kazan Federal University</institution>
          ,
          <addr-line>18, Kremlyovskaya st, Kazan</addr-line>
          ,
          <country country="RU">Russia</country>
          ,
          <institution>420008; Zavoisky Physical-Technical Institute, FRC Kazan Scienti c Center of RAS 10/7, Sibirsky tract, Kazan, Russia, 420029 Ilnaz Mannapov Kazan Federal University 18</institution>
          ,
          <addr-line>Kremlyovskaya st, Kazan</addr-line>
          ,
          <country country="RU">Russia</country>
          ,
          <institution>420008 Liliya Sa na Kazan Federal University 18</institution>
          ,
          <addr-line>Kremlyovskaya st, Kazan, Russia, 420008 liliasa</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <volume>1</volume>
      <fpage>7</fpage>
      <lpage>09</lpage>
      <abstract>
        <p>In the paper, we focus on complexity of C5.0 algorithm for constructing decision tree classi er that is the models for the classi cation problem from machine learning. In classical case the decision tree is constructed in O(hd(N M +N log N )) running time, where M is a number of classes, N is the size of a training data set, d is a number of attributes of each element, h is a tree height. Firstly, we improved the classical version, the running time of the new version is O(h d N log N ). Secondly, we suggest a quantum version of this algorithm, which uses quantum subroutines like the amplitude ampli cation and the Durr-H yer minimum search algorithms that are based on Grover's algorithm. The running time of the quantum algorithm is O h pd log d N log N that is better than complexity of the classical algorithm.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Quantum computing [
        <xref ref-type="bibr" rid="ref30 ref6">30, 6</xref>
        ] is one of the hot topics in computer science of last decades. There are many
problems where quantum algorithms outperform the best known classical algorithms [
        <xref ref-type="bibr" rid="ref10 ref19 ref24 ref25">10, 19, 25, 24</xref>
        ]. Superior of
quantum over classical was shown for di erent computing models like query model, streaming processing models,
communication models and others [
        <xref ref-type="bibr" rid="ref18 ref2 ref20 ref21 ref22 ref23 ref29 ref29 ref3 ref4">29, 3, 2, 23, 20, 18, 22, 21, 29, 4</xref>
        ]. Today quantum computing is often used in
machine learning to speed up construction of machine learning models or to predict a result for new input data
[
        <xref ref-type="bibr" rid="ref27 ref35 ref36 ref7">7, 27, 37, 36</xref>
        ]. Sometimes the learning process (construction) of a machine learning model takes a long time
because of the large size of data. Even a small reduction in running time can provide a signi cant temporary
bene t to the program.
      </p>
      <p>
        Decision trees are often used to build a classi er. Random forest [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], Gradient tree boosting [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] models
are very popular and e ective for solving classi cation and regression problems. These algorithms are based on
decision trees. There are several algorithms for trees construction that are CART [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ], ID3 [
        <xref ref-type="bibr" rid="ref32">32</xref>
        ], C4.5 [
        <xref ref-type="bibr" rid="ref34">34</xref>
        ], C5.0
[35] and others. We consider C5.0 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] algorithm for decision tree classi ers. It works in O(hd(N M + N log N ))
running time, where h is a height of a tree, N is the size of a training set, d is a number of attributes for one
vector from the training set, and M is a number of classes.
      </p>
      <p>
        In this paper, rstly, we present an improved version of the classical algorithm that uses Self-balancing binary
search tree [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and has O(hdN log N ) running time. As a self-balancing binary search tree we can use the AVL
tree [
        <xref ref-type="bibr" rid="ref5 ref9">5, 9</xref>
        ] or the Red-Black tree [
        <xref ref-type="bibr" rid="ref15 ref9">15, 9</xref>
        ]. Secondly, we describe a quantum version of the C5.0 algorithm. We call it
QC5.0. The running time of QC5.0 is equal to O h log dpdN log N . The algorithm is based on generalizations
of Grover's Search algorithm [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] that are amplitude ampli cation [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and Durr-H yer algorithm for minimum
search [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>The paper has the following structure. Section 2 contains preliminaries. Description of the classical version
C4.5 and C5.0 algorithms are in Section 3. Section 4 contains improvements of classical algorithm. We provide
the quantum algorithm in Section 5.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>
        Machine learning [
        <xref ref-type="bibr" rid="ref12 ref32">12, 32</xref>
        ] allows us to predict a result using information about past events. C5.0 algorithm is
used to construct a decision tree for classi cation problem [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ]. Let us consider a classi cation problem in formal
way.
      </p>
      <p>There are two sequences: X = fX1; X2; :::; XN g is a training data set and Y = fy1; y2; :::; yN g is a set of
corresponding classes. Here Xi = fx1; xi2; :::; xidg is a vector of attributes, where i 2 f1; : : : ; N g, d is a number
i
of attributes, N is a number of vectors in the training data set, yi 2 C = f1; : : : ; M g is a number of class of
Xi vector. An attribute xij is a real-valued variable or a discrete-valued variable, i.e. xij 2 f1; : : : ; Tj g for some
integer Tj . Let DOMj = R if xj is a real value; and DOMj = f1; : : : ; Tj g if xj is a discrete-valued attribute.
The problem is to construct a function F : DOM1 : : : DOMd ! C that is called classi er. The function
classi es a new vector X = (x1; : : : ; xd) that is not from X .</p>
      <p>There are many algorithms to construct a classi er. Decision tree and the algorithm C5.0 for constructing a
decision tree are a central subject of this work.</p>
      <p>A decision tree is a tree such that each node tests some condition on input variables. Suppose B is some
test with outcomes b1; b2; : : : ; bt that is tested in a node. Then, there are t outgoing edges for the node for each
outcome. Each leaf is associated with a result class from C. The testing process is the following. We start test
conditions from the root node and go by edges according to a result of the condition. The label on the reached
leaf is the result of the classi cation process.</p>
      <p>
        Our algorithm uses some quantum algorithms as a subroutine, and the rest part is classical. As quantum
algorithms, we use query model algorithms. These algorithms can do a query to a black box that has access to
the training data set and stored data. As a running time of an algorithm, we mean a number of queries to the
black box. In a classical case, we use the classical analog of the computational model that is query model. We
suggest [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ] as a good book on quantum computing and [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] for a description of the query model.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>The Observation of C4.5 and C5.0 Algorithms</title>
      <p>
        We consider a classi er F that is expressed by decision trees. This section is dedicated to the C5.0 algorithm
for decision trees construction for the classi cation problem. This algorithm is the improved version of the
algorithm C4.5, and it is the part of the commercial system See5/C5.0. C4.5 and C5.0 algorithms are proposed
by Ross Quinlan [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ]. Let us discuss these algorithms. C4.5 belongs to a succession of decision tree learners that
trace their origins back to the work of Hunt and others in the late 1950s and early 1960s [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. Its immediate
predecessors were ID3 [
        <xref ref-type="bibr" rid="ref31">31</xref>
        ], a simple system consisting initially of about 600 lines of Pascal, and C4 [
        <xref ref-type="bibr" rid="ref33">33</xref>
        ].
3.1
      </p>
      <sec id="sec-3-1">
        <title>The Structure of the Tree</title>
        <p>Decision tree learners use a method known as divide and conquer to construct a suitable tree from a training set
X of vectors:
• If all vectors in X belong to the same class c 2 C, then the decision tree is a leaf labeled by c.
• Otherwise, let B be some test with outcomes b1; b2; : : : ; bt that produces a non-trivial partition of X . Let
Xi be the set of training vectors from X that has outcome bi of B. Then, the tree is presented in Figure 1.</p>
        <p>Here Ti is a result of growing a decision tree for a set Xi.
C4.5 uses tests of three types, each of them involves only a single attribute Aa. Decision regions in the instance
space are thus bounded by hyperplanes, each of them is orthogonal to one of the attribute axes.
• If xj is a discrete-valued attribute from f1; : : : ; Tj g, then possible tests are
{ xj =? with Tj outcomes, one for each value from f1; : : : ; Tj g. (This is the default test.)
{ xj 2 G where G f1; : : : ; Tj g. Tests of this kind are found by a greedy search that maximizes the
value of the splitting criterion (It is discussed below).
• If xj is a real-valued attribute, then a test is \xj " with two outcomes that are \true" and \false". Here
is a constant threshold. Possible values of are found by sorting the distinct values for fxj1; : : : ; xjN g set.
Possible thresholds are values between each pair of adjacent values in the sorted sequence. So, if the training
vectors from X have d distinct values for j-th attribute, then d 1 thresholds are considered.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Test Selection Procedure</title>
        <p>C4.5 relies on a greedy search, selecting a candidate test that maximizes a heuristic splitting criterion.</p>
        <p>Two criteria are used in C4.5 that are information gain, and gain ratio. Let Cj = fi : i 2 f1; : : : ; jX jg; yi = jg
be a set of indexes of training vectors from X that belong to j-th class, for j 2 C = f1; : : : ; M g. Let RF (j; X )
be a relative frequency of training vectors in X with indexes from Cj . RF (j; X ) = jCjj The information content
jX j
of a message that identi es the class of vectors from X is I(X ) = PjM=1 RF (j; X ) log (RF (j; X )) After that
we split X into subsets X1; X2; : : : ; Xt with respect to a test B, the information gain is</p>
        <p>G(X ; B) = I(X ) Pit=1 jjXXijj I (Xi) : The potential information from the partition itself is</p>
        <p>P (X ; B) = Pit=1 jjXXijj log jjXXijj . The test B is chosen such that it maximizes the gain ratio that is GP((XX ;;BB)) .
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Notes on C5.0 algorithm</title>
        <p>
          C4.5 was superseded in 1997 by a commercial system See5/C5.0 (or C5.0 for short). The changes encompass new
capabilities as well as much-improved e ciency, and include the following items. (1) A variant of boosting [
          <xref ref-type="bibr" rid="ref33">33</xref>
          ],
which constructs an ensemble of classi ers that are later used to give a nal classi cation. Boosting often leads
to a dramatic improvement in predictive accuracy. (2) New data types (e.g., dates), \not applicable" values,
variable misclassi cation costs, and mechanisms for a pre- ltering of attributes. (3) An unordered rule sets that
it is a situation when a vector is classi ed, all applicable rules are found and voted. This fact improves both
the interpretability of rule sets and their predictive accuracy. (4) Greatly improved scalability of both decision
trees and (particularly) rule sets (sets of if-then rules, representation of decision tree). Scalability is enhanced
by multi-threading; C5.0 can take advantage of computers with multiple CPUs and/or cores.
        </p>
        <p>
          More details are available in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] ( http://rulequest.com/see5-comparison.html). At the same time, the process
of choosing a test B was not changed signi cantly. In this work, we focus on this process and improve its
complexity.
3.4
        </p>
      </sec>
      <sec id="sec-3-4">
        <title>Running Time of the One-threading Tree Constructing Part of C4.5 and C5.0 algorithms</title>
        <p>Let us remind the parameters of the model. N is a number of vectors in a training set, M is a number of classes,
d is a number of attributes (elements of vectors from the training set). Let the height of a constructing tree h
be a parameter of the algorithm. Let RV be a set of indexes of real-valued attributes and let DV be a set of
indexes of discrete-valued attributes.</p>
        <p>Let us describe the procedure step by step because we will use it for our improvements. Assume that we
construct a binary tree of height h.</p>
        <p>The main procedure is ConstructClassifiers that invoke a recursive procedure FormTree for
constructing nodes. The main parameters of FormTree are level that is an index of tree level; tree that is a result
subtree that the procedure will construct; X 0 that is a set that we use for constructing this subtree.</p>
        <p>Let us present ConstructClassifiers and FormTree procedures as Algorithm FormTree. The
FormTree procedure does two steps. The rst one ChooseSplit is choosing the test B that is the choosing
an attribute and the splitting by this attribute that maximize the objective function GP((XX 00;;BB)) . The result
attribute index is attr and the result split is split variable. The second step Divide is the splitting processes itself.
pbI[u] = pbI[u + 1]</p>
        <p>Let us describe the ChooseSplit procedure that provides the best attribute index and split itself. It is
presented in Algorithm ChooseSplit. The procedure considers each attribute, and it has two di erent kinds of
processing processes of the attribute depending on belonging to RV or DV . Let us describe the procedure for a
real-valued attribute attr. We have three steps.</p>
        <p>The rst step is a sorting X 0 by xattr element of vectors. This procedure is Sort(X 0; j). Assume that the result
indexes in a sorted order are (i1; : : : ; iz), where z = jX 0j. So, now we can split vectors X 0 by u = (xauttr +xaut+tr1)=2
and then there will be two sets X1 = fXi1 ; : : : ; Xiu g and X2 = fXiu+1 ; : : : ; Xiz g, for u 2 f1; : : : ; z 1g.</p>
        <p>The second step is computing pCj [u] = jCjuj, pI[u] = I(fXi1 ; : : : ; Xiu g) and pbI[u] = I(fXiu ; : : : ; Xiz g),
where u 2 f1; : : : ; zg, Cju = fw : w 2 f1; : : : ; ug; yiw = jg, j 2 f1; : : : ; M g. We use the following formula for the
values:
pCj [u] = pCj [u
1] + 1 if yiu = j; and pCj [u] = pCj [u 1] otherwise.</p>
        <p>pCj[u 1] log pCj[u 1] + pCj[u] log pCj[u] , if yiu = j.</p>
        <p>N N N N
pCj[z] pCj[u] log pCj[z] pCj[u] + pCj[z] pCj[u 1] log pCj[z] pCj[u 1] , if yiu = j.</p>
        <p>N N N N
The third step is choosing maximum u2f1m;::a:;xz 1g GP((XX 00;;uu)) , where G(X 0; u) = I(X 0)
Nu pI[u]</p>
        <p>NN u (pbI[u+1])
and P (X 0; u) = Nu log Nu NN u log NN u . We use these formulas because they correspond to splitting
X1 = fXi1 ; : : : ; Xiu g and X2 = fXiu+1 ; : : : ; Xiz g, I(X1) = pI[u], I(X2) = pbI[u + 1] and I(X 0) = pI[z].</p>
        <p>If we process a discrete-valued attribute from DV , then we can compute the value of the object function
when we split all elements of X 0 according value of the attribute. So Xw = fi : Xi 2 X 0; xiattr = wg, for
w 2 f1; : : : ; Tattrg.</p>
        <p>Let us describe the processing of discrete-valued attributes. The rst step is computing the case numbers of
classes before split, the case numbers of classes after split, the case numbers for t values of current attribute.</p>
        <p>The second step is calculating an entropy I(X ) before split. The third step is calculating the entropies
I (Xi) after split to t branches, information gain G(X ; B) = I(X ) Pit=1 jjXXijj I (Xi) and potential information</p>
        <p>Pt jXij log jXij . The last step is calculating a gain ratio GP((XX ;;BB)) .</p>
        <p>i=1 jX j jX j</p>
        <p>Let us describe the ChooseSplit procedure that splits the set of vectors. The procedure
also described in Algorithm ChooseSplit and Divide. The Divide procedure recursively invokes
the FormTree procedure for each set from sequence of sets split for constructing child subtrees.</p>
        <p>Let us discuss the running time of the algorithm.</p>
        <p>Theorem 1 The running time of C5.0 is O(h d (M
N + N log N )).</p>
        <p>Proof The procedure FormTree has two main subroutines: ChooseSplit and Divide. The procedure
Divide recursively invokes the FormTree procedure. In fact, ChooseSplit takes the main time for each node
of the tree. That is why we focus on analyzing this procedure.</p>
        <p>Let us consider a real-valued attribute. The running time for computing of pI, pbI and pC is O(jX 0j). The
running time for sorting procedure is O(jX 0j log jX 0j). The running time of computing a maximum of gain ratios
for di erent splits is O(jX 0j). Additionally, we should initialize pC array that takes O(M ). The total complexity
of this processing a real-valued attribute in ProcessAttribute procedure is O(M + jX 0j log jX 0j).</p>
        <p>Let us consider a discrete-valued attribute. The cases processing time complexity is O(jX 0j). An information
gain G(X ; B) for some discrete attribute B is calculated with O(M t) running time, where t is a number of
attribute values, M is a number of classes. An entropy before cutting I(X 0) is calculated with O(M ) running
time, an entropy after cutting is calculated in O(M t). The potential information P (X ; B) is calculated with
O(t) running time. The gain ratio is calculated with O(1) running time. Therefore the running time of processing
of one discrete-valued attribute in ProcessAttribute procedure is O(jX 0j + M t).</p>
        <p>Note that if we consider all X 0 sets of one level of the decision tree, then we collect all elements of X . The
k
running time is O P M + jXi0j log jXi0j O kM + N log N O N M + N log N , because k is a number
i=1
of nodes on one level and k</p>
        <sec id="sec-3-4-1">
          <title>O N log N . The running time for discrete-valued attributes is O</title>
          <p>O N + M
complexity for the whole tree is O(hd (M
k k
N , O P jXi0j log jXi0j O P jXi0j log N
i=1 i=1
k
P jXi0j + M
i=1
N . Therefore, the total complexity for one level is O(d (M
N + N log N ))
k
= O log N P
i=1</p>
          <p>jXi0j
t</p>
          <p>O N + M</p>
          <p>t k</p>
        </sec>
        <sec id="sec-3-4-2">
          <title>N + N log N )), and the total</title>
          <p>4
4.1</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Improvement of the Classical C4.5/C5.0 algorithms</title>
      <sec id="sec-4-1">
        <title>Improvement of Discrete-valued Attributes Processing</title>
        <p>If we process a discrete-valued attribute from DV , then we can compute the value of the object function when we
split all elements of X 0 according value of the attribute. So Xw = fi : Xi 2 X 0; xiattr = wg, for w 2 f1; : : : ; Tattrg.</p>
        <p>We will process all vectors of X 0 one by one. Let us consider processing of current u-th vector Xiu such that
yiu = j and xiauttr = w. Let us compute the following variables: Nw is a number of elements of Xw; Cj is a
number of vectors from X 0 that belongs to the class j; Cj;w is a number of vectors from Xw that belongs to the
class j; P is a potential information; Iw is I(Xw); I is information of X 0; S = G(X 0; B) I(X). Assume that
these variables contains values after processing u-th vector and N w0; C0 ; Cj0;w; P 0; Iw0; I0 and S0 contains values
j
before processing u-th vector. The nal values of the variables will be after processing all z = jX 0j variables. We
will recompute each variable according to the formulas from Table 1 (only variables that depends on j and w
are changed)</p>
        <p>Nw
Cj
Cj;w</p>
        <p>N w0</p>
        <p>1
Cj + 1</p>
        <p>Cj0;w + 1</p>
        <p>P
Iw</p>
        <p>P 0
I0
w</p>
        <sec id="sec-4-1-1">
          <title>So, nally we obtain the new ProcessDiscrete procedure.</title>
          <p>Nzw0 log Nzw0 + Nzw log Nzw
CNj0;w0w log CNj0;w0w + CNj;ww log CNj;ww
S</p>
          <p>I0
S0</p>
          <p>Czj0 log Czj0 + Czj log Czj
Nzw0 log Nzw0 + Nzw0 log Nzw0
4.2</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>Using a Self-balancing Binary Search Tree</title>
        <p>
          We suggest the following improvement. Let us use a self-balancing binary search tree [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] data structure for pCj [u]
and Cj;w. As a self-balancing binary search tree we can use the AVL tree [
          <xref ref-type="bibr" rid="ref5 ref9">5, 9</xref>
          ] or the Red-Black tree [
          <xref ref-type="bibr" rid="ref15 ref9">15, 9</xref>
          ].
This data structure can be used for implementation of mapping from set of indexes to set of values. We always
mean that the data structure contains only indexes with a non-zero value, and other values are zero. We use
indexes of non-zero elements as key for constructing the search tree and values as additional data that is stored
in a corresponding node of the tree. In the paper we call this data structure as Tree Map. The data structure
has three properties on running time. (i) Running time of adding, removing and inserting a new index (that
is called key) to the data structure is O(log s), where s is a number of keys in the tree or a number of indexes
with non-zero values. (ii) Running time of nding a value by index and modi cation of the value is O(log s)
(iii)Running time of removing all indexes from the data structure and checking all indexes of data structure is
O(s), where s is a number of indexes with non-zero values.
        </p>
        <p>If we use Tree Map, then we can provide the following running time.</p>
        <p>Lemma 1 The running time of C5.0 that uses Tree Map (Self-balancing binary search tree) is O(h d N log N )).
Proof The proof is similar to the proof of Theorem 1, with the following exceptions. If we do not need to
initialize the pCj [u] and Cj;w, but erase these values after processing an attribute, then this procedure takes O(jX j
0 )
steps. So, the running time for processing a real-valued attribute becomes O(N log N + N log N ) = O(N log N ),
and for a discrete-valued attribute, it is O(N log N ) because we process each vector one by one and recompute
variables that takes only O(log N ) steps for updating values of Cj;w and O(1) steps for other actions. Therefore,
the total complexity is O(hd N log N ).
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Quantum C5.0</title>
      <p>The key idea of the improved version of C5.0 algorithm is using the Durr and H yer's algorithm for maximum
search and Amplitude Ampli cation algorithm. These two algorithms in combination has the following property:
Lemma 2 Suppose, we have a function f : f1; : : : ; Kg ! R such that the running time of computing f (x) is
T (K). Then, there is a quantum algorithm that nds argument x0 of maximal f (x0), the expected running time
of the algorithm is O(pK T (K)) and the success probability is at least 12 .</p>
      <p>
        Proof For prove we can use Durr and H yer's for minimum search [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] with replacing Grover's Search
algorithm by Amplitude ampli cation version for computing f (x) from [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>Using this Lemma we can replace the maximum search by attribute in ChooseSplit function and use
ProcessAttribute as function f . Let us call the function QChooseSplit. Additionally, for reducing an error
probability, we can repeat the maximum nding process log d times and choose the best solution. The procedure
is presented in Algorithm QChooseSplit.</p>
      <p>Theorem 2 The running time of the Quantum C5.0 algorithm is O (hpdN log N ) log d . The success
probability of QC5.0 is O (1 d1 )k , where k is a number of inner nodes (non leaf ).
Proof The running time of ProcessAttribute is O(jX 0j log jX 0j). So the running time of maximum
sseuamrcthhinegruisnOni(npgdtjiXm0ej lfoogrjaXll0jn).odWesit,hthreenpewateinogbttahienaOlgohrpithdmN,ltohgeNru)nlongindg.tiTmheeissuOcc(pesdsjpXr0ojbloagbijlXit0yj loofgtdh)e. DIfuwrer
and H yer's algorithm is 21 . We call it log d times and choose a maximum among log d values of gain ratios.
Then, we nd a correct attribute for one node with a success probability O 1 2lo1g d = O 1 d1 . We should
nd correct attributes for all nodes except leaves. Thus, the success probability for the whole tree is equal to
O (1 d1 )k , where k is a number of internal nodes (non leaf).
6</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>Firstly, we have suggested a version of the C4.5/C5.0 algorithm with Tree Map (Self-balancing binary search tree,
for example Read-Black tree or AVL tree) data structure. This version has a better running time. Secondly, we
have presented a quantum version of the C5.0 algorithm for classi cation problem. This algorithm demonstrates
almost quadratic speed-up with respect to a number of attributes.</p>
      <sec id="sec-6-1">
        <title>Acknowledgements</title>
        <p>The work is supported by Russian Scienti c Found, project No. 19-19-00656.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <issue>C5</issue>
          .
          <article-title>0: An informal tutorial</article-title>
          ,
          <year>2019</year>
          . url=https://www.rulequest.com/see5-unix.html.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>F.</given-names>
            <surname>Ablayev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ablayev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Khadiev</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Vasiliev</surname>
          </string-name>
          .
          <article-title>Classical and quantum computations with restricted memory</article-title>
          .
          <source>LNCS</source>
          ,
          <volume>11011</volume>
          :
          <fpage>129</fpage>
          {
          <fpage>155</fpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>F.</given-names>
            <surname>Ablayev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ambainis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Khadiev</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Khadieva</surname>
          </string-name>
          .
          <article-title>Lower bounds and hierarchies for quantum memoryless communication protocols and quantum ordered binary decision diagrams with repeated test</article-title>
          .
          <source>In SOFSEM, LNCS</source>
          ,
          <volume>10706</volume>
          :
          <fpage>197</fpage>
          {
          <fpage>211</fpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>F.</given-names>
            <surname>Ablayev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gainutdinova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Khadiev</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <surname>A.</surname>
          </string-name>
          <article-title>Yakary lmaz. Very narrow quantum OBDDs and width hierarchies for classical OBDDs</article-title>
          .
          <source>Lobachevskii Journal of Mathematics</source>
          ,
          <volume>37</volume>
          (
          <issue>6</issue>
          ):
          <volume>670</volume>
          {
          <fpage>682</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>George</surname>
            <given-names>M</given-names>
          </string-name>
          <string-name>
            <surname>Adel</surname>
          </string-name>
          <article-title>'son-Vel'skii and Evgenii Mikhailovich Landis</article-title>
          .
          <article-title>An algorithm for organization of information</article-title>
          .
          <source>In Doklady Akademii Nauk</source>
          , volume
          <volume>146</volume>
          , pages
          <fpage>263</fpage>
          {
          <fpage>266</fpage>
          . Russian Academy of Sciences,
          <year>1962</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Ambainis</surname>
          </string-name>
          .
          <article-title>Understanding quantum algorithms via query complexity</article-title>
          .
          <source>arXiv:1712.06349</source>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>S.</given-names>
            <surname>Arunachalam</surname>
          </string-name>
          and R. de Wolf.
          <article-title>Guest column: a survey of quantum learning theory</article-title>
          .
          <source>ACM SIGACT News</source>
          ,
          <volume>48</volume>
          (
          <issue>2</issue>
          ):
          <volume>41</volume>
          {
          <fpage>67</fpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>G.</given-names>
            <surname>Brassard</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          <article-title>H yer, M. Mosca, and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Tapp</surname>
          </string-name>
          .
          <article-title>Quantum amplitude ampli cation and estimation</article-title>
          .
          <source>Contemporary Mathematics</source>
          ,
          <volume>305</volume>
          :
          <fpage>53</fpage>
          {
          <fpage>74</fpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>T. H</given-names>
            <surname>Cormen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. E</given-names>
            <surname>Leiserson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. L</given-names>
            <surname>Rivest</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Stein</surname>
          </string-name>
          . Introduction to Algorithms.
          <source>McGraw-Hill</source>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Ronald De Wolf</surname>
          </string-name>
          .
          <article-title>Quantum computing and communication complexity</article-title>
          .
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Durr and</article-title>
          <string-name>
            <surname>P. H yer</surname>
          </string-name>
          .
          <article-title>A quantum algorithm for nding the minimum</article-title>
          .
          <source>arXiv:quant-ph/9607014</source>
          ,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>Alpaydin</given-names>
            <surname>Ethem</surname>
          </string-name>
          .
          <article-title>Introduction to machine learning</article-title>
          .
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>J. H.</given-names>
            <surname>Friedman</surname>
          </string-name>
          .
          <article-title>Greedy function approximation: A gradient boosting machine</article-title>
          .
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>Lov</surname>
            <given-names>K</given-names>
          </string-name>
          <string-name>
            <surname>Grover</surname>
          </string-name>
          .
          <article-title>A fast quantum mechanical algorithm for database search</article-title>
          .
          <source>In Proceedings of the twenty-eighth annual ACM symposium on Theory of computing</source>
          , pages
          <volume>212</volume>
          {
          <fpage>219</fpage>
          . ACM,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>L. J</given-names>
            <surname>Guibas</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Sedgewick</surname>
          </string-name>
          .
          <article-title>A dichromatic framework for balanced trees</article-title>
          .
          <source>In Proceedings of SFCS 1978</source>
          , pages
          <fpage>8</fpage>
          <lpage>{</lpage>
          21. IEEE,
          <year>1978</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>T.</given-names>
            <surname>Hastie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Tibshirani</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J. H.</given-names>
            <surname>Friedman</surname>
          </string-name>
          .
          <article-title>The Elements of Statistical Learning:Data Mining, Inference, and</article-title>
          <string-name>
            <given-names>Prediction. Second</given-names>
            <surname>Edition</surname>
          </string-name>
          .
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>EB</given-names>
            <surname>Hunt</surname>
          </string-name>
          .
          <source>Concept learning: An information processing problem</source>
          .
          <year>1962</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>R.</given-names>
            <surname>Ibrahimov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Khadiev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Prusis</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Yakarylmaz</surname>
          </string-name>
          .
          <article-title>Error-free a ne, unitary, and probabilistic OBDDs</article-title>
          .
          <source>Lecture Notes in Computer Science</source>
          ,
          <volume>10952</volume>
          LNCS:
          <volume>175</volume>
          {
          <fpage>187</fpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>Stephen</given-names>
            <surname>Jordan</surname>
          </string-name>
          .
          <article-title>Bounded error quantum algorithms zoo</article-title>
          . https://math.nist.gov/quantum/zoo.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>K.</given-names>
            <surname>Khadiev</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Khadieva</surname>
          </string-name>
          .
          <article-title>Reordering method and hierarchies for quantum and classical ordered binary decision diagrams</article-title>
          .
          <source>In CSR</source>
          <year>2017</year>
          , volume
          <volume>10304</volume>
          <source>of LNCS</source>
          , pages
          <volume>162</volume>
          {
          <fpage>175</fpage>
          . Springer,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>K.</given-names>
            <surname>Khadiev</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Khadieva</surname>
          </string-name>
          .
          <article-title>Quantum online streaming algorithms with logarithmic memory</article-title>
          .
          <source>International Journal of Theoretical Physics</source>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>K.</given-names>
            <surname>Khadiev</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Khadieva</surname>
          </string-name>
          .
          <article-title>Two-way quantum and classical machines with small memory for online minimization problems</article-title>
          . In International Conference on Micro- and
          <source>Nano-Electronics</source>
          <year>2018</year>
          , volume
          <volume>11022</volume>
          <source>of Proc. SPIE</source>
          , page
          <year>110222T</year>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>K.</given-names>
            <surname>Khadiev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Khadieva</surname>
          </string-name>
          ,
          <string-name>
            <surname>and I. Mannapov.</surname>
          </string-name>
          <article-title>Quantum online algorithms with respect to space and advice complexity</article-title>
          .
          <source>Lobachevskii Journal of Mathematics</source>
          ,
          <volume>39</volume>
          (
          <issue>9</issue>
          ):
          <volume>1210</volume>
          {
          <fpage>1220</fpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>K.</given-names>
            <surname>Khadiev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Kravchenko</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Serov</surname>
          </string-name>
          .
          <article-title>On the quantum and classical complexity of solving subtraction games</article-title>
          .
          <source>In Proceedings of CSR</source>
          <year>2019</year>
          , volume
          <volume>11532</volume>
          <source>of LNCS</source>
          , pages
          <volume>228</volume>
          {
          <fpage>236</fpage>
          .
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>K.</given-names>
            <surname>Khadiev</surname>
          </string-name>
          and
          <string-name>
            <surname>L.</surname>
          </string-name>
          <article-title>Sa na. Quantum algorithm for dynamic programming approach for dags. applications for zhegalkin polynomial evaluation and some problems on dags</article-title>
          .
          <source>In Proceedings of UCNC</source>
          <year>2019</year>
          , volume
          <volume>4362</volume>
          <source>of LNCS</source>
          , pages
          <volume>150</volume>
          {
          <fpage>163</fpage>
          .
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>R.</given-names>
            <surname>Kohavi</surname>
          </string-name>
          and
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Quinlan</surname>
          </string-name>
          .
          <article-title>Data mining tasks and methods: Classi cation: decision-tree discovery. Handbook of data mining and knowledge discovery</article-title>
          . Oxford University Press,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <surname>Dawid</surname>
            <given-names>Kopczyk.</given-names>
          </string-name>
          <article-title>Quantum machine learning for data scientists</article-title>
          .
          <source>arXiv preprint arXiv:1804.10068</source>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <surname>Breiman</surname>
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Friedman</surname>
            <given-names>J. H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Olshen</surname>
            <given-names>R. A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Stone</surname>
            <given-names>C. J.</given-names>
          </string-name>
          <article-title>Classi cation and regression trees</article-title>
          .
          <year>1984</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>Francois</given-names>
            <surname>Le Gall</surname>
          </string-name>
          .
          <article-title>Exponential separation of quantum and classical online space complexity</article-title>
          .
          <source>Theory of Computing Systems</source>
          ,
          <volume>45</volume>
          (
          <issue>2</issue>
          ):
          <volume>188</volume>
          {
          <fpage>202</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <surname>M. A Nielsen</surname>
            and
            <given-names>I. L</given-names>
          </string-name>
          <string-name>
            <surname>Chuang</surname>
          </string-name>
          .
          <article-title>Quantum computation and quantum information</article-title>
          . Cambridge univ. press,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          [31]
          <string-name>
            <surname>J R. Quinlan</surname>
          </string-name>
          .
          <article-title>Discovering rules by induction from large collections of examples</article-title>
          .
          <source>Expert systems in the micro electronics age</source>
          ,
          <year>1979</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          [32]
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Quinlan</surname>
          </string-name>
          .
          <article-title>Induction of decision trees</article-title>
          .
          <source>Machine learning</source>
          , pages
          <volume>81</volume>
          {
          <fpage>106</fpage>
          ,
          <year>1986</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          [33]
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Quinlan</surname>
          </string-name>
          .
          <article-title>Simplifying decision trees</article-title>
          .
          <source>International journal of man-machine studies</source>
          ,
          <volume>27</volume>
          (
          <issue>3</issue>
          ):
          <volume>221</volume>
          {
          <fpage>234</fpage>
          ,
          <year>1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          [34]
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Quinlan</surname>
          </string-name>
          .
          <article-title>Improved use of continuous attributes in c4.5</article-title>
          .
          <source>Journal of Arti cial Intelligence Research</source>
          , pages
          <volume>77</volume>
          {
          <fpage>90</fpage>
          ,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          [36]
          <string-name>
            <given-names>M.</given-names>
            <surname>Schuld</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Sinayskiy</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Petruccione</surname>
          </string-name>
          .
          <article-title>The quest for a quantum neural network</article-title>
          .
          <source>Quantum Information Processing</source>
          ,
          <volume>13</volume>
          (
          <issue>11</issue>
          ):
          <volume>2567</volume>
          {
          <fpage>2586</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          [37]
          <string-name>
            <given-names>M.</given-names>
            <surname>Schuld</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Sinayskiy</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Petruccione</surname>
          </string-name>
          .
          <article-title>An introduction to quantum machine learning</article-title>
          .
          <source>Contemporary Physics</source>
          ,
          <volume>56</volume>
          (
          <issue>2</issue>
          ):
          <volume>172</volume>
          {
          <fpage>185</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>