A

Methodology

for

Detecting

Violation

of

Real-Time

Constraints

in

Secure

Electronic

Commerce

Transactions

Srividhya

Subramanian

and

Mukesh

Singhal

Dept.

of

Computer

and

Information

Science

The

Ohio

State

University

Columbus

OH

Tel

Fax

-LRB-

-RRB-

E-mail

fssubrama,singhalg@cis.ohio-state.edu

Abstract

In

electronic

commerce

applications

it

is

often

critical

to

transact

within

a

short

stipulated

time

In

such

applications

it

is

financially

damaging

to

the

customer

if

the

transaction

does

not

complete

within

the

stipulated

time

In

this

paper

we

describe

various

situations

in

the

stock

market

-LRB-

one

of

the

biggest

electronic

commerce

markets

-RRB-

requiring

real-time

transactions

We

propose

a

methodology

to

enhance

any

electronic

commerce

protocol

to

a

real-time

aware

electronic

commerce

protocol

The

methodology

consists

of

two

parts

the

first

part

adds

a

timestamp

to

some

messages

in

the

original

protocol

and

the

second

part

augments

the

protocol

with

a

mechanism

to

detect

violation

of

real-time

constraints

We

show

that

the

methodology

does

not

violate

any

of

the

useful

properties

present

in

existing

electronic

commerce

protocols

As

a

result

the

methodology

may

be

successfully

applied

to

any

existing

electronic

commerce

protocol

The

methodology

is

illustrated

by

applying

it

to

an

existing

well

known

electronic

commerce

protocol

namely

the

NetBill

protocol

Introduction

There

is

a

plethora

of

products

already

available

to

us

through

the

World

Wide

Web

or

through

email

Some

of

these

are

electronic

commodities

such

as

electronic

books

newspapers

reports

typesetting

services

ownership

titles

shares

software

etc.

Others

are

non-electronic

goods

that

are

advertised

ordered

and

paid

for

electronically

According

to

a

projection

by

Business

Week

-LRB-

June

-RRB-

trade

worth

billion

dollars

will

be

conducted

over

electronic

networks

by

the

year

This

growing

shift

towards

electronic

marketing

can

be

attributed

to

certain

factors

one

of

the

greatest

factors

being

the

ability

to

transfer

goods

and

information

quickly

and

yet

inexpensively

In

many

situations

it

is

important

that

transactions

complete

within

a

fixed

period

of

time

-LRB-

real-time

transactions

-RRB-

This

may

be

either

because

the

price

agreed

upon

changes

rapidly

with

time

-LRB-

e.g.

currency

market

stock

market

options

etc.

-RRB-

or

because

the

product

is

useful

to

the

customer

only

for

a

certain

period

of

time

-LRB-

e.g

newspapers

stock

updates

etc.

-RRB-

Since

such

transactions

must

complete

almost

instantaneously

electronic

networks

seem

to

be

the

ideal

medium

to

conduct

them

over

There

are

many

ways

for

a

business

to

provide

quick

transaction

execution

faster

networks

more

and

faster

memory

faster

machines

better

algorithms

more

employees

etc.

However

even

with

the

fastest

resources

a

transaction

may

occasionally

take

more

than

the

stipulated

time

Delays

may

be

due

to

failures

hot-spots

laziness

on

part

of

the

business

employees

or

other

uncontrollable

factors

Under

such

circumstances

the

customer

does

not

receive

the

full

value

for

the

payment

made

The

customer

is

therefore

entitled

to

a

full/partial

refund

However

it

is

not

easy

to

detect

if

an

event

took

place

within

a

certain

time

This

is

due

to

the

non-existence

of

global

clocks

and

the

ability

to

tamper

with

the

system

clocks

of

unsecured

computers

A

mechanism

is

required

to

detect

if

a

transaction

took

more

than

the

time

stipulated

for

its

completion

The

following

examples

should

illustrate

this

need

One

of

the

areas

that

can

immensely

benefit

from

real-time

aware

protocols

is

the

stockmarket

In

the

stock

market

decisions

to

buy

sell

or

short

shares

of

a

company

are

based

on

current

stock

prices

It

is

consequently

important

for

an

investor

to

receive

current

price

quotes

whenever

requested

The

value

of

a

minutes

old

is

low

enough

that

it

is

usually

provided

free

of

cost

In

fact

some

financial

analysts

believe

that

the

value

of

a

quote

falls

exponentially

with

time

Thus

current

quotes

requested

must

be

provided

within

a

very

short

period

of

time

-LRB-

in

the

order

of

seconds

-RRB-

for

them

to

be

valuable

If

an

investor

does

not

receive

current

quotes

within

a

stipulated

period

of

time

there

must

be

a

mechanism

to

verify

this

and

refund

the

payment

towards

the

quotes

Assuming

investors

receive

their

quotes

on

time

and

place

orders

to

transact

shares

with

a

broker

It

is

important

for

these

orders

to

be

acted

upon

immediately

The

orders

must

not

only

reach

the

floor

brokers

-LRB-

agents

at

the

stock

exchange

-RRB-

in

time

the

floor

brokers

must

also

act

on

it

with

alacrity

If

either

the

order

does

not

reach

the

floor

broker

or

the

floor

broker

does

not

act

quickly

the

investor

may

miss

the

market

Consider

an

investor

who

through

technical

analysis

-LRB-

a

tool

to

predict

future

trend

from

past

price

fluctuations

-RRB-

finds

that

the

price

of

a

stock

has

reached

its

upper

threshold

and

is

soon

going

to

dip

This

investor

instructs

a

broker

to

sell

shares

at

the

market

value

-LRB-

best

immediate

price

available

-RRB-

If

the

broker

does

not

act

upon

this

instruction

with

alacrity

the

share

value

may

start

dipping

and

the

investor

will

lose

some

of

his

profits

Since

the

investor

pays

the

broker

for

the

broker

's

ability

to

immediately

transact

the

investor

should

at

least

be

refunded

the

broker

's

fee

if

the

broker

is

not

able

to

deliver

on

his

promise

Under

certain

circumstances

the

broker

may

also

be

liable

for

the

losses

incurred

by

the

customer

We

need

a

mechanism

for

the

investor

to

verify

if

the

transaction

took

place

within

a

stipulated

period

of

time

and

receive

a

refund/compensation

if

this

does

not

happen

The

main

difference

between

the

two

examples

lies

in

the

fact

that

in

the

second

example

it

is

not

essential

for

the

investor

to

receive

the

trade

confirmation

immediately

only

for

the

sale

to

take

place

While

many

protocols

exist

for

electronic

commerce

-LSB-

Cyb

Dig

BGH

B

-RSB-

addresses

the

issue

of

real-time

transactions

In

this

paper

we

model

the

general

problem

of

detecting

real-time

transaction

executions

and

identify

one

special

case

where

the

real-time

phase

of

a

transaction

can

complete

without

delivering

a

product

to

the

customer

We

propose

a

methodology

to

enhance

existing

protocols

with

a

general

mechanism

to

detect

real-time

execution

We

then

propose

a

modified

methodology

that

optimizes

this

mechanism

for

the

special

case

where

there

is

no

product

to

be

delivered

to

the

customer

Furthermore

we

show

that

the

general

methodology

does

not

violate

any

of

the

useful

properties

of

existing

electronic

commerce

protocols

and

hence

is

applicable

to

them

We

then

illustrate

the

methodology

by

applying

it

to

NetBill

a

well

known

existing

electronic

commerce

protocol

The

rest

of

the

paper

is

organized

as

follows

Section

models

the

general

problem

of

detecting

violations

of

real-time

constraints

Section

describes

the

methodology

to

enhance

any

electronic

commerce

with

a

real-time

violation

detector

Section

illustrates

how

the

methodology

works

when

applied

to

an

existing

protocol

NetBill

Finally

in

Section

we

summarize

the

work

and

point

out

directions

for

future

research

The

Real-time

Aware

Transaction

Model

In

the

previous

section

we

saw

the

need

for

a

mechanism

to

detect

violations

of

real-time

constraints

In

this

section

we

will

look

closely

at

the

assumptions

we

make

about

the

system

the

description

of

the

problem

and

the

properties

required

of

such

a

violation

detection

mechanism

System

Model

A

general

real-time

transaction

execution

involves

two

parties

the

merchant

and

the

customer

The

merchant

is

willing

to

supply

a

product

-LRB-

P

-RRB-

within

a

specified

period

of

time

-LRB-

T

-RRB-

for

a

fee

-LRB-

F

-RRB-

The

customer

is

willing

to

pay

the

fee

F

in

return

for

receiving

the

product

P

within

time

T

The

time

T

is

measured

from

the

time

the

customer

sends

the

order

for

P

This

is

illustrated

in

Figure

T

ZYX

X

order

from

customer

on

the

network

Y

execution

time

at

the

merchant?s

end

Z

product

delivery

time

over

the

network

M

C

T

stipulated

time

C

customerM

merchant

Figure

Timing

diagram

showing

a

real-time

transaction

A

special

case

of

this

is

when

the

customer

is

satisfied

if

the

product

P

is

dispatched

within

a

stipulated

time

from

the

receipt

of

the

order

by

the

merchant

In

Figure

