<!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>Logical Representation of Dependencies of Items and the Complexity of Customer Sets</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>János Demetrovics</string-name>
          <email>demetrovics@sztaki.hu</email>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hua Nam Son</string-name>
          <email>huanamson@yahoo.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ákos Gubán</string-name>
          <email>guban.akos@pszfb.bgf.hu</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>BCI'12, September 16-20, 2012, Novi Sad, Serbia.</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Budapest Business School</institution>
          ,
          <addr-line>Buzogány u. 11-13, 1149 Budapest</addr-line>
          ,
          <country country="HU">Hungary</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Budapest Business School</institution>
          ,
          <addr-line>Buzogány u. 11-13, 1149 Budapest</addr-line>
          ,
          <country country="HU">Hungary</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Copyright c 2012 by the paper's authors. Copying permitted only for private and</institution>
          ,
          <addr-line>academic purposes. This volume is published and copyrighted by its editors., Local Proceedings also appeared in ISBN 978-86-7031-200-5</addr-line>
          ,
          <institution>Faculty of Sciences, University of Novi Sad.</institution>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>MTA SZTAKI</institution>
          ,
          <addr-line>Lágymányosi u. 11, 1111 Budapest</addr-line>
          ,
          <country country="HU">Hungary</country>
        </aff>
      </contrib-group>
      <fpage>5</fpage>
      <lpage>10</lpage>
      <abstract>
        <p>The problem of discovering of frequent market baskets and association rules has been considered widely in literatures of data mining. In this study, by using the algebraic representation of market basket model, we propose a concept of logical constraints of items in an effort to detect the logical relationships hidden among them. Via the relationships of the propositional logics and logical constraints of items we propose also the concept of the complexity of customers. As a result we show that every set of customers can be characterized by a logical constraint and can be divided into different blocks that are characterized by quite simple logical constraints. In the natural way the complexity of a customer set is defined as the number of the blocks it contains.</p>
      </abstract>
      <kwd-group>
        <kwd>Market basket model</kwd>
        <kwd>frequent product</kwd>
        <kwd>propositional logics</kwd>
        <kwd>lattice</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>
        Great efforts have been made to discover the information
hidden in the sets of market baskets and in the sets of
customer transactions. The studies of customer market
baskets (MB) and mining the association rules are important
in various applications, for example, in decision making and
strategy determination of retail economy ([1]). Therefore
discovering of large itemsets and association rules attracts
the interest of researchers (see [
        <xref ref-type="bibr" rid="ref10 ref8">8,10</xref>
        ]). One can notice that
in their studies the researchers deal with the set of items
(e.g. bread, milk,....) purchased by customers, but did not
consider the quantity of each item. It would be interesting
also if we know that 70% of customers buy bread and milk,
but only 50% of customers buy 1 kg bread and 2 litter milk,
while 1% of customers buy 10 kg bread and 1 litter milk.
Similar example can be found for association rules. The
reasons for quantitative analysis of transactions are evident.
      </p>
      <p>
        In the previous studies (see [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ]) we have introduced a
quantitative analysis of transactions. We are interested not
only in the statement ”90% of customers who buy bread and
milk also buy butter”, but in the fact ”90% of customers who
buy 1 kg bread and 2 litter milk also buy 0,5 kg butter”. By
dealing with the quantity of items our approach is somehow
different of those in other studies (see [1]) and is suitable for
a quantitative analysis of transactions.
      </p>
      <p>
        Similarly to [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ], instead of itemsets we use market
baskets or transactions. In the following we establish the
relationships between the structure of the set of market baskets
and propositional logics. In Section 2 we recall the algebraic
approach in analysing the structure of the set of market
baskets which was defined in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. In Section 3 the concept of the
constraints of market baskets is defined and we show that
every set of market baskets can be characterized by some
logical constraint. In Section 4 we introduce the concept of
complexity of the sets of market baskets, which we call by
the complexity of the customer sets. All these are done via
the relationship between the structure of the set of market
baskets and propositional logics which are defined in this
section.
2.
      </p>
      <p>A GENERALIZATION OF THE MARKET
BASKET MODEL</p>
      <p>
        In this section we recall the concepts and results that
