1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra...

20
1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* *Faculty of Computer Science, Univ. of New Brunswick, Fredericton **Institute for Information Technology – e-Business, NRC, Fredericton

Transcript of 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra...

Page 1: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

1

A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments

Virendra C.Bhavsar*Harold Boley**Lu Yang**Faculty of Computer Science, Univ. of New Brunswick, Fredericton

**Institute for Information Technology – e-Business, NRC, Fredericton

Page 2: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

2

Outline

Introduction Multi-agent system architecture Tree representation Similarity of trees Experimental results Conclusion

Page 3: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

3

Introduction

e-business, e-learning.

– Buyer-seller message exchange.

Semantic Web and Web Services. – Virtual marketplace.

Semantic match-making in multiagent systems.– Keywords/keyphrases.

Page 4: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

4

Multi-agent system architecture

Agent-based Community Oriented Routing Network (ACORN)

Cafe-n

Main Server

User Info

User Profiles

User Agents

Agents

Cafe-1

To other sites (network)

Web BrowserUser

Cafe-n

Page 5: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

5

Tree representation

Why tree representation? – Flexibly represent complex structures.– Why arc-labelled, arc-weighted tree?

0.3

0.2

0.5

2002

Car

Ford Explorer

Make

Model

Year

2002

Car

Ford Explorer

Page 6: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

6

Matchmaking of agents

Match-making in the Cafe.

.

.

.

.Cafe

Leaner 1

..

Course 1

Leaner 2

Leaner n

Course 2

Course m

Programming in Java

Credit

Thinking in Java

Textbook

TuitionDuration

$12002 months3

0.2 0.10.3

0.4

carri

ed b

y

carried by

Programming in Java

Credit

Introduction to Java

Textbook

TuitionDuration

$15002 months3

0.2 0.10.3

0.4

Page 7: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

7

Tree representation - lexicographic order

The arcs are labelled in lexicographic

(alphabetical) order.

2002

Car

Make

Model

Year

Ford Explorer

0.3

0.2

0.5

A tree describing “Car”.

Hotel

Location

Beds FrederictonDowntown

0.5

0.8

0.5

UptownSingle0.2

0.90.1

100 Sheraton Hotel

150 LincolnHotel

Capacity

Queen

A tree describing “Hotel”.

Page 8: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

8

Tree representation - depth and breadth

The depth and breadth of any subtree are not

limited. Jobbank

IT Education

Oldpost

Preliminary

0.9

0.5

0.1

Advanced0.4 0.6

Newpost

DBAProgrammer

College High School

University

School

SoftwareHardware

0.50.1

0.4

0.5

0.2 0.8

… …Position

JavaOracleCertificate

Seneca College

LiverpoolHigh School

UNB

A tree that describes “Jobbank”.

Page 9: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

9

Serialization of trees

– XML attributes for arc labels and weights.

– Weighted Object-Oriented RuleML.