the

constraint

would

not

be

on

X

Y

Z

but

only

on

Y.

Here

the

customer

is

willing

to

incur

losses

or

delays

that

occur

over

the

network

-LRB-

X

Z

-RRB-

This

may

be

the

case

when

the

product

being

supplied

is

the

confirmation

of

a

service

say

the

sale

of

some

shares

Here

it

is

important

for

the

sale

to

be

completed

on

time

but

it

is

not

important

for

the

confirmation

of

the

sale

to

reach

the

customer

in

real-time

The

merchant

and

the

customer

are

connected

through

an

electronic

network

They

exchange

messages

containing

information

goods

payment

etc.

over

this

network

The

communication

channels

are

FIFO

The

customer

is

in

close

proximity

-LRB-

measured

in

terms

of

message

delay

-RRB-

from

a

trusted

clock

This

trusted

clock

may

be

a

secure

co-processor

-LSB-

-RSB-

attached

to

the

customer

's

workstation

Secure

co-processors

are

secure

physical

devices

that

erase

their

RAM

and

CPU

registers

if

they

are

accessed

in

any

method

apart

from

the

defined

interfaces

These

devices

have

limited

capabilities

are

inexpensive

and

are

available

commercially

-LSB-

WW

-RSB-

Many

customers

may

share

the

same

clock

In

order

to

avoid

problems

involving

clock

synchronization

we

use

a

single

trusted

clock

for

all

measurements

in

a

single

transaction

The

local

clocks

of

the

customer

and

the

merchant

may

not

be

synchronized

with

this

clock

but

we

expect

the

clock

periods

to

be

the

same

This

is

a

reasonable

assumption

given

the

accuracy

of

modern

day

clocks

The

secure

clock

also

has

a

pair

of

public

and

private

keys

Requirements

To

be

used

in

conjunction

with

other

electronic

commerce

protocols

our

methodology

must

not

violate

any

of

the

useful

security

related

properties

ensured

by

these

protocols

Several

properties

have

been

identified

as

either

required

or

desirable

in

electronic

commerce

protocols

-LSB-

-RSB-

These

properties

are

listed

below

ffl

Privacy

No

third

party

should

be

able

to

know

details

about

the

transaction

-LRB-

payment

amount

product

details

identity

of

parties

that

wish

to

remain

anonymous

etc.

-RRB-

ffl

Anonymity

Nobody

-LRB-

including

the

merchant

involved

in

the

transaction

-RRB-

should

know

the

true

identity

of

the

customer

involved

At

the

least

nobody

should

be

able

to

trace

all

transactions

made

by

a

customer

and

create

a

profile

of

the

customer

ffl

Security

Tampering

or

replay

of

messages

by

a

third

party

non-adherence

to

the

protocol

by

involved

parties

or

corruption

or

loss

of

message

in

the

network

should

not

cost

more

than

some

additional

computation

to

either

party

ffl

Atomicity

Under

all

circumstances

the

transaction

must

either

go

to

completion

-LRB-

the

right

goods

are

exchanged

for

the

right

amount

of

money

-RRB-

or

be

aborted

-LRB-

there

is

no

exchange

of

goods

or

money

-RRB-

ffl

Low

Overhead

The

cost

for

each

transaction

must

be

low

enough

to

justify

transactions

involving

a

small

amount

of

money

The

Methodology

In

this

section

we

describe

the

general

methodology

to

enhance

an

electronic

commerce

protocol

to

make

it

real-time

aware

We

then

show

a

modified

methodology

for

the

special

case

where

the

network

delivery

of

the

customer

order

or

of

the

product

is

not

included

in

the

real-time

constraint

The

general

methodology

is

broken

into

two

parts

The

first

part

specifies

some

modifications

to

be

made

to

the

original

protocol

This

mainly

involves

adding

certain

timestamps

to

some

messages

The

second

part

is

the

actual

detection

mechanism

that

uses

the

timestamps

added

in

the

first

part

to

detect

if

the

real-time

constraints

were

violated

Subsection

Subsection

and

Subsection

all

pertain

to

the

general

methodology

These

subsections

describe

the

modification

to

the

original

protocol

the

detection

mechanism

and

the

conformity

with

the

requirements

specified

in

Subsection

respectively

Subsection

describes

the

modified

methodology

for

the

special

case

with

no

network

delivery

in

the

real-time

constraints

Merchant

Id

Customer

Id

of

messages

received

Figure

Vector

timestamp

Modification

to

the

Transaction

Protocol

The

original

protocol

is

modified

by

first

identifying

the

following

messages

in

the

transaction

protocol

ffl

Order

A

message

from

the

customer

to

the

merchant

where

the

customer

makes

a

binding

agreement

to

buy

the

goods

This

may

be

in

the

form

of

a

payment

a

binding

promise

to

pay

etc.

ffl

Product

A

message

from

the

merchant

to

the

customer

that

finally

makes

the

goods

available

to

the

customer

The

message

may

contain

the

goods

themselves

decryption

key

to

previously

supplied

encrypted

goods

etc.

The

detection

mechanism

detects

if

the

time

between

the

dispatching

the

first

message

-LRB-

Order

-RRB-

and

receiving

the

second

message

-LRB-

Product

-RRB-

is

greater

than

the

stipulated

time

The

trusted

clock

-LRB-

possibly

an

inexpensive

secure

co-processor

-RRB-

maintains

a

vector

timestamp

-LRB-

Figure

-RRB-

The

timestamp

has

a

field

associated

with

each

merchant

customer

pair

The

field

corresponds

to

the

number

of

messages

received

from

the

merchant

by

that

customer

Order

and

Product

are

both

routed

through

the

trusted

clock

The

customer

attaches

a

nonce

to

the

Order

before

sending

it

The

merchant

attaches

the

same

nonce

to

the

Product

This

serves

to

match

the

two

messages

as

part

of

the

same

transaction

The

merchant

further

encrypts

the

Product

with

the

trusted

clock

's

public

key

This

prevents

the

customer

from

rerouting

the

Product

and

by-passing

the

secure

clock

The

clock

attaches

to

these

messages

a

timestamp

consisting

of

two

fields

the

current

time

as

per

the

trusted

clock

and

the

number

of

messages

received

from

the

merchant

The

significance

of

these

will

be

clear

in

Subsection

where

we

describe

the

detection

mechanism

The

clock

further

signs

the

timestamped

message

with

its

private

key

This

prevents

anyone

from

tampering

with

or

forging

a

timestamped

message

This

is

illustrated

in

Figure

where

T

refers

to

the

current

time

N

to

the

number

of

messages

from

the

vector

timestamp

R

to

the

nonce

SK

to

encryption

with

public

key

K

and

S

is

the

signature

function

applied

using

the

private

key

K

The

clock

also

sends

a

copy

of

the

Order

after

timestamping

and

signing

it

to

the

customer

for

the

customer

's

records

Old

Msg

New

message

sent

to

clock

New

Timestamped

Msg

Order

Order

R

Order

S

-LRB-

Order

R

-RRB-

Product

Product

SK

-LRB-

Product

R

-RRB-

Product

S

-LRB-

Product

R

-RRB-

Figure

Modification

to

the

Transaction

Protocol

Detection

Mechanism

We

further

augment

the

electronic

commerce

protocol

with

a

detection

mechanism

that

is

to

be

executed

when

the

customer

believes

that

the

product

has

n't

been

delivered

on

time

Note

that

no

real-time

violation

will

be

detected

unless

the

customer

executes

the

detection

mechanism

Thus

the

extra

cost

of

the

detection

mechanism

is

not

associated

with

transactions

that

completed

to

the

satisfaction

of

the

customer

The

detection

mechanism

consists

of

a

demand

for

refund

-LRB-

Demand

-RRB-

sent

by

the

customer

via

the

trusted

clock

The

Demand

is

simply

a

plain

text

message

asking

for

refund

that

is

timestamped

and

signed

in

the

same

manner

as

an

Order

Copies

of

some

old

messages

are

also

attached

to

the

Demand

This

Demand

is

then

evaluated

by

the

merchant

Refund

is

given

if

and

only

if

there

was

a

violation

of

the

real-time

constraints

If

the

customer

has

received

the

Product

the

customer

attaches

the

Order

and

the

Product

to

the

demand

If

the

customer

has

not

yet

received

the

Product

the

customer

attaches

all

messages

the

customer

received

from

the

merchant

after

sending

the

Order

Figure

shows

the

attachments

to

be

sent

for

each

situation

Situation

Attachments

Customer

has

received

Product

Order

Product

Customer

has

not

received

Product

Order

all

timestamped

messages

received

from

the

merchant

after

Order

-LRB-

MX

-RRB-

Figure

Attachments

to

be

sent

with

the

Demand

We

now

see

how

the

merchant

evaluates

the

demand

for

refund

We

use

the

following

notations

throughout

the

rest

of

this

paper

For

the

time

stamped

on

messages

TS

stipulated

time

TP

time

stamped

on

the

Product

TO

time

stamped

on

the

Order

TD

time

stamped

on

the

Demand

time

stamped

on

message

time

stamped

on

message

TX

time

stamped

on

message

MX

For

the

nonce

attached

to

messages

RP

nonce

attached