are established in [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ]. For a finite set of items P =
{p1, p2, ..., pn} we consider a market basket (MB) as a tube
α = (α[1], α[2], ..., α[n]), where α[i] ∈ N is the quantity of pi
in the basket α. The set of all MBs is denoted by Ω. For
α, β ∈ Ω where α = (α[1], α[2], ..., α[n]), β = (β[1], β[2], ...,
β[n]) we write α ≤ β if for all i = 1, 2, ..., n we have α[i] ≤
β[i]. hΩ, ≤i is a lattice with the natural partial order ≤
(see [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]). For a set A ⊆ Ω we denote
      </p>
      <p>U (A) = {α ∈ Ω|∀β ∈ A : β ≤ α} and</p>
      <p>L(A) = {α ∈ Ω|∀β ∈ A : α ≤ β}.</p>
      <p>We denote also by sup(A) and inf (A) the smallest, and the
biggest MB in U (A) and L(A), respectively.</p>
      <p>For a set A ⊆ Ω and α ∈ Ω we denote by
suppA(α) =
|{β ∈ A|α ≤ β}|
|A|
the support of α in A. In word, suppA(α) denotes the rate
of all market baskets that exceeds the given threshold (in
the form of a sample market basket) α to A. The support
of an market basket is a statistical index by which one can
estimate the ”vogue” of α in the given group of customers A.
Naturally, the market baskets of more support attract better
the attention of the shop managers. Some semantic
interpretations are needed to avoid the possible misunderstandings:
If pi (the name of i-th item) is, for example, bread, then αi
is the quantity of bread in the basket (of the customer) α.
For α, β ∈ Ω where α = (α[1], α[2], ..., α[n]) and β = (β[1],
β[2], ..., β[n]) we write γ = α ∪ β if γ[i] = max{α[i], β[i]} for
all i = 1, 2, ..., n. We call α −→ β an association rule of β
to α. By the confidence of α −→ β in a set of MBs A we
mean the rate
confA(α −→ β) =
suppA(α ∪ β)
suppA(α)
For a set A ⊆ Ω, α ∈ Ω and 0 ≤ ε ≤ 1, α is ε-frequent MB,
if suppA(α) ≥ ε. The set of all ε-frequent MBs is denoted by
ΦεA. In our setting the Apriori Principle is stated as follows:
a threshold 0 ≤ ε ≤ 1 there exist α1, α2, ..., αs ∈ Ω where
s = |⌈Aε||A|⌉ such that</p>
      <p>s
ΦεA = [ L(αi).</p>
      <p>
        i=1
We should remark that αi ≤ αj iff L(αi) ⊆ L(αj ). For a set
of MBs A and a given threshold ε the basic ε- frequent set
of MBs of A is the set of MBs α1, α2, ..., αs for which
s
i. ΦεA = Si=1 L(αi).
ii. ∀i, j : 0 ≤ i, j ≤ s we have αi
αj and αj
αi
For a given A, ε the basic ε- frequent set of MBs of A is
ε
unique, which we denote by SA. We have:
Apriori Principle: For a set A ⊆ Ω, α, β ∈ Ω and 0 ≤ ε ≤
1, if α ≤ β and β is ε-frequent then α is ε-frequent.
The following example was considered in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]:
Theorem 3: For a set of items P , a threshold 0 ≤ ε ≤ 1
every set of MBs A ⊆ Ω has an unique basic ε- frequent set
ε
of MBs SA.
of A are:
Example 1: Consider a set of items P = {a, b, c} and a
set of transactions A = {α, β, γ, δ}, where α = (2, 1, 0),
β = (1, 1, 1), γ = (1, 0, 1), δ = (2, 2, 0). One can see that
3
      </p>
      <p>and
4
the ε-frequent MBs
for σ = (1, 1, 0), η = (1, 2, 0) we have suppA(σ) =
1 1
suppA(η) = . For the threshold ε =</p>
      <p>4 2
1
ΦA2 = {(2, 1, 0), (1, 0, 1), (1, 1, 0), (2, 0, 0),</p>
      <p>(0, 0, 1), (0, 1, 0), (1, 0, 0), (0, 0, 0)}.</p>
      <sec id="sec-1-1">
        <title>Let us denote</title>
        <p>ΦA,k = {α ∈ Ω|∃α1, α2, ..., αk ∈ A : α ≤ {α1, α2, ..., αk}}</p>
        <p>
          One can remark that if k ≤ l then ΦA,k ⊇ ΦA,l and ΦεA =