cterm[ -opc[ctor[car]], -r[n[make],w[0.3]][ind[ford]], -r[n[model],w[0.2]][ind[explorer], -r[n[year],w[0.5]][ind[1999]] ]

<cterm> <_opc><ctor>Car</ctor></_opc> <_r n=“Make” w=“0.3”><ind>Ford</ind></_r> <_r n=“Model” w=“0.2”><ind>Explorer</ind></_r> <_r n=“Year” w=“0.5”><ind>1999</ind></_r></cterm>

Tree serialization in OO RuleML. Tree representation in Relfun.

Page 10: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

10

Similarity of trees – simple trees

1 0

1999

Car

Make Year

Ford

0.3 0.7

2002

Car

Make Year

Ford

0.3 0.7

tree t tree t´ (House)

Page 11: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

11

Similarity of trees – complex trees

A(si)(wi + w'i)/2

A(si) = si

A(si) = . is

vehicle

autumn

autoautomake

0.5 0.5

modelyear

0.3334

ford

mini1999

summer

make

model

year0.3334 0.3333

0.3333

0.3333

0.3333

van2000

freestar

e-serieswagon

monteryfreestar

0.50.5 0.50.5

vehicle

autumn

autoautomake

0.5 0.5

modelyear 0.3334

fordvan1999

summer

make

model

year0.3334 0.3333

0.3333

0.33330.3333

ford2001

0.50.5big

ford

big mini

van

big mini

e-serieswagon

freestar

truck

tree t tree t´

si(wi + w'i)/2

Page 12: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

12

Algorithm for tree similarity

– Treesim(t,t'): Recursively compares any (unordered) pair of trees.

Three main recursive functions of the algorithm.

– Treemap(l,l'): Co-recursively maps two lists, l and l', of labelled

and weighted arcs: descends into identical–labelled subtrees.

– Treeplicity(i,t): Decreases the similarity with decreasing simplicity.

Page 13: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

13

Experimental results –simple trees

auto

0.5make

2002ford

year0.5

auto

0.5make

1998chrysler

year0.5

auto

0.0make

2002ford

year1.0

auto

1.0make

1998ford

year0.0

t1 t2

auto

0.0make

2002ford

year1.0

auto

1.0make

2002ford

year0.0

t3 t4

Experiments Tree Tree Results

1

2

0.1

0.5

1.0

t1 t2

Page 14: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

14

Experimental results – simple trees (cont’d)

Experiments Tree Tree Results

3

0.1

make

auto

mustang

auto

0.45model

2000ford

year

t1 t2

1.0model 0.45

explorer

0.9

make

auto

mustang

auto

0.05model

2000ford

year

t3 t4

1.0model 0.05

explorer

0.2823

0.1203

Page 15: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

15

Experimental results – identical tree structures

Experiments Tree Tree Results

4

0.2make

auto

0.3

1999ford

year

t2

model0.5

explorer

make

auto

1999ford

year

t4

model

explorer

0.33330.33330.3334

0.2

make

auto

0.3

2002ford

year

t1

model 0.5

explorer

make

2002ford

year

t3

model

explorer

0.33330.33330.3334

auto

0.55

0.7000

Page 16: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

16

Experimental results – progressively complex trees

Experiments Tree Tree Results

5

auto

t1

t2auto

make1.0

fordauto

model

ford explorer

make0.5 0.5

t3

auto

modelyear

ford explorer 2002

make0.3

0.20.5

t4

0.3025

0.3025

0.3025

Page 17: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

17

Experimental results – complex trees

vehicle

autumn

autoautomake

0.5 0.5

modelyear

0.3334

ford

mini1999

summer

make

modelyear

0.3334 0.3333

0.3333

0.3333

0.3333

ford2000

freestar

freestar

e-serieswagon

e-serieswagon

0.50.5 0.50.5

vehicle

autumn

autoautomake

0.5 0.5

modelyear

0.3334

ford van1999

summer

make

modelyear

0.3334 0.3333

0.33330.3333

0.3333ford

2001

freestar

e-serieswagon

0.50.5

tree t1 tree t2

bigbig mini mini

SiisExperiments Tree Tree

6

0.5950

0.7611big

van van van

Page 18: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

18

Experimental results – complex trees (cont’d)

SiisExperiments Tree Tree

7

vehicle

auto

1.0

0.3334

summer

makemodel

year0.3333

0.3333

ford 2000

tree t1

vehicle

autumn

autoauto

make

0.5 0.5

model

year 0.3334

ford 1994

summer

make

modelyear

0.3334 0.3333

0.3333

0.3333

0.3333

ford 2001

tree t2

0.5894

0.6816van

van van

Page 19: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

19

Conclusion

Tree representations – useful for e-Business, e-

Learning. Matchmaking in multiagent systems – a versatile

tree similarity algorithm is proposed.

Executable specification available in functional-logic

language: Relfun.

Future work - Clustering of agents.

- A Java implementation is in progress.

Page 20: 1 A Weighted-Tree Similarity Algorithm for Multi-Agent Systems in e-Business Environments Virendra C.Bhavsar* Harold Boley** Lu Yang* * Faculty of Computer.

20