to

the

Product

RO

nonce

attached

to

the

Order

RD

nonce

attached

to

the

Demand

nonce

attached

to

message

nonce

attached

to

message

RX

nonce

attached

to

message

MX

For

the

number

of

messages

received

from

the

merchant

NP

number

of

messages

received

before

the

Product

NO

number

of

messages

received

before

the

Order

ND

number

of

messages

received

before

the

Demand

number

of

messages

received

before

message

number

of

messages

received

before

message

NX

number

of

messages

received

before

message

MX

The

customer

should

be

given

the

refund

if

and

only

if

the

Demand

was

sent

after

the

stipulated

time

elapsed

and

the

Product

was

not

received

within

the

stipulated

time

The

merchant

must

verify

both

of

these

conditions

before

giving

the

refund

Condition

The

merchant

receives

the

Demand

and

the

Order

from

the

customer

The

merchant

verifies

if

TD

TO

TS

If

not

it

implies

that

the

stipulated

time

had

not

elapsed

when

the

merchant

sent

the

Demand

and

customer

's

Demand

is

denied

Condition

Here

we

assume

that

Condition

has

already

been

verified

It

is

more

difficult

to

verify

if

the

Product

was

not

received

within

the

stipulated

time

This

is

because

the

Product

may

not

have

been

received

by

the

customer

at

all

and

thus

not

attached

to

the

Demand

in

which

case

the

time

stamped

on

the

Product

is

not

available

to

the

merchant

If

the

Product

is

attached

to

the

Demand

the

merchant

verifies

if

TP

TO

TS

This

verifies

that

the

Product

was

received

after

the

stipulated

time

If

the

Product

was

not

attached

to

the

Demand

the

merchant

verifies

if

ND

NO

X

and

TX

TO

and

RX

RO

This

implies

that

of

the

messages

received

by

the

customer

YES

Demand

Order

Product

other

messages

MX

time

TD

on

Demand

time

TO

on

Order

stipulated

time

TS

Product

Attached

YESYES

YES

Refund

given

time

TP

on

Product

time

TO

on

Order

stipulated

time

TS

Refund

denied

of

messages

ND

on

Demand

of

messages

NO

on

Order

X

time

TM

on

each

attached

message

M

time

TO

on

Order

andNO

NO

NO

Figure

Algorithm

to

evaluate

the

customer

's

Demand

after

sending

the

Order

is

the

Product

corresponding

to

that

Order

i.e.

the

Product

was

not

received

by

the

customer

within

the

stipulated

time

The

above

evaluation

is

further

illustrated

in

Figure

In

this

subsection

we

will

examine

each

of

the

useful

properties

specified

in

Subsectio

and

how

the

methodology

affects

these

properties

Conformity

with

the

Requirements

Atomicity

The

general

methodology

described

above

does

not

violate

the

atomicity

of

the

original

protocol

Note

that

the

methodology

does

not

remove

or

change

the

contents

of

any

of

the

messages

of

the

original

protocol

It

only

pads

the

message

with

some

nonces

timstamps

and

signatures

Thus

the

logical

flow

of

the

transaction

remains

the

same

The

only

addition

is

the

detection

mechanism

which

again

does

not

affect

the

atomicity

of

the

transaction

Anonymity

If

each

customer

must

reveal

the

public

key

of

its

trusted

clock

the

merchants

can

find

out

the

buying

pattern

of

the

customer

from

the

transactions

that

use

that

key

However

the

actual

identity

of

the

customer

is

not

revealed

We

can

incorporate

a

few

different

public

and

private

key

pairs

in

the

trusted

clock

and

the

customer

can

specify

which

public

key

is

to

be

used

for

each

transactions

Thus

a

customer

can

maintain

different

pseudo-identities

that

can

not

be

connected

to

one

another

This

assures

minimal

anonymity

as

required

in

Subsection

Security

Some

messages

in

the

real-time

aware

protocol

are

unchanged

from

the

original

protocol

Let

us

examine

the

messages

that

are

modified

and

see

if

they

become

more

vulnerable

to

attacks

or

if

the

attached

timestamps

are

now

vulnerable

to

attacks

The

Order

and

the

Product

in

the

original

protocol

are

secured

or

signed

in

the

real-time

aware

protocol

and

are

themselves

not

more

vulnerable

to

attacks

than

their

counterparts

in

the

original

protocol

We

examine

various

attacks

on

the

attached

timestamp

below

A

customer

merchant

or

intruder

may

try

to

forge

the

timestamp

on

a

message

Since

the

clock

signs

every

timestamped

message

with

its

private

key

and

private

key

signatures

can

not

be

forged

this

is

not

a

threat

to

our

protocol

Signatures

also

preserve

the

integrity

of

a

signed

message

Therefore

a

malignant

party

can

not

modify

the

timestamp

in

a

signed

message

Nor

can

anyone

tamper

with

the

trusted

clock

itself

Secure

co-processors

completely

erase

their

RAM

and

CPU

registers

if

they

are

accessed

in

any

method

apart

from

the

defined

interfaces

Furthermore

replay

attacks

are

easily

detectable

from

the

timestamp

on

the

message

The

receiver

can

simply

store

an

array

with

the

timestamp

on

the

latest

message

received

from

each

sender

if

the

timestamp

in

the

new

message

received

is

not

greater

than

the

timestamp

stored

in

the

array

the

new

message

is

a

replay

attack

Thus

messages

may

not

be

forged

modified

or

replayed

to

anyone

's

advantage

The

customer

can

however

have

Product

rerouted

through

a

secret

channel

and

prevent

it

from

reaching

the

trusted

clock

That

way

the

customer

gets

the

Product

and

can

also

demand

the

refund

To

prevent

this

the

merchant

secures

Product

with

the

public

key

of

the

receiving

trusted

processor

Now

the

customer

can

not

receive

the

product

without

first

having

it

deciphered

by

the

trusted

clock

The

merchant

may

also

deny

that

he

received

a

Demand

or

this

demand

may

genuinely

be

lost

in

the

network

Such

a

denial

will

be

futile

since

the

timestamp

records

on

the

trusted

clock

will

show

that

either

the

product

has

still

not

been

received

or

that

it

was

received

after

the

stipulated

time

elapsed

Privacy

The

privacy

of

the

messages

are

not

violated

by

making

the

protocol

real-time

aware

This

is

because

of

the

messages

is

transmitted

in

a

less

secure

form

than

before

The

timestamp

on

a

message

may

be

readable

but

it

reveals

no

useful

information

The

only

information

revealed

is

the

current

time

and

the

number

of

message

received

by

an

unidentified

customer

from

a

certain

merchant

Even

this

is

readable

only

in

the

Order

or

the

Demand

If

the

customer

wishes

for

this

information

to

be

private

it

can

be

achieved

with

the

merchant

's

public

key

or

included

in

the

privacy

mechanism

provided

by

the

original

protocol

for

other

fields

of

the

Order

Low

Overhead

Cost

The

real-time

aware

protocol

incurs

the

extra

cost

in

terms

ofq

the

secure

co-processor

the

encryptions

the

signatures

and

the

Demand

message

These

costs

are

generally

nominal

and

are

justified

in

most

protocols

since

without

these

the

customer

may

incur

large

financial

losses

There

are

some

protocols

that

are

specifically

designed

for

low

cost

transactions

where

the

payment

is

made

for

many

transactions

together

If

-LRB-

and

how

-RRB-

these

protocols

can

be

made

real-time

aware

is

still

an

open

question

The

Special

Case

-LRB-

no

Product

delivery

-RRB-

We

now

consider

the

type

of

transactions

where

real-time

execution

is

only

critical

when

the

transaction

is

being

executed

at

the

merchant

's

end

-LRB-

Y

in

Figure

-RRB-

This

may

occur

when

the

merchant

is

providing

a

real-time

service

-LRB-

such

as

sale

of

some

shares

-RRB-

that

need

not

be

confirmed

in

real-time

or

when

the

user

is

satisfied

to

know

that

the

merchant

dispatched

the

goods

on

time

and

is

ready

to

incur

the

losses

associated

with

network

delays

Furthermore

in

such

transactions

if

we

include

the

network

communications

delays

-LRB-

for

sending

the

Order

or

receiving

the

Product

-RRB-

in

the

stipulated

time

the

window

for

the

actual

execution

of

the

transaction

at

the

merchant

's

end

is

reduced

Such

transactions

can

be

handled

using

a

different

methodology

and

architecture

that

reduces

the

costs

involved

at

the

customer

's

side

In

the

new

architecture

the

trusted

clocks

are

placed

in

close

proximity

to

the

merchant

This

not

only

reduces

the

cost

associated

with

installing

a

secure

co-processor

near

every

customer

it

provides

added

anonymity

as

the

public

key

of

the

clock

is

now

associated

with

the

merchant

and

not

the

customers

The

same

two

messages

are

identified

and

modified

here

The

modification

to

the

original

protocol

is

shown

in

Figure

Old

Msg

New

message

sent

to

clock

New

Timestamped

Msg

Order

Order

SK

-LRB-

Order

R

-RRB-

Order

S

-LRB-

Order

R

-RRB-

Product

Product

R

Product

S

-LRB-

Product

R