ΦA,k where k = ⌈ε|A|⌉ denotes the smallest integer that is
greater or equal to ε|A|. We have Theorem 1 and Theorem
2 (see [
          <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
          ] for the proof):
Theorem 1: For a set of items P = {p1, p2, ..., pn}, a set
of MBs A ⊆ Ω and a threshold 0 ≤ ε ≤ 1 an MB α ∈ Ω
is ε-frequent iff there exist α1, α2, ..., αk ∈ A such that α ∈
L({α1, α2, ..., αk}) where k = ⌈ε|A|⌉.
        </p>
        <p>
          By Theorem 1 in [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] we have proposed an algorithm that
creates all ε-frequent MBs of a given set of transactions A
in O |kA| . (m + 1)n running time.
        </p>
        <p>Algorithm 1: (Creating all ε-frequent MBs of a given set
of transactions A)
Input: Set of items P , Set of MBs A ⊆ Ω and a threshold
0 ≤ ε ≤ 1.</p>
        <p>Output: ΦεA.</p>
        <p>Theorem 2: (Explicit representation of large MBs) For a
set of items P = {p1, p2, ..., pn}, a set of MBs A ⊆ Ω and</p>
        <p>
          An algorithm that creates the basic ε- frequent set of MBs
O |kA| .m.n in running time for a given set of MBs A ⊆ Ω
and a given threshold ε is proposed in [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]:
Algorithm 2: (Creating the basic ε- frequent set of MBs
SAε)
Input: Set of items P , Set of MBs A ⊆ Ω and a threshold
0 ≤ ε ≤ 1.
        </p>
        <p>Output:SAε
One can remark that in the case of large amount of
transactions A the basic ε - frequent set of MBs SAε can be generated
much more quickly than the set of all ε-frequent set of MBs
ΦεA.</p>
        <p>Example 2: We continue the Example 1. For the set of
transactions A Algorithm 2 generates the basic 21 - frequent
1
set of MBs SA2 = {ρ, θ} where ρ = (2, 1, 0), θ = (1, 0, 1).
It means that the family of 21 - frequent set of MBs of A is
1
ΦA2 = L(ρ) ∪ L(θ).</p>
        <p>
          As shown in [
          <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
          ] we can find all associations with given
confidence. For a set of items P , a set of MBs A ⊆ Ω and a
threshold 0 ≤ ε ≤ 1 an association α −→ β is ε-confident if
confA(α −→ β) ≥ ε. The set of all ε-confident associations
of A is denoted by CAε. We have:
Theorem 4: For a set of products P , a set of MBs A ⊆ Ω
and 0 ≤ ε ≤ 1 an association α −→ β is ε-confident iff
|U (α ∪ β) ∩ A|
        </p>
        <p>≥ ε.</p>
        <p>|U (α) ∩ A|
A natural question for cross marketing, store layout, ...(see,
for example, [1]) is to find all association rules with a given
confidence. In our generalized model the following theorem
shows in a sense an explicit representation of all association
rules. More exactly, we show for a given MB α which set
of MBs β may be associated to α with a given threshold of
confidence.
over P . We define the logical constraints of MBs (for short,
constraint) as follows:</p>
      </sec>
      <sec id="sec-1-2">
        <title>For MBs ρ, σ where ρ ≤ σ, let us denote</title>
        <p>M (ρ, σ) = {η ∈ Ω|ρ ∪ η ≤ σ}
It should be remarked that M (ρ, σ) can be represented
explicitly. If ρ = (ρ1, ρ2, ..., ρs), σ = (σ1, σ2, ..., σs) then η =
(η1, η2, ..., ηs) ∈ M (ρ, σ) if and only if max (ρi, ηi) = σi for
all i = 1, 2, ..., s, i.e. ηi = σi in the case ρi σi and ηi ≤ σi
in the case ρi = σi.</p>
        <p>
          Theorem 5: (Explicit representation of association rules)
For a set of items P = {p1, p2, ..., pn}, a set of MBs A ⊆
Ω, an MB α ∈ Ω and a threshold 0 ≤ ε ≤ 1 there exist
α1, α2, ..., αk ∈ Ω such that ∀β ∈ Ω : α −→ β is ε-confident
k
association rule if and only if β ∈ Si=1 M (α, αi).
It was showed in [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] that Theorem 5 in a sense gives an
explicit presentation for association rules and by the following
algorithm one can find all ε-confident association rules for
given left side.
        </p>
        <p>Algorithm 3: (Creating all ε- confident association rules
α −→ β for given α)
Input: A set of items P , a set of MBs A ⊆ Ω, a threshold
0 ≤ ε ≤ 1 and an MB α.</p>
        <p>k
