Fuzzy Logics Incorporated to Extended Weighted-Tree Similarity Algorithm for Agent Matching in Virtual Market – Sholeh Hadi Setyawan Riyanarto Sarno
ISSN 1858-1633 2005 ICTS 51
2. IMPROVED EXTENDED WEIGHTED-TREE SIMILARITY
ALGORITHM
Extended Weighted Tree Similarity Algorithm is used to measure the similarity between two trees. The
similarity is a value between 0 and 1. Value 0 means totally different and value 1 means exactly the same.
The form of the tree representation used in this algorithm refers to Weighted Object-Oriented RuleML
or Relfun Specification. The algorithm is based on recursive case analysis. There are 3 main functions :
treesim, treemap dan treeplicity. The function call structure are :
Parameters are in “[]“
Arguments are in “”
2.1. Function treesim[N,A]t, t’
The function has two parameters : • “N” Parameter is node-identity fraction, that
is a value between 0 dan 1, is a value given if the correspondent root labels are exactly the
same. • “A” Parameter is an Arc Function, to adjust
the similarity result, giving compensation of similarity degradation of nested trees
• “t” dan “t’” arguments are the two tress to calculate
• The result of this function is a value between
0 and 1.
2.2. Function treemap [N,A] l , l’
This function recursively compares two list l and l’, each list is a set of arc of each level of the tree. The
result of this function is a value between 0 and 1.
2.3. Function treeplicityI, t
This is a recursive function to measure the simplicity of a tree. The result is a value between 0
and 1. Value near 1 represent a simple tree, and value near 0 represent complex tree. If the level of the tree
increase, or the count of arc increase increasing breadth dan depth, then the result of this function
decrease. “I” is depth degradation value which is initially equals 1-N. After each increasing level, this
value will be multiplied by a global factor named treeplideg which the value is = 0.5.
2.4. Function treeplimapI, l
This is a recursive function to map the degree of simplicity of a role list. The result is depend on weight
and simplicity of the subtree.
2.5. Algorithm Improvement
There is still a need to improve the Extended Weighted Tree Similarity Algorithm [Sar et. al.-2003],
because when comparing two node labels or arc labels, the algorithm uses “string matching” approach.
This approach has disadvantage which is unable to accommodate uncertainty and imprecision. In fact,
human mind is easier to accept and express linguistically context sensitive, easier to deal with
uncertainty and imprecision rather than exact values [Zad-1994]. For example, it is easier to accept and to
express “a cheap car having big diesel engine“ than “a US1500 car having 5000 cc diesel engine”. In this
situation, the fuzzy logic method is required. The improvement of the algorithm is adding capability to
apply fuzzy logic method when comparing two node labels having adjective values v1 and v2, using these
rules :
C a r
A n ti L o c k B ra k e s 0 .1 6 7
C o u n try 0 .1 6 7
B o d y S ty le 0 .1 6 7
M a k e 0 .1 6 7
P ric e 0 .1 6 7
Y e a r 0 .1 6 7
D rive L in e 0 .0 9 1
F u e l 0 .0 9 1
P a s s e n g e r V a n U S A
H o n d a S ta n d a r d
2 4 4 9 0 0 0 0 0 2 0 0 4
O D Y S S E Y
M o d e l 1
L X 5 -S P D A T
T y p e 1
F r o n t W h e e l
D r iv e G a s o lin e
E n g in e C a p a c ity 0 .5
N o . o f C y lin d e rs 0 .5
3 5 0 0 6
M a x H o rs e P o w e r
0 .5 M a x T o rq u e
0 .5
2 4 0 2 4 2
H e ig h t 0 .0 9 1
1 7 3 9 . 9
L e g R o o m
F ro n t 0 .0 9 1
1 0 4 1 . 4
L e g R o o m
R e a r 0 .0 9 1
1 0 1 6
L e n g th 0 .0 9 1
5 1 1 0 . 4 8
S ta n d a rd S e a tin g
0 .0 9 1
7
T o w in g C a p a c ity
0 .0 9 1 W id th
0 .0 9 1 T ra n s -
m is s io n 0 .0 9 1
W h e e l B a s e
0 .0 9 1
8 8 0 A u to m a ti c
2 9 9 9 . 7 1 9 2 0 . 2 4
Figure 3. Example of car specification tree
Information and Communication Technology Seminar, Vol. 1 No. 1, August 2005
ISSN 1858-1633 2005 ICTS 52
• if both v1 and v2 is not fuzzy adjective variables, the similarity is 1 if v1=v2 and 0 otherwise
• if both v1 and v2 is fuzzyadjective variables, and both v1 and v2 having fuzzy values, the similarity
is 1 if v1=v2 and 0 otherwise • if both v1 and v2 is fuzzy adjective variables,
and v1 having fuzzy value, but v2 having crisp value, the similarity is the membership function
value fx of v1 for x=v2 • if both v1 and v2 is fuzzy adjective variables,
and v1 having crisp value, but v2 having fuzzy value, the similarity is the membership function
value fx of v2 for x=v1 • if both v1 and v2 is fuzzyadjective variables, and
both v1 and v2 having crisp values, the similarity is the defuzzification value of both membership
function of v1 and v2 using min-max method
3. EXPERIMENT RESULT