-RRB-

Figure

Modification

to

the

Transaction

Protocol

In

the

detection

mechanism

the

customer

only

sends

a

Demand

with

the

Order

attached

to

it

The

Demand

is

sent

when

the

customer

believes

that

the

confirmation

of

service

was

not

dispatched

on

time

The

customer

may

decide

to

sent

a

demand

after

receiving

the

Product

and

examining

the

timestamp

or

when

the

customer

estimates

that

the

Product

-LRB-

confirmation

of

service

-RRB-

should

have

arrived

but

it

has

not

The

merchant

must

show

that

the

Demand

was

sent

too

early

-LRB-

TD

TO

TS

-RRB-

or

that

the

Product

was

dispatched

on

time

-LRB-

TP

TO

TS

-RRB-

The

merchant

can

look

up

TP

from

the

copy

of

the

Product

sent

to

the

merchant

by

the

secure

clock

for

the

merchant

's

records

If

the

merchant

is

unable

to

establish

either

of

the

above

two

conditions

the

merchant

has

to

refund/compensate

the

customer

for

the

losses

The

arguments

for

preserving

the

useful

security

properties

of

the

original

protocol

remains

the

same

as

in

Subsection

Application

of

the

General

Methodology

to

the

Net

Bill

Protocol

In

this

section

we

use

an

existing

well

known

electronic

commerce

protocol

namely

NetBill

-LSB-

-RSB-

to

illustrate

the

general

methodology

We

will

see

how

our

methodology

works

when

applied

to

an

existing

operational

electronic

commerce

protocol

and

how

it

preserves

the

useful

properties

of

this

protocol

The

NetBill

Protocol

The

NetBill

protocol

was

designed

at

the

Carnegie

Mellon

University

The

emphasis

in

this

protocol

is

on

the

atomicity

of

transactions

but

the

protocol

also

ensures

security

anonymity

privacy

and

incurs

only

nominal

overhead

charges

We

describe

the

protocol

briefly

below

without

going

into

details

of

how

these

properties

are

ensured

Let

us

for

the

purpose

of

this

discussion

just

assume

that

the

above

mentioned

properties

are

ensured

We

use

the

notation

X

-RRB-

Y

Msg

to

indicate

that

X

sends

the

specified

message

Msg

to

Y

The

parties

involved

in

the

protocol

are

the

customer

C

the

merchant

M

and

the

NetBill

server

N

The

NetBill

protocol

consists

of

the

following

steps

-LSB-

-RSB-

C

-RRB-

M

Price

request

M

-RRB-

C

Price

quote

C

-RRB-

M

Goods

request

M

-RRB-

C

Goods

encrypted

with

key

K

C

-RRB-

M

Signed

Electronic

Payment

Order

-LRB-

EPO

-RRB-

M

-RRB-

N

Endorsed

EPO

-LRB-

eEPO

-RRB-

including

K

N

-RRB-

M

Signed

eEPO

including

K

M

-RRB-

C

Signed

eEPO

including

K

The

General

Methodology

Applied

to

the

NetBill

Protocol

Modification

to

NetBill

We

first

identify

Order

and

Product

in

the

above

protocol

Order

corresponds

to

Step

in

the

NetBill

protocol

Before

Step

the

customer

can

simply

abort

the

transaction

However

Step

is

where

the

customer

makes

a

binding

agreement

to

buy

the

goods

Product

corresponds

to

Step

since

the

customer

can

use

the

product

only

after

receiving

the

key

K

in

Step

When

modified

using

the

general

methodology

the

NetBill

protocol

looks

as

shown

below

Here

we

add

one

extra

party

the

secure

clock

X.

Note

that

we

also

modify

Step

and

Step

to

establish

the

time

period

within

which

the

goods

must

be

delivered

Note

that

Step

and

Step

below

are

two

phases

of

Step

in

the

original

protocol

and

Step

and

Step

are

also

two

phases

of

Step

in

the

original

protocol

The

first

phase

corresponds

to

the

hop

from

the

sender

to

the

secure

clock

and

the

second

phase

to

the

hop

from

the

secure

clock

to

the

receiver

C

-RRB-

M

Price

and

time

period

request

M

-RRB-

C

Price

and

time

period

quote

C

-RRB-

M

Goods

request

M

-RRB-

C

Goods

encrypted

with

key

K

C

-RRB-

X

Signed

Electronic

Payment

Order

-LRB-

EPO

-RRB-

R

X

-RRB-

M

EPO

R

N

S

-LRB-

EPO

R

N

-RRB-

M

-RRB-

N

Endorsed

EPO

-LRB-

eEPO

-RRB-

including

K

N

-RRB-

M

Signed

eEPO

including

K

-LRB-

SeEPOK

-RRB-

M

-RRB-

X

SeEPOK

R

SKX

-LRB-

SeEPOK

R

-RRB-

M

-RRB-

X

SeEPOK

R

N

S

-LRB-

SeEPOK

R

N

-RRB-

Detection

Mechanism

If

the

customer

has

received

the

message

in

Step

and

is

greater

than

the

time

quoted

in

Step

the

customer

sends

a

demand

for

refund

with

copies

of

the

messages

in

Step

-LRB-

the

clock

X

sends

a

copy

of

Step

to

the

customer

for

the

customer

's

records

-RRB-

and

Step

If

the

customer

has

not

received

the

message

in

Step

and

the

time

elapsed

-LRB-

as

per

the

customer

's

local

clock

-RRB-

from

Step

is

greater

than

the

time

quoted

in

Step

the

customer

sends

a

demand

for

refund

with

all

the

timestamped

messages

received

from

the

merchant

with

timestamp

greater

than

From

this

information

the

merchant

can

evaluate

-LRB-

see

Figure

-RRB-

if

the

customer

is

entitled

to

a

refund

The

merchant

sends

a

refund

if

the

customer

is

entitled

to

one

Properties

Let

us

examine

the

properties

of

the

enhanced

protocol

-LRB-

the

NetBill

protocol

with

a

real-time

violation

detector

-RRB-

in

comparison

to

the

properties

of

the

original

NetBill

protocol

Atomicity

The

NetBill

protocol

ensures

transaction

atomicity

In

the

NetBill

protocol

when

the

merchant

cashes

the

EPO

-LRB-

Electronic

Payment

Order

-RRB-

sent

by

the

customer

the

NetBill

server

records

the

product

key

and

the

product

information

If

the

customer

claims

that

the

key

was

not

delivered

the

NetBill

server

can

supply

the

key

from

its

records

Also

if

the

customer

claims

that

the

wrong

key

was

sent

the

NetBill

server

can

get

the

encrypted

product

from

the

customer

decrypt

it

and

verify

if

the

product

matches

the

product

description

recorded

by

the

server

If

not

the

NetBill

server

reverses

the

payment

made

to

the

merchants

account

In

the

real-time

aware

protocol

atomicity

is

preserved

The

customer

has

a

copy

of

the

EPO

sent

-LRB-

Step

-RRB-

and

the

proof

-LRB-

as

shown

in

the

demand

for

refund

-RRB-

that

the

goods

have

not

been

delivered

on

time

With

this

information

the

customer

can

directly

ask

the

NetBill

server

to

reverse

the

payment

Security

As

discussed

earlier

in

Subsection

the

security

of

the

original

protocol

is

preserved

The

extra

information

sent

-LRB-

the

timestamps

on

some

messages

and

the

demand

for

refund

-RRB-

are

secure

from

any

tampering

Privacy

All

messages

are

kept

intact

The

timestamps

attached

are

never

transmitted

over

the

network

in

plain

text

They

are

in

a

readable

signature

but

the

intruder

has

no

obvious

means

of

knowing

the

public

key

of

the

secure

clock

If

the

customer

wishes

to

guard

against

the

odds

that

the

timestamp

may

be

read

by

an

intruder

the

customer

can

use

the

methods

suggested

in

Subsection

to

do

so

Anonymity

The

NetBill

protocol

only

provides

minimal

anonymity

The

customer

is

allowed

to

operate

using

different

pseudonyms

The

same

anonymity

is

ensured

by

the

enhanced

protocol

by

using

different

pairs

of

key

at

the

trusted

clock

This

has

been

previously

discussed

in

Subsection

Low

overhead

cost

The

justification

for

the

extra

cost

incurred

is

given

in

Subsection

Conclusion

In

this

paper

we

have

developed

a

methodology

for

making

existing

secure

electronic

commerce

transaction

protocols

real-time

aware

The

methodology

consists

of

a

modification

to

the

original

protocol

by

adding

some

timestamps

and

augmenting

the

original

protocol

with

a

detection

mechanism

We

have

also

proposed

a

methodology

for

a

special

case

of

real-time

applications

where

the

network

communications

between

the

merchant

and

the

customer

are

not

included

in

the

real-time

constraints

We

illustrated

the

general

methodology

using

an

existing

electronic

commerce

protocol

namely

the

NetBill

protocol

We

showed

that

our

methodology

preserves

useful

security

properties

of

existing

electronic

commerce

protocol

namely

security

atomicity

anonymity

privacy

nominal

overhead

cost

As

a

result

the

methodology

is

applicable

to

most

of

these

existing

protocols

Our

methodology

has