Output: Si=1 M (α, αi).</p>
        <p>Example 3: We continue the Example 1. For the set of
MBs A (see Example 1), the MB σ = (1, 1, 0) and
threshold ε = 12 we should find all MB η such that σ −→ η
is ε- confident association rule. We can see U (σ) ∩ A =
{(2, 1, 0), (1, 1, 1), (2, 2, 0)} and s := ⌈ε|U (α) ∩ A|⌉ = 2. By
step 2 in Algorithm 3 we have k = 4 and α1 = (1, 1, 0),
α2 = (2, 1, 0). The set of all MBs η such that σ −→ η is 21
confident association rule is</p>
        <p>M (σ, α1) ∪ M (σ, α2) = {(1, 1, 0), (1, 0, 0), (0, 1, 0),
(0, 0, 0), (2, 1, 0), (2, 0, 0)}
As a result we can see t h′at besides′ the trivial association
rules of the form σ −→ σ , where σ ≤ σ we got non-trivial
association rules σ −→ (2, 1, 0) and σ −→ (2, 0, 0). In words,
in the set of customers A more than 50% of customers that
buy a and b also buy 2 a and 1 b items, as well more than
50% of customers who buy a and b also buy 2 a items.</p>
        <p>LOGICAL CONSTRAINTS OF MARKET
BASKETS</p>
        <p>In this section we propose a concept of constraints of MBs
which we call the logical constraints of MBs. The reason for
our attempt is clear: The constraint (¬α) where α means
the meat certainly holds with high support for the vegetarian
customer groups, while the constraint (α ∧ β) −→ γ
seemingly gains high support from the householder customers, if
α, β and γ means milk, egg and flour respectively. In the
same way one can easily see that γ −→ α∨β holds commonly
for any customer groups.</p>
        <p>Let us construct the logical constraints of MBs. For a set
of items P = {p1, p2, ..., pn} let Ω be the set of all MBs
1. All α ∈ Ω are constraints. In this case π(α) = U (α) =
{β ∈ Ω|α ≤ β} ⊆ Ω.
2. If α is a constraint then (¬α) is a constraint and π(¬α) =
(π(α))c where by Ac we denote Ω \ A for A ⊆ Ω</p>
      </sec>
      <sec id="sec-1-3">
        <title>3. If α, β are constraints then</title>
        <p>(α ∨ β) is a constraint and π(α ∨ β) = π(α) ∪ π(β).
(α ∧ β) is a constraint and π(α ∧ β) = π(α) ∩ π(β).
4. All constraints are constructed as in 1., 2. and 3.
As usual, the parentheses are omitted where it causes no
confusion. We call π(α) the set of supporting market baskets
of α. Two constraints α, β are equivalent, noted by α ≡ β,
if π(α) = π(β). A constraint is tautology if π(α) = Ω. The
set of all constraints is denoted by C(Ω).</p>
        <p>The following properties of propositions in propositional
calculus hold also for the constraints:
1. If α, β, γ ∈ GI(Ω) are constraints then
α ∨ β ≡ β ∨ α,
α ∧ β ≡ β ∧ α
α ∨ (β ∨ γ) ≡ (α ∨ β) ∨ γ,
α ∧ (β ∧ γ) ≡ (α ∧ β) ∧ γ</p>
      </sec>
      <sec id="sec-1-4">
        <title>3. If α, β are constraints then</title>
        <p>¬(α ∧ β) ≡ ¬α ∨ ¬β and
¬(α ∨ β) ≡ ¬α ∧ ¬β
2. If α ∈ GI(Ω) is a constraint then ¬(¬α) ≡ α.
4. For α, β ∈ GI(Ω) the notation α → β is used also for
¬α ∨ β.</p>
        <p>The above identities are always true. We call these identities
the logical identities. It is easy to see that for a given A in
the same way we can define πA(α) = π(α) ∩ A, which we
call the relative set of supporting MBs of α. Similarly we say
that two constraints α, β are relatively equivalent (in A),
noted by α ≡A β, if πA(α) = πA(β). It is easy to verify the
following theorem:</p>
        <sec id="sec-1-4-1">
          <title>Theorem 6:</title>
          <p>1. For any finite set of MBs A ⊆ Ω there is a constraint
