ON TWO INTERPRETATIONS OF COMPETITIVE CONDITIONAL
FUZZY PREFERENCES
Patrick Bosc and Olivier Pivert
IRISA/ENSSAT, University of Rennes 1, Lannion, France
Keywords:
Database flexible querying, Conditional preferences, Fuzzy conditions, Hierarchical queries.
Abstract:
This paper introduces a new type of database queries involving fuzzy preferences. The idea is to consider
competitive conditional preference clauses structured as a tree, where each children’s set of a node corresponds
to a disjunction of non mutually exclusive fuzzy predicates (thus the notion of competition). The paper defines
two possible interpretations of such queries and outlines two evaluation techniques which follow from them.
1 INTRODUCTION
The last two decades have witnessed an increas-
ing interest in expressing preferences inside database
queries. Motivations for such a concern are manifold
(Hadjali et al., 2008). First, it has appeared to be de-
sirable to offer more expressive query languages that
can be more faithful to what a user intends to say. Sec-
ond, the introduction of preferences in queries pro-
vides a basis for rank-ordering the retrieved items,
which is especially valuable in case of large sets of
items satisfying a query. This research trend has mo-
tivated several distinct lines of research, in particular
in fuzzy set applications to information systems.
In this paper, we particularly focus on hierarchi-
cal preference queries, whose basic form is: find the
items satisfying C among which prefer those satis-
fying P
1
, among which prefer those satisfying P
2
...
among which prefer those satisfying P
n
. The present
paper extends this pattern and provides a new ap-
proach to the handling of database hierarchical pref-
erence queries. The idea is to deal with queries where
preferences are modelled as a tree (and not anymore
as a list) of fuzzy conditions, which implies a notion
of competition between the “children conditions” of
a node. Consider for instance the query: “preferably
young (preference degree 1) or well paid (preference
degree 0.8); if young then preferably tall (preference
degree 1) or educated (preference degree 0.6); if well
paid then preferably lives in Paris (preference degree
1)”. Since a person can be both (somewhat) young
and (somewhat) well paid, these criteria “compete”
at level 1, and the same phenomenon may occur at
the other levels of the hierarchy. It is thus neces-
sary to devise an interpretation that takes into account
the fuzziness of the predicates, the weights attached
to them, the hierarchical aspect linked to conditional
statements, and the competition between the prefer-
ence conditions. The aim of the paper is to propose
such an interpretation.
The remainder is organized as follows. Section 2
provides some backgroundon a fuzzy approach previ-
ously proposed for handling hierarchical preferences.
Section 3 presents two approaches to the handling of
competitive conditional fuzzy preferences (CCFPs).
Section 4 deals with implementation aspects for both
methods introduced in the previous section. Section
5 concludes the paper and outlines some perspectives
for future work.
2 RELATED WORK
In (Dubois and Prade, 1996), the authors propose to
model fuzzy hierarchical preference conditions as
follows. The type of clause considered is: “if P
1
(as-
signed the preference level 1) then P
2
(with priority
level α
2
), and if P
1
and P
2
, then P
3
(with priority level
α
3
) [...]”. It is assumed that α
3
< α
2
< 1. To interpret
such a statement, the authors extend the definition of
the weighted minimum operation that they originally
introduced in (Dubois and Prade, 1986).
The following formula shows how the fuzzy set
P
of answers is computed in the case of a hierarchy
involving three predicates (the generalization to any
71
Bosc P. and Pivert O. (2009).
ON TWO INTERPRETATIONS OF COMPETITIVE CONDITIONAL FUZZY PREFERENCES.
In Proceedings of the International Joint Conference on Computational Intelligence, pages 71-74
DOI: 10.5220/0002273600710074
Copyright
c
SciTePress
number of predicates is straightforward):
µ
P
(t) = min(µ
P
1
(t), max(µ
P
2
(t),
1 min(µ
P
1
(t), α
2
)), max(µ
P
3
(t),
1 min(µ
P
1
(t), µ
P
2
(t), α
3
)).
In this expression, the priority level of P
2
for
tuple t is min(µ
P
1
(t), α
2
), i.e., is α
2
if P
1
is at least
satisfied at a level α
2
and µ
P
1
(t) otherwise. Similarly,
the priority level of P
3
for t is min(µ
P
1
(t), µ
P
2
(t), α
3
).
Notice that it is zero if P
1
is not at all satisfied even
if P
2
is satisfied. Notice also that as soon as P
1
or P
2
is not satisfied, the satisfaction of P
3
or its
violation makes no difference (P
3
is not “seen”). The
“guaranteed level of satisfaction” associated with
P
i
(t) depends on the satisfaction degree obtained by
t for the predicates of higher priority. The problem,
with this approach, is that P
2
(and even P
3
) may
modify the order obtained through P
1
.
Example 1. Let α
2
= 0.7, α
3
= 0.4 and the two
tuples t and t
such that:
µ
P
1
(t) = 0.9, µ
P
2
(t) = 0.4, µ
P
3
(t) = 0.6
µ
P
1
(t
) = 0.8, µ
P
2
(t
) = 1, µ
P
3
(t
) = 1
We get: µ
P
(t) = 0.4 and µ
P
(t
) = 0.8 whereas t is
better than t
with respect to predicate P
1
.
The main limitations of this approach, with re-
spect to the goal we pursue in this study, concern:
the semantics of the hierarchical mechanism, as
illustrated by the previous example;
the structure of the hierarchical preference clauses
considered (a “cascade” with no disjunction,
which implies the absence of any competitive be-
havior).
3 TWO VIEWS OF CCFPs
The idea consists in using disjunctive preference
clauses (for instance: preferably age < 30 or
salary > 2000; if age < 30 then preferably tall; if
salary > 2000 then preferably lives in Paris). Using
disjunctive conditions implies, when these conditions
are not exclusive, that a tuple can satisfy several
conditions at the same time (for instance, one may be
younger than 30 and have a salary over 2000 euros).
Therefore, a tuple can “progress” in several branches
of the preference tree. This implies to define a
mechanism for determining the “best” evaluation of a
tuple relatively to the preference tree considered. The
query format corresponding to this specification is:
(w
1
) P
1
or (w
2
) P
2
or ... [or (w
n
) anything
0
];
Figure 1: Representation of a competitive conditional
query.
if P
1
then (w
1,1
) P
1,1
or (w
1,2
) P
1,2
or ... [or (w
1,m
)
anything
1
];
if P
2
then (w
2,1
) P
2,1
or (w
2,2
) P
2,2
or ... [or (w
2,p
)
anything
2
];
...
if anything
0
then (w
n,1
) P
n,1
or (w
n,2
) P
n,2
or ... [or
(w
n,q
) anything
n+1
];
if P
1
and P
1,1
then (w
1,1,1
) P
1,1,1
or (w
1,1,2
) P
1,1,2
or ...
etc...
where w
i
is a weight [0, 1] expressing the
preference level attached to the predicate P
i
in a
disjunction. One imposes that every non-leaf node
possesses a child whose weight equals 1 (there is
at least one completely preferred criterion in every
disjunction of preferences). Several conditions of a
disjunction can have the same weight. Such a query
can be modeled as a tree (cf. Figure 1).
3.1 Approach Computing a Score
When the conditions of a disjunction are not exclu-
sive, several vectors of scores can be built for a same
tuple. The first step is thus to determine the best vec-
tor of scores for a given tuple.
The first approach we propose is based on the
computation of a satisfaction degree for each tuple.
For a given tuple t, one wants to compute the best
score µ(t) obtained by t over the multiple evaluations
of t (i.e., over the set of branches of the query tree).
Let b denote the number of branches of the query
tree. Let µ
i
(t) denote the score obtained by tuple t
for branch i. To compute µ
i
(t), one first builds a vec-
torV
i
of satisfaction degrees. Let P
k
be the k
th
node of
branch i after the root; one has: V
i
[k] = (w
k
, µ
P
k
(t))
where w
k
denotes the weight attached to P
k
and de-
notes a triangular norm (in the following, we will use
the product). Let us denote by n
i
the number of nodes
in branch i, not counting the root. From V
i
(t) one
computes a vector V
i
(t) defined as:
V
i
(t)[1] = V
i
(t)[1];
j [2..n
i
], V
i
(t)[ j] = min
u=1.. j
V
i
(t)[u]
IJCCI 2009 - International Joint Conference on Computational Intelligence
72
The score µ
i
(t) is computed as follows:
µ
i
(t) =
n
i
u=1
V
i
(t)[u]
n
i
(1)
The operator underlying this computation is the hier-
archical aggregation operator proposed in (Bosc and
Pivert, 1993). It captures the notion of hierarchy by
means of the transformation of V into V
which ex-
presses that a predicate cannot contribute more to the
final degree than its ancestors. Finally, the best score
associated with t is:
µ(t) = max
i=1..b
µ
i
(t). (2)
One may then order the tuples the following way:
t t
µ(t) µ(t
).
Obviously, is a complete preorder.
Example 2. Let us consider the following query:
(1) young, or (0.7) (around 50 y.o. and very
well-paid), or (0.2) anything
0
;
if young, then preferably (1) (tall and blond), or (0.5)
well-paid;
if (around 50 y.o. and very well paid), then preferably
(1) liberal profession;
if anything
0
then preferably (1) close to Lyon or (0.7)
close to Paris;
if (young and well-paid) then preferably (1) liberal
profession.
Let us consider the relation represented in Table
1.
Table 1: Degrees attached to the tuples of a relation Person.
µ
yg
µ
ard50
µ
tall
hair µ
wp
lib µ
Lyon
µ
Paris
t
1
0 0.7 0.6 blond 0.4 no 1 0
t
2
0.8 0 0.8 dark 0.5 no 0 0.8
t
3
0 1 0.4 blond 0.8 no 0.5 0
t
4
0.5 0 0.9 blond 0.6 yes 1 0
t
5
0.7 0 0.9 dark 0.3 yes 0 0.2
t
6
0 0.8 1 red 1 yes 0.7 0
t
7
0.6 0 0.2 blond 0.4 yes 0.8 0
It is assumed that very well-paid (vwp) is inter-
preted as: vwp(x) = well-paid(x)
2
. The conjunction
involved in conditions such as “around 50 y.o.
and very well-paid” is interpreted with the t-norm
minimum. The tuples from Table 1 get the following
scores:
µ(t
1
) = 0.2, µ(t
2
) = 0.4, µ(t
3
) 0.22,
µ(t
4
) = 0.5, µ(t
5
) = 0.35, µ(t
6
) = 0.56, µ(t
7
) = 0.4.
Finally, the ordered answer obtained is:
t
6
t
4
{t
2
, t
7
} t
5
t
3
t
1
.
Comment about the Semantics. With this approach,
the transformation of V
i
(t) into V
i
(t), reduces the dis-
crimination power. For instance, [0.6, 0.6, 0.6] is con-
sidered equivalent to [0.6, 1, 1]. In the following sub-
section, we propose an alternative solution based on
the lexicographic order.
3.2 Lexicographic-order-based Method
Another approach for dealing with branches of differ-
ent lengths is to complete each vector so that it con-
tains exactly as many scores as there are nodes in the
longest branch of the query tree. In order for the final
ranking to be consistent, this completion is based on
the following principle. Let nmax be the length of the
longest branch of the tree. Let n be the size of vector
V
i
(t). Vector V
i
(t) is completed (i.e., transformed into
a vector V
i
(t) of length nmax) the following way:
the last degree of the original vector is propagated
to the right so as to get the desired length. This
choice seems the most reasonable, compared to a
completion with 0’s (resp. with 1s) which could
appear excessively pessimistic (resp. optimistic). The
best evaluation of t corresponds to the best vector
V
i
(t) in the sense of the lexicographic order:
bestV
(t) = V
k
(t) such that i [1..b], V
k
(t)
lex
V
i
(t)
where b denotes the number of branches in the
query tree and
lex
denotes the lexicographic order.
Then, two tuples t and t
can be compared us-
ing the lexicographic order on their best evaluations:
t t
bestV
(t)
lex
bestV
(t
)
Since
lex
is a complete pre-order, so is .
Example 3. Let us come back to the query and
data from Example 2. With this new approach, we
get the vectors:
bestV
(t
1
) = [0.2, 1, 1],
bestV
(t
2
) = [0.8, 0.25, 0],
bestV
(t
3
) = [0.45, 0, 0], bestV
(t
4
) = [0.5, 0.6, 0.6],
bestV
(t
5
) = [0.7, 0.15, 1], bestV
(t
6
) = [0.56, 1, 1],
bestV
(t
7
) = [0.6, 0.2, 0.2].
and the order obtained i
t
2
t
5
t
7
t
6
t
4
t
3
t
1
.
Notice that this order differs from that obtained with
the previous approach (cf. results from Example 2).
ON TWO INTERPRETATIONS OF COMPETITIVE CONDITIONAL FUZZY PREFERENCES
73
Comments about the semantics. Two points are wor-
thy of comments. First, it must be noticed that the
lexicographic order has a somewhat brutal” way of
discriminating, which can be felt as counter-intuitive
in some cases. For instance, with the approach pro-
posed, the vector [α, 0, 0, ..., 0] is preferred to [α ε,
1, ..., 1] even for a very small ε. A second point con-
cerns the fact that zeros do not “propagate” to their
descendants in the tree. Thus, vector [α, 0, β] is
preferred to [α, 0, γ] as soon as γ is smaller than β,
even though the parent node of β and that of γ yield
the score zero. Again, this can be considered debat-
able since one might think that a hierarchical behavior
would impose to take a node into account only if its
parent is somewhat satisfied.
4 IMPLEMENTATION ASPECTS
For the score-based approach, the query processing
method is based on a depth-first scan of the query tree.
The algorithm includes two pruning criteria:
1. when the local score obtained by tuple t for the
predicate associated with the current node equals
0, the evaluation of a branch stops. This is due
to the fact that the score obtained for a node acts
as a threshold (upper bound) on the scores ob-
tained through the descendants of this node (cf.
the transformation of vector V into V
);
2. for the same reason, if a child x of the root returns
a score e which is less than the current best score
attached to t, there is no need to check the descen-
dants of x. Indeed, the final score obtained along
every branch originating in x cannot be greater
than e.
As to the approach based on the lexicographic order,
query processing is based on a breadth-first scan of
the query tree which computes the best vector (ac-
cording to the lexicographic order) associated with tu-
ple t.
The important point to notice is that the data com-
plexity of conditional competitive queries is linear,
which implies that they are perfectly tractable. How-
ever, with respect to regular selection queries (involv-
ing conditions of the form attribute θ constant or
attribute
1
θ attribute
2
where θ denotes a compara-
tor), the processing of an individual tuple is more ex-
pensive in the conditional competitive case since one
has to deal with a tree of predicates instead of a “flat”
condition which is in general more simple.
5 CONCLUSIONS
In this paper, a new type of database queries involv-
ing preferences is introduced. The idea is to allow
for competitive conditional preference clauses struc-
tured as a tree, of the type “preferably P
1
or ... or P
n
;
if P
1
then preferably P
1,1
or ...; if P
2
then preferably
P
2,1
or ...”, where the P
i
s are not exclusive (thus the
notion of competition). Two interpretations of such
queries have been defined, one based on the hierarchi-
cal aggregationoperator previously proposedin (Bosc
and Pivert, 1993), the other on the lexicographic or-
der. These approaches lead to different complete pre-
orders and the choice of the most suitable interpreta-
tion depends on the semantics that the user wants to
give to the notion of hierarchy in his/her query.
Future works should thus notably aim at propos-
ing some mechanisms that can help the user in this
choice. In any case, the processing of such queries is
perfectly tractable since their data complexity is lin-
ear. Among other perspectives for future work, the
main one concerns the effective integration of such a
query functionality into a regular database system.
REFERENCES
Bosc, P. and Pivert, O. (1993). An approach for a hier-
archical aggregation of fuzzy predicates. In Proc. of
FUZZ-IEEE’93, pages 1231–1236.
Dubois, D. and Prade, H. (1986). Weighted minimum and
maximum operations in fuzzy set theory. Information
Sciences, pages 205–210.
Dubois, D. and Prade, H. (1996). Using fuzzy sets in flex-
ible querying: Why and how? In Proc. of FQAS’96,
pages 89–103.
Hadjali, A., Kaci, and Prade, H. (2008). Database prefer-
ences queries a possibilistic logic approach with
symbolic priorities. In Proc. of FoIKS’08, pages 291–
310.
IJCCI 2009 - International Joint Conference on Computational Intelligence
74