significant

potential

to

bring

important

real-time

commerce

applications

to

the

electronic

front

and

to

improve

the

real-time

characteristics

of

those

applications

that

have

already

become

electronic

In

this

paper

we

focussed

on

a

general

methodology

and

have

explored

only

one

special

case

where

network

delays

are

excluded

from

the

real-time

constraints

Other

special

cases

of

the

general

methodology

may

be

explored

especially

the

case

where

the

customer

's

order

-LRB-

Order

-RRB-

over

the

network

is

included

in

the

real-time

constraints

while

the

Product

is

not

We

are

also

working

on

extending

the

methodology

to

protocols

that

have

a

single

payment

phase

for

multiple

transactions

-LRB-

these

protocols

emphasize

largely

on

low

overhead

cost

and

give

lesser

importance

to

other

security

aspects

-RRB-

References

-LSB-

-RSB-

R.

Anderson

Why

Cryptosystems

Fail

In

Communications

of

ACM

volume

-LSB-

B

-RSB-

J.

P.

Boly

et

al.

The

ESPRIT

Project

CAFE

High

Security

Digital

Payment

Systems

In

ESORICS

-LSB-

BGH

-RSB-

M.

Bellare

J.

A.

Garay

R.

Hauser

et

al.

iKP

A

Family

of

Secure

Electronic

Payment

Protocols

In

Proceedings

of

the

First

USENIX

Workshop

on

Electronic

Commerce

-LSB-

Cyb

-RSB-

CyberCash

The

CyberCash

System

How

it

works

Available

at

-LSB-

Dig

-RSB-

DigiCash

About

Ecash

Available

at

-LSB-

-RSB-

K.

E.

B.

Hickman

Secure

Socket

Library

Available

at

-LSB-

-RSB-

M.

Manasse

The

Millicent

Protocols

for

Electronic

Commerce

In

Proceedings

of

the

First

USENIX

Workshop

on

Electronic

Commerce

-LSB-

-RSB-

B.

C.

Neuman

and

G.

Medvinsky

Requirements

for

Network

Payment

The

NetCheque

Perspective

In

Proceedings

of

IEEE

COMPCON

-LSB-

-RSB-

L.

H.

Stein

E.

A.

Stefferud

N.

S.

Borenstein

and

M.

T.

Rose

The

Green

Commerce

Model

Available

at

-LSB-

-RSB-

M.

Sirbu

and

J.

D.

Tygar

NetBill

An

Internet

Commerce

System

In

IEEE

COMPCON

Available

at

-LSB-

-RSB-

J.

D.

Tygar

Atomicity

in

Electronic

Commerce

In

PODC

-LSB-

WW

-RSB-

S.

R.

White

S.

H.

Weingart

et

al.

Introduction

to

the

Citadel

Architechture

Security

in

Physically

Exposed

Environments

In

Technical

Report

Distributed

Security

Systems

Group

IBM

T.

J.

Watson

Research

Center

-LSB-

-RSB-

B.

S.

Yee

Using

Secure

Coprocessors

In

Ph.D.

thesis

Computer

Science

Technical

Report

Carnegie

Mellon

University

O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O B I O O O O O B I O O O O O O O O O O O O O B I O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O B O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O B O O B O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B O B O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O B B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O B O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O B O O O B I O O O O B O B O B O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O

anonymity
atomicity
electronic commerce
privacy
security
stock market
transaction