α∗A ∈ GI(Ω) such that π(α∗A) = A.
2. For all β, γ ∈ GI(Ω), β ≡A γ if and only if β ∧ α∗A ≡
γ ∧ α∗A.</p>
          <p>Proof:
1) For any finite set of MBs A ⊆ Ω we find the constraint
αA ∈ GI(Ω) such that π(α∗A) = A. If P = {p1, p2, ..., pn},
∗
ρ = (ρ[1], ρ[2], ..., ρ[n]) ∈ Ω then let</p>
        </sec>
      </sec>
      <sec id="sec-1-5">
        <title>One can see that</title>
        <p>ρi+ = (ρ[1], ρ[2], ..., ρ[i] + 1, ..., ρ[n]).</p>
        <p>n n
{ρ} = π(ρ) \ [ π(ρi+) = π(ρ ∧ ^ ¬(ρi+)).</p>
        <p>i=1 i=1
n
α∗A = _ [ρ ∧ ^ ¬(ρi+)]</p>
        <p>ρ∈A i=1
We have A = π(α∗A).
2) The assertion is proved easily by using the definitions. We
have β ≡A γ ⇐⇒ πA(β) = πA(γ) ⇐⇒ π(β) ∩ A = π(γ) ∩ A
⇐⇒ β ∧ α∗A ≡ γ ∧ α∗A.</p>
        <p>The proof is completed.</p>
        <p>One can remark that there are two trivial cases: The first
is the case, when α∗A is tautology. In this case ≡A coincides
with ≡. This coincidence does not hold in general. We call
a set of customers (transactions) complete if αA is tautology.
The second one is the case when α∗A is tautologically false.
For β ∈ GI(Ω) we denote βA = β ∧ α∗A.</p>
        <p>Example 4: We continue the Example 1. Let P = {a, b, c}
and a set of transactions A = {α, β, γ, δ}, where α = (2, 1, 0),
β = (1, 1, 1), γ = (1, 0, 1), δ = (2, 2, 0). If a = ”Flour”, b =
”Egg”, c = ”Milk”, which can be identified by a = (1, 0, 0),
b = (0, 1, 0), and c = (0, 0, 1), respectively, then
π(a) = U ((1, 0, 0)) = {(x, y, z)|x ≥ 1},
πA(a) = {α, β, γ, δ}
π(b) = U ((0, 1, 0)) = {(x, y, z)|y ≥ 1},
πA(b) = {α, β, δ}
π(c) = U ((0, 0, 1)) = {(x, y, z)|z ≥ 1}
πA(c) = {β, γ}
In this case the constraint a ∧ b → c that may be interpreted
as F lour ∧ Egg → M ilk, characterises those customers, who
if buy Flour and Egg then must buy Milk. It is easy to see
that the set of supporting MBs of this constraint is π(a∧b →
c) = {(x, y, z)|x = 0 or y = 0 or z ≥ 1}. One also can see
that in this case πA(a ∧ b → c) = π(a ∧ b → c) ∩ A = {β, γ},
i.e. (a ∧ b → c) ≡A c.</p>
        <p>
          It is easily to see that the properties of propositions in
propositional calculus (see [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]) hold also for the constraints
in the given set of customers, but the converse is not always
true. Although one can verify the following for α, β ∈ GI(Ω)
and an arbitrary set of customers A:
1. (α ∨ β)A ≡A βA ∨ αA.
2. (α ∧ β)A ≡A βA ∧ αA.
        </p>
        <p>3. (¬α)A ≡A ¬(αA).</p>
      </sec>
      <sec id="sec-1-6">
        <title>One should distinguish ≡A and ≡.</title>
        <p>THE COMPLEXITY OF THE CUSTOMER
SETS
In this section we propose a criteria for the complexity of the
customer sets. The practical aspect of this attempt is clear:
every shop manager want have the answer to the question
how complex is their customer set. One can remark that the
set of customers that contains only one customer is simple.
An other simple customer set is the case when the
transactions of the customer in the set (that may be a large mass)
are ”similar” in some way. In our version the concept of
complexity may be understood as following.</p>
        <p>Let P = {p1, p2, ..., pn} be a a finite set of items and Ω be the
set of MBs over P . We recall that U (α) = {β ∈ Ω|α ≤ β}
for α ∈ Ω. We call a set B ⊆ Ω a block of customers if there
are α1, α2, . . . , αm ∈ Ω, β1, β2, . . . , βn ∈ Ω such that
m n
B = \ U (αk) \ [ U (βk)</p>
        <p>k=1 k=1
The block is denoted by [α1, α2, . . . , αm|β1, β2, . . . , βn]. We
have the following simple theorem:
Theorem 7: Let P = {p1, p2, ..., pn} be a a finite set of
items and Ω be the set of all MBs over P .</p>
        <p>1. Every γ ∈ Ω is a block, i.e. there are α1, α2, . . . , αm ∈
Ω, β1, β2, . . . , βn ∈ Ω such that {γ} = [α1, α2, . . . , αm|
β1, β2, . . . , βn].
2. Every A ⊆ Ω is union of some blocks, i.e. there are
0 ≤ k, α1 , α2k, . . . , αkmk ∈ Ω, β1k, β2k, . . . , βnk ∈ Ω such
k k
that</p>
        <p>k
A = [[αi1, αi2, . . . , αimi |β1i, β2i, . . . , βnii ]</p>
        <p>i=1</p>
      </sec>
      <sec id="sec-1-7">
        <title>We denote</title>
        <p>k
c(A) = min{k|∃Bi blocks, i = 1, . . . , k : A = [ Bi}
i=1
k
We call c(A) the complexity of A. If A = Si=1 Bi where
k
k = c(A) then we say that A = Si=1 Bi is a minimal
representation of A by blocks. We should notice that a set A ⊆ Ω
may have different minimal representations, even if we does
not take in account of the permutation of blocks. Let us
consider an example:
Example 5: (Following the Example 4) As considered in
Example 4 let α = (2, 1, 0), β = (1, 1, 1), γ = (1, 0, 1) and
let θ = (1, 1, 2), λ = (1, 0, 2). One can verify</p>
        <p>{γ} = U (γ) \ {U ((2, 0, 1)) ∪ U (β) ∪ U (λ)}
and
{β, γ} = U (γ) \ {U ((2, 0, 1)) ∪ U ((2, 1, 1)) ∪ U (θ) ∪ U (λ)}
Thus we have c({β, γ}) = c({γ}) = 1. One can verify also
that c({α, γ}) = 2.</p>
        <p>We have also c({γ, θ, λ}) = 2 and one can verify that:
{γ, θ, λ}
= [γ|β, λ] ∪ [λ|(1, 2, 2), (1, 0, 3)]
= [γ|β, (1, 0, 3)] ∪ [θ|(1, 2, 2), (1, 1, 3)]</p>
        <p>We use propositional logics in finding the blocks of a given
set of MBs. In propositional logics a full conjunctive clause
is an expression of the form Vn</p>
        <p>
          k=1 xk in which xk are all
variables in either positive or negative form. A full disjunctive
normal form (full DNF) is a disjunction of full conjunctive
clauses. It is well known in propositional logics that all
logical formulas can be transformed into full DNF(see, for
example, [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]). More exactly, if α is a constraint of items
(which is namely a logical formula) then by using simple
transformations we can find the full DNF of α:
        </p>
        <p>n mi ni
α = _[ ^ βki ∧ ^ (¬γki)]
i=1 k=1 k=1
where for all β ∈ Ω, β appear in every clause of α in either
positive or negative form. One can verify that</p>
        <p>mi ni
U ([ ^ βki ∧ ^ (¬γki)]) = [β1i, . . . , βmii |γ1i, . . . , γnii ]
k=1 k=1
is a block. By this in fact we have proved the following
theorem.</p>
        <sec id="sec-1-7-1">
          <title>Theorem 8:</title>
          <p>1. There is an algorithm by that for any constraint of
MBs α we can find the system of full customer blocks
of U (α), i.e. we can find</p>
          <p>{[αi1, αi2, . . . , αimi |β1i, β2i, . . . , βnii ]|i = 1, 2, . . . , n}
where αi1, αi2, . . . , αimi , β1i, β2i, . . . , βnii are all MBs that
appear in α, such that</p>
          <p>k
U (α) = [[αi1, αi2, . . . , αimi |β1i, β2i, . . . , βnii ]</p>
          <p>i=1
2. The decomposition of U (α) into full customer blocks
is unique.
3. The minimal representations of U (α) can be obtained
by decomposition of U (α) into full customer blocks
and by combining some full customer blocks into one
to reduce the number of blocks.
4. The complexity of U (α) does not exceed the number
of full clauses in the full DNF of α.</p>
          <p>
            Proof:
1. The algorithm that is well known in propositional logics
(see [
            <xref ref-type="bibr" rid="ref9">9</xref>
            ]) converts a constraint of MBs α into full DNF. By
this algorithm we can find the system of full customer blocks
of U (α).
2. This is a result in propositional logics (see [
            <xref ref-type="bibr" rid="ref9">9</xref>
            ]).
3. If
          </p>
          <p>k
U (α) = [[αi1, αi2, . . . , αimi |β1i, β2i, . . . , βnii ]</p>
          <p>i=1
is a minimal representations of U (α) where, for example,
some block [αi1, αi2, . . . , αimi |β1i, β2i, . . . , βnii ] is not full. Then
using the equivalence X ≡ (X ∧ a) ∨ (X ∧ ¬a) we can
insert into the block the missing item a. In result we have
the decomposition of U (α) into full customer blocks, which,
accordingly to 2., is unique. The reverse transformation
converts the full DNF of α into the given minimal representation
of U (α).
4. The proof is evident by definition of the complexity. The
complexity of U (α) is the number of clauses in the minimal
representation of α that does not exceed the number of full
clauses in the full DNF of α.</p>
        </sec>
      </sec>
      <sec id="sec-1-8">
        <title>Let us consider an example:</title>
        <p>Example 6: (Following the Example 4) Let a = ”Flour”, b
= ”Egg”, c = ”Milk”, which can be identified by a = (1, 0, 0),
b = (0, 1, 0) and c = (0, 0, 1), respectively. The constraint
α = (a ∧ b → c)(¬b → (a ∨ c)) characterises the set of all
those customers, who if buy flour and egg then buy also
milk, and if do not buy egg, then would buy flour or milk.
Let us denote this set of customers by A, i.e. A = U (α). By
using simple transformations we have the full DNF of α:
α = (a ∧ b ∧ c) ∨ (¬a ∧ b ∧ c) ∨ (¬a ∧ b ∧ ¬c) ∨ (¬a ∧ ¬b ∧ c)
∨(a ∧ ¬b ∧ c) ∨ (a ∧ ¬b ∧ ¬c)
The full customer blocks of A = U (α) is</p>
        <p>A = U (α) =
This means that A can be characterized as the union of three
blocks of customers: the first block contains those customers
who buy milk, the second block contains all customers who
buy flour but do not buy eggs, and the third one is the block
of all customers who buy eggs but do not buy flour. One
can see that the complexity of A is 3 and the structure of A
is clear.
5.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>CONCLUSION</title>
      <p>In this short paper by using the logical structure of the
market baskets we have introduced the concept of constraints
of market baskets. We showed that every set of market
baskets can be characterized by some constraints. The
relationships between the structure of the set of market baskets
and propositional logics are discovered. Similarly to the well
known methods and results in propositional logics we showed
that every set of customers can be represented, in different
ways, as union of some blocks, and the number of these
blocks can be considered as a complexity of the given set of
customers.</p>
      <p>In fact, the shop managers have to deal with large amounts
of itemsets, as well as with the large amounts of market
baskets. Finding the efficient algorithms to discover the logical
constraints of market baskets is always the problem of
practical value.</p>
      <p>One should remark that in the last part of this paper we
define the complexity for really the set of market baskets,
not for the set of customers, although we call it by the
complexity of the customer sets. The difference is evident: some
customers may buy the same market basket. In this sense
the analysis of the customer sets requires more research.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <given-names>R.</given-names>
            <surname>Agrawal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Srikant</surname>
          </string-name>
          (
          <year>1994</year>
          )
          <article-title>Fast algorithms for mining association rules</article-title>
          .
          <source>VLDB</source>
          ,
          <fpage>487</fpage>
          -
          <lpage>499</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Benczu´</surname>
            r
            <given-names>A.</given-names>
          </string-name>
          ,
          <source>Szab´o Gy. I.</source>
          (
          <year>2012</year>
          )
          <article-title>Functional Dependencies on Extended Relations Defined by Regular Landuages, Foundations of Information and Knowledge Systems</article-title>
          , eds.: T.
          <string-name>
            <surname>Lukasiewicz</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          . Sali, FoIKS 2012 Kiel, Germany, LNCS 7153, pp.
          <fpage>384</fpage>
          -
          <lpage>404</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>T.</given-names>
            <surname>Bru</surname>
          </string-name>
          ˜ggermann, P. Hedstr˜om, M.
          <string-name>
            <surname>Josefsson</surname>
          </string-name>
          (
          <year>2004</year>
          )
          <article-title>Data mining and Data Based Direct Marketing Activities</article-title>
          , Book on Demand GmbH, Norderstedt, Germany.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Davey</surname>
            ,
            <given-names>B.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Priestley</surname>
            ,
            <given-names>H. A.</given-names>
          </string-name>
          (
          <year>2002</year>
          ), Introduction to Lattices and Order, Cambridge University Press, ISBN 978-0-
          <fpage>521</fpage>
          -78451-1.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Demetrovics</surname>
          </string-name>
          , Hua Nam Son, Akos
          <string-name>
            <surname>Guban</surname>
          </string-name>
          (
          <year>2011</year>
          )
          <article-title>An algebraic approach to market basket model: explicit representation of frequent market baskets and associations rules, CSIT 2011</article-title>
          .
          <article-title>Computer science and information technologies</article-title>
          .
          <source>Proceedings of the conference. Yerevan</source>
          , pp.
          <fpage>170</fpage>
          -
          <lpage>173</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J.</given-names>
            <surname>Demetrovics</surname>
          </string-name>
          , Hua Nam Son, Akos
          <string-name>
            <surname>Guban</surname>
          </string-name>
          (
          <year>2011</year>
          )
          <article-title>An algebraic representation of frequent market baskets and association rules</article-title>
          ,
          <source>Cybernetics and Information Technologies</source>
          , Vol.
          <volume>11</volume>
          , No 2, pp.
          <fpage>24</fpage>
          -
          <lpage>31</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Demetrovics</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Katona</surname>
            ,
            <given-names>G.O.H.</given-names>
          </string-name>
          , Dezso¨,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Thalheim</surname>
          </string-name>
          ,
          <string-name>
            <surname>B.</surname>
          </string-name>
          (
          <year>2006</year>
          )
          <article-title>On the number of independent functional dependencies</article-title>
          ,
          <source>Lecture Notes in Computer Science</source>
          , Springer-Verlag,
          <volume>3861</volume>
          , pp.
          <fpage>83</fpage>
          -
          <lpage>91</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Heikki</given-names>
            <surname>Mannila</surname>
          </string-name>
          , Hannu
          <string-name>
            <surname>Toivonen</surname>
          </string-name>
          (
          <year>1996</year>
          )
          <article-title>Discovering generalized episodes using minimal occurrences</article-title>
          .
          <source>Proceedings of the Second International Conference on Knowledge Discovery and Data Mining (KDD' 96)</source>
          , AAAI Press, pp.
          <fpage>146</fpage>
          -
          <lpage>151</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Mendelson</surname>
          </string-name>
          ,
          <string-name>
            <surname>Elliot</surname>
          </string-name>
          (
          <year>1964</year>
          ), Introduction to Mathematical Logic, D. Van Nostrand Company.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>N.</given-names>
            <surname>Pasquier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bastide</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Taouil</surname>
          </string-name>
          , and L.
          <string-name>
            <surname>Lakhal</surname>
          </string-name>
          (
          <year>1999</year>
          )
          <article-title>Discovering frequent closed itemsets for association rules</article-title>
          .
          <source>ICDT</source>
          ,
          <fpage>398</fpage>
          -
          <lpage>416</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Ping-Yu</surname>
            <given-names>Hsu</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yen-Liang</surname>
            <given-names>Chen</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chun-Ching Ling</surname>
          </string-name>
          (
          <year>2004</year>
          )
          <article-title>Algorithms for mining association rules in bag databases</article-title>
          ,
          <source>Information Sciences</source>
          , Volume
          <volume>166</volume>
          ,
          <string-name>
            <surname>Issues</surname>
          </string-name>
          1-
          <issue>4</issue>
          , pp.
          <fpage>31</fpage>
          -
          <lpage>47</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>