Parallel k-Set Mutual Range-Join with Least Comparisons in Hypercubes ? Hong Shen School of Computing and Information Technology Griffith University Nathan , QLD 4111 , Australia July 8 , 1994 Abstract The mutual range-join of k sets , S1 , S2 , ? ? ? , Sk , is the set containing all tuples -LRB- s1 ; s2 ; ? ? ? ; sk -RRB- that satisfy e1 < = jsi ? sj j < = e2 for all 1 < = i < > j < = k , where si 2 Si and e1 < = e2 are fixed constants . This paper presents an efficient parallel algorithm for computing the k-set mutual range-join in hypercube computers . The proposed algorithm uses a fast method to determine whether the differences of all pair numbers among k given numbers are within a given range and applies the technique of permutation-based range-join -LSB- 11 -RSB- . To compute the mutual range-join of k sets S1 , S2 , ? ? ? , Sk in a hypercube of p processors with O -LRB- ? ki = 1ni p -RRB- local memory , p < = jSij = ni and 1 < = i < = k , our algorithm requires at most O -LRB- k log k p Qki = 1 ni -RRB- data comparisons that are the least possible in the worst case . 1 Introduction The problem of k-set mutual range-join is to compute a subset of the Cartesian product of k given data sets in which each element -LRB- tuple -RRB- satisfies that the -LRB- absolute value -RRB- difference between any pair components falls into the range -LSB- e1 , e2 -RSB- , where < = e1 < = e2 are fixed constants -LRB- bounds -RRB- , 1 < = i < > j < = k. Like k-set chain range-join -LSB- 14 -RSB- , k-set mutual range-join is a generalisation of the standard range-join operation raised in -LSB- 11 -RSB- that covers both equijoin and non-equijoin and has wide applications in database management , information processing and statistics . When k = 2 this problem is the standard -LRB- 2-set -RRB- range-join problem . When e2 = 0 , the problem ? This work was partially supported by Australia Research Council under its Small Grants Scheme . becomes k-set equijoin which is the ordinary join operation in most cases -LSB- 16 -RSB- . For simplicity and without loss of generality , we assume that all elements in R and S are numbers . Various algorithms on sequential and parallel equijoin have been proposed -LSB- 1-2 , 4-5 , 7-9 , 15 -RSB- and they are mainly based on the most effective and promising technique for equijoin , the hash-based join . As to non-equijoin for which the hash-based join technique is ineffective , few results are known until recently -LSB- 3 , 6 , 11-14 -RSB- . In -LSB- 11 - 13 -RSB- we proposed permutation-based join and selection-based join as two alternative techniques for solving the problem of 2-set range-join in hypercubes . In -LSB- 3 -RSB- we presented a permutation-based join algorithm for 2-set range-join in N-dimensional torus . In -LSB- 14 -RSB- , we described an efficient algorithm for computing the k-set chain range-join . This paper addresses the problem of k-set mutual range-join . We first propose a fast method to determine whether the differences of all pair numbers in k given numbers fall into a given range , and then present an efficient parallel algorithm for solving the k-set mutual range-join problem that runs in a hypercube SIMD machine without shared memory or disk and requires the least -LRB- data -RRB- comparisons . 2 Preliminaries We use the same definition and assumptions on hypercube as described in -LSB- 14 -RSB- : A d-dimensional hypercube consists of 2d -LRB- d > = 0 -RRB- processors addressed from to 2d ? 1 by d-bit numbers -LRB- id ? 1id ? 2 ? ? ? i0 -RRB- . All the processors in the hypercube are connected via bidirectional links defined by a set of interconnection functions : I0 , I1 , ? ? ? , Id ? 1 , where Iw connects each pair of processors whose addresses differ only at the precise wth bit , < = w < = d ? 1 . All the -LRB- 2d ? 1 -RRB- pairs of processors connected by Iw form the wth dimension of the hypercube . For integer i = id ? 1id ? 2 ? ? ? i0 , i -LRB- w -RRB- is defined to be the integer whose binary representation differs from i 's only at the wth bit : i -LRB- w -RRB- = id ? 1 ? ? ? iw +1 iwiw ? 1 ? ? ? i0 . Thus Iw connects Pi and P -LRB- w -RRB- i for all < = i < = p ? 1 . Figure 1 shows processor connection and dimensioning in a hypercube of 16 processors . Below are some assumptions on the hypercube computer which are followed in this paper : ffl Hypercube is an SIMD -LRB- Single Instruction-stream and Multiple Data-stream -RRB- machine without shared memory . ffl Each processor has a local memory of size O -LRB- Pp -RRB- , where P is the problem size -LRB- a function on input-size and output-size -RRB- . It has also a local disk of fixed size . ffl Each processor can perform the following operations in constant time : conventional arithmetic and logic operations , data comparison , transferring a -LRB- fixedsized -RRB- block of data to a neighbouring processor , and writing a block of data to local disk . P1 P0 P4 P5 7P P6 P12 13P 3P P2 P15 d-0d-1 d-3 d : dimension d-2 P P P11 10 8 9P P14 Figure 1 : A 4-dimensional hypercube of 16 processors The k-set mutual range-join is defined as follows : Definition 1 Let S1 , S2 , ? ? ? , Sk be k sets containing n1 , n2 , ? ? ? , nk elements respectively , e1 and e2 constants -LRB- 0 < = e1 < = e2 -RRB- . The mutual range-join of S1 , S2 , ? ? ? , Sk , denoted by T = MJ -LRB- S1 ; S2 ; ? ? ? ; Sk -RRB- , is a set containing all tuples -LRB- s1 ; s2 ; ? ? ? ; sk -RRB- satisfying e1 < = jsi ? sj j < = e2 for all 1 < = i < > j < = k , where si 2 Si . The size of set T depends entirely on the data distribution in S1 , S2 , ? ? ? , Sk . We call tuple -LRB- a1 ; a2 ; ? ? ? ; ak -RRB- is a mass in range -LSB- e1 ; e2 -RSB- if e1 < = jai ? ajj < = e2 for all 1 < = i < > j < = k. Clearly each element in the mutual range-join of S1 , S2 , ? ? ? , Sk is a mass in the specified range . We say that number a matches number b -LRB- in range -LSB- e1 , e2 -RSB- -RRB- if e1 < = ja ? bj < = e2 . Thus each pair components of any tuple in T are matching components . 3 Fast method for mass determination Given k numbers s1 , s2 , ? ? ? , sk , and two constants e1 < = e2 , we are required to determine whether or not tuple -LRB- s1 ; s2 ; ? ? ? ; sk -RRB- is a mass in range -LSB- e1 ; e2 -RSB- . A straightforward method for solving this problem is to check all different pairs of numbers , which would need k -LRB- k ? 1 -RRB- 2 comparisons . However , if the components in the tuple is sorted , we find that k comparisons are sufficient to complete the above job as described in the following lemma : Lemma 1 Let s1 < = s2 < = ; ? ? ? ; < = sk be k given numbers . If e1 < = jsi ? si +1 j < = e2 for 1 < = i < = k ? 1 and e1 < = jsk ? s1j < = e2 hold , then e1 < = jsi ? sj j < = e2 is true for all 1 < = i < > j < = k. Proof Assume that the theorem is false , that is , its condition holds whereas 9x ; y 2 -LSB- 1 ; k -RSB- and x < y such that -LRB- jsx ? sy j < e1 -RRB- _ -LRB- jsx ? syj > e2 -RRB- . If jsx ? syj < e1 , then jsx ? sx +1 j < = jsx ? sy j < e1 since sx < = sx +1 < = ? ? ? < = sy , which contradicts the condition of the theorem . If jsx ? sy j > e1 , then jsk ? s1j > = jsx ? skj > = jsx ? sy j > e2 since s1 < = ? ? ? sx < = ? ? ? < = sy < = ? ? ? < = sk , which is contradictory with the condition too . Thus the assumption can not hold . 2 We further claim that the above k comparisons are necessary to check whether tuple -LRB- s1 ; s2 ; ? ? ? ; sk -RRB- is a mass in range -LSB- e1 ; e2 -RSB- by the following lemma : Lemma 2 Let s1 < = s2 < = ? ? ? < = sk be k given numbers . Checking whether e1 < = jsi ? sj j < = e2 holds for all 1 < = i < > j < = k requires at least k comparisons . Proof View s1 < = s2 < = ? ? ? < = sk as k vertices and add an edge between si and sj -LRB- i < > j -RRB- if there is a comparison being carried out between them . To obtain the relation between si and sj w.r.t. the satisfaction to inequality e1 < = jsi ? sj j < = e2 for all 1 < = i < > j < = k , we require that all the k vertices are connected since otherwise there is no way to know the relation between any pair of unconnected vertices , which would require at least k ? 1 edges . k-1 edges 1 edge s1 sk Figure 2 : Minimum connections for cyclically transitive relations Clearly k ? 1 edges can connect k vertices only into a tree . In order to obtain the relation -LRB- w.r.t. the satisfaction to the specified inequality -RRB- between every pair of non-neighbouring vertices in the tree , we must have that the tree is an ordered tree so that sequence fs1 ; s2 ; ? ? ? ; skg can be produced by using a traversal scheme , and that all the relations of neighbouring pairs of vertices are cyclically transitive to generate the relations of non-neighboring nodes . Achieving this with adding fewest extra edges into the tree requires that the above tree is a linear array whose elements follow the same partial order as input -LRB- i.e. the i-th element is si , 1 < = i < = k -RRB- and that one extra edge is added to connect the head -LRB- s1 -RRB- and tail -LRB- sk -RRB- of the array to make the array become a ring , as depicted in Figure 2 . 2 For arbitrary -LRB- s1 ; s2 ; ? ? ? ; sk -RRB- , making the relations of all neighbouring pairs of numbers to be transitive is equivalent to sorting them . Hence by Lemma 1 and 2 we have the following theorem : Theorem 1 Let s1 ; s2 ; ? ? ? ; sk be k given numbers . An upper bound on comparisons for checking whether e1 < = jsi ? sj j < = e2 holds for all 1 < = i < > j < = k is O -LRB- k log k -RRB- and it is tight . Consequently , we have the following corollary which gives a lower bound for computing the mutual range-join of k given sets : Corollary 1 A lower bound on the number of comparisons for computing the mutual range-join of sets S1 , S2 , ? ? ? , Sk in the worst case is ? -LRB- k log k Qki = 1 jSij -RRB- . Proof The Cartesian product of S1 , S2 , ? ? ? , Sk has Qki = 1 jSij elements , each a k-tuple , which is the maximum size of the result set of mutual range-join of these sets . By Theorem 1 , checking whether a tuple is a mass in -LSB- e1 ; e2 -RSB- needs at least O -LRB- k log k -RRB- comparisons . The correctness of the corollary follows immediately . 2 4 Parallel algorithm for mutual range-join Let data sets S1 , S2 , ? ? ? , Sk be each distributed evenly over p processors in a hypercube , p = 2d < = jSij = ni , and processor Pj holds Sji , where < = i < = k and < = j < = p ? 1 . We are required to compute the mutual range-join of S1 , S2 , ? ? ? , Sk : T = MJ -LRB- S1 ; S2 ; ? ? ? ; Sk -RRB- . Following Lemma 1 , to check whether tuple -LRB- s1 ; s2 ; ? ? ? ; sk -RRB- is an element of T we should first sort its components , then compare each pair of adjacent components as well as the pair of the first and last components , and finally restore the sorted tuple back to the original order if it is accepted . The sketch of our algorithm is the following : 1 . T : = Sk ; 2 . For i = k ? 1 ; k ? 2 ; ? ? ? ; 1 permute Si in the hypercube such that all its subsets meet Sv at processor Pv to form all possible combinations of Sui and T v for < = u ; v < = p ? 1 ; 3 . Following each step of permutation , use a proper sequential algorithm to compute the mutual range-join of Sui permuted to processor Pv and T v at Pv : for each pair of elements s and t , s 2 Sui and t 2 T v , first insert s into t and then compute the differences of s and its cyclical left and right neighbours in t ; accept t if both differences are within range -LSB- e1 ; e2 -RSB- or reject it otherwise . Thus T v = MJ -LRB- T v ; Si -RRB- is obtained at processor Pv , < = v < = p ? 1 , after Si is fully permuted . Hence T = -LSB- p ? 1 v = 0T v = MJ -LRB- Sk ; Sk ? 1 ; ? ? ? ; Si -RRB- is produced . Assume that s is inserted to the position between components t -LRB- i -RRB- and t -LRB- i +1 -RRB- in t , the cyclical left and right neighbours of s are shown in Figure 3 . Obviously using the above method to expand t -LRB- increase the arity from 1 to k -RRB- , we can ensure that finally if t is accepted all its components are sorted and each pair of cyclically neighbouring t -LRB- 0 -RRB- t -LRB- 1 -RRB- t -LRB- r-1 -RRB- << < < - - - - s right left t -LRB- 0 -RRB- t -LRB- r-1 -RRB- << < < - - - - t t -LRB- i -RRB- -LRB- i +1 -RRB- s rightleft t -LRB- 1 -RRB- t -LRB- 0 -RRB- t -LRB- r-1 -RRB- << - - - < - < right left s exsisting comparions in t added comparisons when s is inserted into t Figure 3 : Cyclical left and right neighbours of s in t = -LRB- t -LRB- 0 -RRB- ; t -LRB- 1 -RRB- ; ? ? ? ; t -LRB- r ? 1 -RRB- -RRB- components are matching pair , and therefore by Theorem 1 t is a mass in range -LSB- e1 ; e2 -RSB- and thus an element of T . Theorem 2 -LSB- 11 -RSB- Assume that p equal-sized data blocks , A0 , A1 , Ap ? 1 , are distributed evenly over p = 2d processors of a hypercube , where each processor Pi holds Ai . Transfer of these data blocks to each Pi , < = i < = p ? 1 , can be realized by permuting data p ? 1 times , where the qth permutation is data exchange in the w0th dimension between each pair of processors connected via Iw0 , that is , Ai ! Ai -LRB- w0 -RRB- for all < = i < = p ? 1 , where w0 is the least significant \ 1 '' bit in q 's binary representation : q = 2wt ? 1 + 2wt ? 2 + ? ? ? + 2w0 , wj > wj ? 1 for 1 < j < = t ? 1 . Let \ ? '' denote the logic -LRB- bit-wise -RRB- AND operation , \ ? '' the logic COMPLEMENT operation , that is , if a = at ? 1at ? 2 ? ? ? a0 -LRB- binary code -RRB- and b = bt ? 1bt ? 2 ? ? ? b0 , then a ? b = -LRB- at ? 1ANDbt ? 1 -RRB- -LRB- at ? 2ANDbt ? 2 -RRB- ? ? ? -LRB- a0ANDb0 -RRB- , and ? a = at ? 1at ? 2 ? ? ? a0 . The following lemma is a well-known fact that shows how to compute the least significant \ 1 '' bit in an integer 's binary representation . Lemma 3 -LSB- 11 -RSB- For any positive integer q , the position of its least significant \ 1 '' bit in its binary representation is given by w0 = log -LRB- q ? -LRB- ? q + 1 -RRB- -RRB- : -LRB- 1 -RRB- As AND and COMPLEMENT are conventional logic operations which each processor in a hypercube can provide , Equation -LRB- 1 -RRB- is computed in constant time . Consequently , by Theorem 1 the dimension number for the qth data permuting can be computed in constant time , 1 < = q < = p ? 1 . Remark Computing w0 by Equation -LRB- 1 -RRB- is needed only for those q that are even and have more than one \ 1 '' bit in their binary representations , since it is trivial that w0 = for odd q , and w0 = log q for q = 2k , < k < = t ? 1 . 2 By Theorem 2 , we know that for all u and a given v -LRB- 0 < = u ; v < = p ? 1 -RRB- the p result sets of mutual range-join of Sui ? 1 and T vi will be obtained at Pv in p ? 1 steps of data permuting , each exchanging two data blocks of size ni ? 1p , and requiring local memory O -LRB- ni ? 1p + jT vi j -RRB- . Let -LRB- y0 ; y1 ; ? ? ? ; yr ? 1 -RRB- be a r-tuple sorted in nondecreasing order , and SEARCH -LRB- -LRB- y0 ; y1 ; ? ? ? ; yr ? 1 -RRB- , x , h -RRB- be a sequential binary-search procedure that searches for the correct position of datum x in -LRB- y0 ; y1 ; ? ? ? ; yr ? 1 -RRB- and outputs position -LRB- h -RRB- such that yh < = x < = yh +1 . Clearly the number of comparisons needed in SEARCH is O -LRB- log jY j -RRB- . Let A = fa0 ; a1 ; ? ? ? ; ajAj ? 1g and B = fb0 ; b1 ; ? ? ? ; bjBj ? 1g , where ai is a single data item and bj is a tuple of arity r whose components are sorted in nondecreasing order . We denote the time for a single data comparison , for a single arithmetic operation and for a single I/O operation by oC , oA and oIO respectively . The following procedure computes C = MJ -LRB- A ; B -RRB- , the mutual range-join of A and B. Procedure MUTUAL-RANGE-JOIN -LRB- A , B , r , e1 , e2 , M , C , Z -RRB- f * Compute the mutual range-join of A and B on a uniprocessor using memory M . Input A = fa0 ; a1 ; ? ? ? ; ajAj ? 1g , B = fb0 ; b1 ; ? ? ? ; bjBj ? 1g , r , e1 and e2 , where ai is a single data item and bj is a r-tuple sorted in nondecreasing order . Output C = fc0 ; c1 ; ? ? ? ; cjCj ? 1g and Z = fz0 ; z2 ; ? ? ? ; zjCj ? 1g , where ci is a tuple of arity r + 1 , zi is a single number indicating the correct position of ci in MJ -LRB- A ; B -RRB- , and jCj < = jAjjBj ? 1 . * g t : = 0 ; for i : = to jAj ? 1 do for j : = to jBj ? 1 do SEARCH -LRB- -LRB- bj -LRB- 0 -RRB- ; bj -LRB- 1 -RRB- ; ? ? ? ; bj -LRB- r ? 1 -RRB- , ai , h -RRB- ; f * Search for the correct position -LRB- h -RRB- of ai in tuple bj : bh -LRB- 0 -RRB- < = ai < = bh +1 -LRB- 0 -RRB- , where ? 1 < = h < = r ? 1 , bj -LRB- ? 1 -RRB- = ? 1 and bj -LRB- r -RRB- = 1 , b ? j -LRB- k -RRB- is the kth component of bj . * g if -LRB- h = ? 1 -RRB- ^ -LRB- e1 < = jai ? bj -LRB- 0 -RRB- j < = e2 -RRB- ^ -LRB- e1 < = jai ? bj -LRB- r ? 1 -RRB- j < = e2 -RRB- then -LRB- ct -LRB- 0 -RRB- ; ct -LRB- 1 -RRB- ; ? ? ? ; ct -LRB- r -RRB- -RRB- : = -LRB- ai ; bj -LRB- 0 -RRB- ; ? ? ? ; bj -LRB- r ? 1 -RRB- -RRB- ; -LRB- z0 ; z1 ; ? ? ? ; zr -RRB- : = -LRB- 0 ; 1 ; ? ? ? ; r -RRB- ; t : = t + 1 ; if -LRB- 0 < = h < r ? 1 -RRB- ^ -LRB- e1 < = jai ? bj -LRB- h -RRB- j < = e2 -RRB- ^ -LRB- e1 < = jai ? bj -LRB- h +1 -RRB- j < = e2 -RRB- then -LRB- ct -LRB- 0 -RRB- ; ? ? ? ; ct -LRB- h -RRB- ; ct -LRB- h +1 -RRB- ; ct -LRB- h +2 -RRB- ; ? ? ? ; ct -LRB- r -RRB- -RRB- : = -LRB- b -LRB- j -LRB- 0 -RRB- ; ? ? ? ; bj -LRB- h -RRB- ; ai ; bj -LRB- h +1 -RRB- ; ? ? ? ; bj -LRB- r ? 1 -RRB- -RRB- ; -LRB- z0 ; z1 ; ? ? ? ; zr -RRB- : = -LRB- 1 ; ? ? ? ; h ; ; h + 1 ; ? ? ? ; r -RRB- ; t : = t + 1 ; if -LRB- h = r ? 1 -RRB- ^ -LRB- e1 < = jai ? bj -LRB- 0 -RRB- j < = e2 -RRB- ^ -LRB- e1 < = jai ? bj -LRB- r ? 1 -RRB- < = e2 -RRB- then -LRB- ct -LRB- 0 -RRB- ; ? ? ? ; ; ct -LRB- r ? 1 -RRB- ; ct -LRB- r -RRB- -RRB- : = -LRB- b -LRB- j -LRB- 0 -RRB- ; ? ? ? ; bj -LRB- r ? 1 -RRB- ; ai ; -RRB- ; -LRB- z0 ; z1 ; ? ? ? ; zr -RRB- : = -LRB- 1 ; 2 ; ? ? ? ; r ; 0 -RRB- ; t : = t + 1 ; f * Insert ai into bj and keep in Z their correct positions in the Cartesian product . * g if t = b M r +1 c ? 1 then write C to -LRB- local -RRB- disk ; t : = 0 ; if t > then write C to disk f * Write the last unfilled block of result to disk . * g end . Clearly the running time of the above procedure is at most TA ; B 1e2e1 = jAjjBj -LRB- log roC + -LRB- 2r + 6 -RRB- oA + -LRB- r + 1 -RRB- jAjjBj M oIO -RRB- -LRB- 2 -RRB- in the worst case . Following the basic idea described before , our hypercube parallel algorithm for computing the range-join of S1 , S2 , ? ? ? , Sk is presented as follows . Algorithm CUBE-MUTUAL-RANGE-JOIN -LRB- S1 , ? ? ? , Sk , e1 , e2 , p , T -RRB- f * Compute the mutual range-join of S1 , S2 , ? ? ? , Sk in a hypercube of p = 2d processors . Input Su1 , Su2 , ? ? ? , Suk , e1 , e2 and p stored in Pu , where < = u < = p ? 1 and Si = -LSB- p ? 1 u = 0Sui for 1 < = i < = k. Output T = -LSB- p ? 1 u = 0Tu = MJ -LRB- S1 ; S2 ; ? ? ? ; Sk -RRB- , where Tu = MJ -LRB- S1 ; S2 ; ? ? ? ; Sk ? 1 ; Suk -RRB- is stored in Pu . * g 1 . for i : = to p ? 1 do in parallel for j : = to nkp ? 1 do tij -LRB- 0 -RRB- : = sik ; j ; f * T i : = Sik . * g 2 . for j : = k ? 1 downto 1 do 2.1 for i : = to p ? 1 do in parallel MUTUAL-RANGE-JOIN -LRB- Sij , T i , k ? j , e1 , e2 , ? ki = 1ni p , T i , Z -RRB- ; f * T i : = MJ -LRB- Sij ; T i -RRB- . * g 2.2 for q : = 1 to p ? 1 do f * Permute Sij p ? 1 times to transfer it to all processors in the hypercube for all < = i < = p ? 1 . * g 2.2.1 for i : = to p ? 1 do in parallel 2.2.2 if q mod 2 = 1 then w : = f * q is odd . * g else if q ? 2blog qc = then w : = log q f q contains only one \ 1 '' bit . * g else w = log -LRB- q ? -LRB- ? q + 1 -RRB- -RRB- ; f * q is even and contains more than one \ 1 '' bit . * g 2.2.3 Sij ! Si -LRB- w -RRB- j ; 2.2.4 MUTUAL-RANGE-JOIN -LRB- Sij , T i , k ? j , e1 , e2 , ? ki = 1ni p , T i , Z -RRB- ; f * Exchange Sij and Si -LRB- w -RRB- j and compute T i : = MJ -LRB- Sij ; T i -RRB- . * g 3 . for i : = to p ? 1 do in parallel for j : = to jT ij do for h : = to k ? 1 do tij -LRB- zh -RRB- : = tij -LRB- h -RRB- f * Restore the positions of all components of each tuple in T i following the order in the Cartesian product . * g end . The correctness of the procedure is apparent from the comments interspersed with the procedure . The running time of the algorithm is analysed as follows : ffl Step 1 needs time nkp oA ; ffl Steps 2.1 and 2.2.4 needs time jSijjjT i -LRB- j -RRB- j -LRB- log -LRB- k ? j -RRB- oC + -LRB- 2k ? 2j + 6 -RRB- oA + -LRB- k?j +1 -RRB- jSijjjT i -LRB- j -RRB- j M oIO -RRB- , where jT i -LRB- j -RRB- j < = jSikj Qk ? 1 r = j +1 jSrj = Qkr = j +1 jSrj p and M = Pkq = 1 nq p ; ffl Steps 2.2.2 and 2.2.3 can be completed in constant time oA ; ffl Step 3 needs time kp Qkj = 1 jSjjoA , since jT ij = jSikj Q 1 < = j < > i < = k ? 1 jSijj = Qkj = 1 jSj j p . The total running time of CUBE-MUTUAL-RANGE-JOIN is therefore TS1 ; ??? ; Sk 1e2e1 = k ? 1 X j = 1 -LRB- p ? 1 -RRB- jSijjjT i -LRB- j -RRB- j -LRB- log -LRB- k ? j -RRB- oC + O -LRB- -LRB- k ? j -RRB- oA -RRB- + -LRB- k ? j + 1 -RRB- jSijjjT i -LRB- j -RRB- jp Pkq = 1 nq oIO -RRB- + k p kY j = 1 jSjjoA < = k ? 1 X j = 1 log -LRB- k ? j -RRB- p kY r = j nr + O -LRB- -LRB- k ? 1 X j = 1 k ? j p kY r = j nr + k p kY j = 1 nj -RRB- oA -RRB- + k ? 1 X j = 1 -LRB- k ? j + 1 -RRB- Qkr = j nr Pkq = 1 nq oIO < = O -LRB- k log k p kY i = 1 nioC + k2 p kY i = 1 nioA + k2 Qki = 1 ni Pki = 1 ni oIO -RRB- : -LRB- 3 -RRB- By Corollary 1 , the number of comparisons used in the algorithm is the minimum for the problem . Apparently , the algorithm requires at most O -LRB- ? ki = 1ni p -RRB- local memory at each pro- cessor in any case , where when jT ij > O -LRB- ? ki = 1ni p -RRB- T i is updated at Pi in blocks of size O -LRB- ? ki = 1ni p -RRB- one by one . Hence , we have the following theorem : Theorem 3 Let sets S1 , S2 , ? ? ? , Sk be each distributed evenly over p processors in a hypercube , where p < = jSjj = nj and processor Pi holds subsets Sij , where 1 < = j < = k and < = i < = p ? 1 . The mutual range-join of S1 , S2 , ? ? ? , Sk can be computed in the hypercube with O -LRB- ? ki = 1ni p -RRB- local memory in at most O -LRB- k log k p Qki = 1 ni -RRB- comparisons in the worst case , which reaches the lower bound on the number of comparisons . 5 Concluding remarks We have addressed the k-set mutual range-join problem , that is , to compute all those tuples in the Cartesian product of S1 , S2 , ? ? ? , Sk in which each satisfies that the differences of all pairs of components are within a given range . In parallel with k-set chain range-join -LSB- 14 -RSB- , the k-set mutual range-join problem is a generalisation of the conventional range-join problem . We have proposed a novel method to determine whether the differences of all pair numbers among k given numbers are within a given range . Our method reduces the number of comparisons from O -LRB- k2 -RRB- required by the usual method to O -LRB- k log k -RRB- which is proved to be optimal . Based on the proposed method and the technique of permutation-based range-join described in -LSB- 11 -RSB- , we have presented an efficient parallel algorithm for solving the k-set mutual range-join problem in hypercube computers . To compute the mutual range-join of S1 , S2 , ? ? ? , Sk in an SIMD hypercube computer of p processors with O -LRB- ? ki = 1ni p -RRB- local memory , where p < = jSij = ni for 1 < = i < = k , our algorithm needs at most O -LRB- k log k p Qki = 1 ni -RRB- comparisons that are the least possible for solving the problem in the worst case . In the case when jSij < p and p < = jSjj for i = ss1 ; ss2 ; ? ? ? ; sst and j = sst +1 ; sst +2 ; ? ? ? , ssk , where fss1 ; ss2 ; ? ? ? ; sskg is a permutation of f1 ; 2 ; ? ? ? ; kg , our algorithm will also work correctly using the same treatment as described in -LSB- 11 -RSB- . The algorithm assumes the usual data distribution that Si is distributed evenly over p processors of the hypercube . To other typical cases of data distribution , the same solutions as described in -LSB- 14 -RSB- will apply . Like k-set chain range-join , our algorithm joins sets one by one in arbitrary -LRB- index-decreasing -RRB- order . We have observed that the join order affects the algorithm 's performance in many cases , but have not yet been able to find the optimal join order which minimises the running time of the algorithm . This should remain as an open problem for our future study . References -LSB- 1 -RSB- D. Bitton , H. Boral , D.J. DeWitt and W.K. Wilkinson , Parallel algorithms for the execution of relational database operations , ACM Trans . Database Systems 8 -LRB- 3 -RRB- -LRB- 1983 -RRB- 324-353 . -LSB- 2 -RSB- S.D. Chen , H. Shen and R. Topor , An improved hash-based join algorithm in the presence of double skew on a hypercube computer , Proc . 17th Annal Computer Science Conference , 1994 , 179-188 . -LSB- 3 -RSB- S.D. Chen , H. Shen and R. Topor , An efficient permutation-based parallel range-join algorithm on N-dimensional torus computers , to appear in Information Processing Letters , 1994 . -LSB- 4 -RSB- V. Deshpande , P. Larson and T.P. Martin , Parallel join algorithms for nested relations on shared-memory multiprocessors , Proc . 2nd IEEE Symposium on Parallel and Distributed Processing , IEEE Comput . Soc . Press , 1990 , 344-347 . -LSB- 5 -RSB- D.J. Dewitt and R.H. Gerber , Multi processor hash-based join algorithms , Proc . 11th Int . Conf . Very Large Data Bases , Stockholm , 1985 , 151-164 . -LSB- 6 -RSB- D.J. Dewitt , J.F. Naughton and D.A. Schnrider , An evaluation of non-equijoin algorithms , technical report , 1990 . -LSB- 7 -RSB- M. Kitsuregawa , H. Tanaka and T. Moto-oka , Application of hash to data base machine and its architecture , New Generation Computing 1 -LRB- 1 -RRB- -LRB- 1983 -RRB- 63-74 . -LSB- 8 -RSB- H.J. Lu , K.L. Tan and M.C. Shan , Hash-based join algorithms for multiprocessor computers with shared-memory , Proc . of the 16th VLDB Conf. , Brisbane , Australia , 1990 , 198-209 . -LSB- 9 -RSB- E. Omiecinski and E. Tien , A hash-based join algorithm for a cube-connected parallel computer , Information Processing Letters , 30 -LRB- 5 -RRB- -LRB- 1989 -RRB- 269-275 . -LSB- 10 -RSB- E. Omiecinski and E. Tien , The adaptive-hash join algorithm for a hypercube multicomputer , IEEE Trans . Parallel and Distributed Systems 3 -LRB- 3 -RRB- -LRB- 1992 -RRB- 334-349 . -LSB- 11 -RSB- H. Shen , An efficient permutation-based parallel algorithm for range-join in hypercubes , Res . Rep. No. 69 , School of Comput . and Inform . Tech. , Griffith University , 1993 . To appear in Parallel Computing . -LSB- 12 -RSB- H. Shen , Selection-based parallel range-join in hypercubes , Res . Rep. No. 71 , School of Comput . and Inform . Tech. , Griffith University , 1993 . To apppear in Proc . High Performance Computing Conference ' 94 , Singapore , 1994 . -LSB- 13 -RSB- H. Shen , An improved selection-based parallel range-join algorithm in hypercubes , Res . Rep. No. 76 , School of Comput . and Inform . Tech. , Griffith University , 1993 . To appear in Proc . EUROMICRO 94 , Liverpool , U.K. , 1994 . -LSB- 14 -RSB- H. Shen , Efficient parallel k-set chain range-join in hypercubes , Res . Rep. No. 75 , School of Comput . and Inform . Tech. , Griffith University , 1993 . Submitted for publication . -LSB- 15 -RSB- P. Valduriez and G. Gardarin , Join and semi-join algorithms for a multiprocessor database machine , ACM Trans . Database Systems 9 -LRB- 1 -RRB- -LRB- 1984 -RRB- 133-161 . -LSB- 16 -RSB- M.T. ? Ozsu and P. Valduriez , Principles of Distributed Database Systems , Prentice-Hall , Englewood Cliffs -LRB- 1991 -RRB- .

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O B O O O O O O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O B I O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O B O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O

data comparison
hypercube
parallel algorithm
permutation
processor