A new minimal average weight representation for left-to-right point multiplication methods Abstract-This paper introduces a new radix-2 representation with the same average weight as the width-w nonadjacent form (w-NAF). In both w-NAF and the proposed representations, each nonzero digit is an odd integer with absolute value less than M. However, for w-NAF, M is of the form 2 wÀ1 , while, for the proposed representation, it can be any positive integer. Therefore, using the proposed integer representation, we can use the available memory efficiently, which is attractive for devices with limited memory. Another advantage of the proposed representation over w-NAF is that it can be obtained by scanning the bits from leftto-right. This property is also useful for memory-constrained devices because it can reduce both the time and space complexity of fast point multiplication techniques. IN 1985, Koblitz [1] and Miller [2] proposed the group of points on an elliptic curve over a finite field to create the elliptic curve discrete logarithm problem (ECDLP). Unlike the discrete logarithm problem over the multiplicative group of a finite field (DLP), there is no known subexponential-time algorithm to solve the ECDLP in general. Thus, elliptic curves are an attractive alternative to implement many cryptographic techniques such as Diffie-Hellman [3] and ElGamal [4] .. Point multiplication dominates the execution time of elliptic curve cryptosystems, so various methods have been studied to enhance the performance of this operation [5] , [6] . Specifically, the integer representation of the multiplier plays an important role in the performance of these methods [7] . Among the existing integer representations, those with minimal average Hamming weight (number of nonzero digits), such as w-NAF, are more attractive. This is due to the fact that they reduce the required number of point additions/subtractions. It is also of interest to have a representation which can be obtained by scanning the bits from left to right (i.e., from the most significant bit to the least significant bit) [8] , [9] . This property eliminates the need for recoding and storing the multiplier in advance, hence improving the performance of left-to-right point multiplication methods in terms of running time and memory. We are also interested in representations which allow efficient usage of memory. This is important for devices with a small amount of memory. In [10] , the author proposes a generalized w-NAF representation which allows for more efficient memory usage than w-NAF. However, similar to the w-NAF recoding algorithm, this generalized w-NAF recoding algorithm scans the bits from right to left.. In this paper, we introduce a new integer representation which has the same average weight as w-NAF, but has the advantage that it results in a point multiplication method which uses less memory. This memory saving results from the fact that the new representation can be obtained by scanning the multiplier bits from left to right. It can also result in more efficient usage of memory. This is because, in the left-to-right point multiplication algorithms (such as Algorithm 1, given in Section 2.2), we need to store m points, where m is the number of positive integers in the digit set. For w-NAF, in the representations proposed in [11] , [12] and w-MOF [13] , 1 m is of the form 2 wÀ2 , where w is a positive integer greater than 1. So, if we have, for example, sufficient memory for storing seven points in a small device with little storage space, using these representations we can only store up to four points and the rest of the memory is wasted. However, using the proposed representation, we are able to use all available memory to store seven points. This is due to the fact that, for the proposed representation, m can be any positive integer.. The rest of this paper is organized as follows: In Section 2, we briefly review elliptic curves. Section 3 proposes the new integer representation and presents an efficient recoding algorithm to generate it. In Section 4, we analyze the average Hamming weight of the proposed representation. In Section 5, we evaluate the memory requirements of the proposed recoding algorithm and then compare it with the previous algorithms. Finally, we give some applications of the proposed representation and the conclusions in Sections 6 and 7, respectively. In this paper, a new radix-2 representation was proposed. The average Hamming weight of the proposed representation was analyzed and shown to be equal to the average Hamming weight of w-NAF. This is an important property as it speeds up point multiplication methods by reducing the required number of point additions/subtractions.. The proposed representation has two other properties which are especially attractive for efficient implementation of point multiplication methods in devices with a small amount of memory. First, the proposed representation can be obtained by scanning the bits from left to right. Consequently, there is no need to store the recoded representation in advance and, hence, the memory requirements are reduced. Second, using the proposed representation, we can store as many points as we want (up to the limits of available memory). Therefore, we can use memory efficiently to improve performance.

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 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 B I O O O O O B I 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 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 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 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 B I O O O O O O O O O O O O O O O O O O O O O B I 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


Monitoring

of

Grid

scientific

workflows

Scientific

workflows

are

a

means

of

conducting

in

silico

experiments

in

modern

computing

infrastructures

for

e-Science,

often

built

on

top

of

Grids.

Monitoring

of

Grid

scientific

workflows

is

essential

not

only

for

performance

analysis

but

also

to

collect

provenance

data

and

gather

feedback

useful

in

future

decisions,

e.g.,

related

to

optimization

of

resource

usage.

In

this

paper,

basic

problems

related

to

monitoring

of

Grid

scientific

workflows

are

discussed.

Being

highly

distributed,

loosely

coupled

in

space

and

time,

heterogeneous,

and

heavily

using

legacy

codes,

workflows

are

exceptionally

challenging

from

the

monitoring

point

of

view.

We

propose

a

Grid

monitoring

architecture

for

scientific

workflows.

Monitoring

data

correlation

problem

is

described

and

an

algorithm

for

on-line

distributed

collection

of

monitoring

data

is

proposed.

We

demonstrate

a

prototype

implementation

of

the

proposed

workflow

monitoring

architecture,

the

GEMINI

monitoring

system,

and

its

use

for

monitoring

of

a

real-life

scientific

workflow.

Scientific

workflows

are

used

by

the

scientists

to

perform

in

silico

experiments.

They

provide

numerous

benefits,

among

others,

the

automation

of

a

computation

process,

ease

of

use

important

for

non-IT

experts,

and

opportunity

to

share

and

reuse

experience

in

the

scientific

community.

Monitoring

of

scientific

workflows

is

important

in

many

scenarios,

to

name

a

few

typical

ones:.

An

application

developer

is

using

a

tracing

and

profiling

information

concerning

a

workflow

run

in

order

to

find

performance

bottlenecks.

A

scientist

is

searching

for

past

experiments

executed

as

workflows

which

satisfy

specific

characteristics

in

order

to

compare

his/her

results

to

those

obtained

by

other

scientists.

A

scientist

is

searching

for

a

provenance

information

concerning

a

data

item

in

order

to

learn

what

process

(workflow)

was

used

to

produce

this

data.

A

scientist

is

using

a

recorded

execution

of

a

workflow

in

order

to

repeat

an

experiment,

perhaps

slightly

changing

its

conditions.

A

scheduler

is

looking

for

information

concerning

invocations

of

specific

services,

gathered

from

multiple

workflow

runs,

in

order

to

optimize

Corresponding

author:

E-mail:

balis@aqh.edu.pl..

the

usage

of

computational

resources

for

a

next

run..

Until

recently,

scientific

computations

were

performed

mainly

via

tightly

coupled,

homogeneous,

parallel

applications

running

on

clusters.

However,

scientific

workflows

are

better

characterized

as

looselycoupled,

heterogeneous

distributed

applications,

often

running

on

Grids.

Consequently,

existing

tools

for

monitoring

of

applications

are

not

suitable

for

scientific

workflows

which

pose

new

challenges

for

monitoring..

In

this

paper,

key

challenges

related

to

monitoring

of

Grid

scientific

workflows

are

presented.

We

specifically

focus

on

the

design

of

a

Grid

workflow

monitoring

architecture,

and

the

problems

of

distributed

on-line

collection

and

correlation

of

workflow

monitoring

data

in

a

Grid.

Section

presents

the

related

work.

Section

describes

the

key

challenges

in

monitoring

of

Grid

scientific

workflows.

Section

presents

the

design

of

a

Grid

workflow

monitoring

infrastructure,

and

its

prototype

implementation,

the

GEMINI

monitoring

system.

Section

focuses

on

the

support

for

on-line

collection

of

workflow

monitoring

events.

Section

describes

the

problem

of

workflow

monitoring

data

correlation.

A

monitoring

example

of

a

Coordinated

Traffic

Management

(CTM)

workflow

is

presented

in

Section

We

have

presented

a

Grid

monitoring

architecture

for

scientific

workflows.

Specific

requirements

resulting

from

the

characteristics

of

Grid

scientific

workflows

were

analyzed

and

an

appropriate

solutions

to

deal

with

workflows'

distribution,

dynamics

and

heterogeneity,

were

proposed.

A

Grid

workflow

monitoring

architecture

has

been

introduced.

It

has

been

pointed

out

that

the

traditional

Grid

Monitoring

Architecture

needs

to

be

extended

in

order

to

support

on-line

collection

of

workflow

monitoring

data.

The

GEMINI

monitoring

infrastructure

has

been

presented,

and

an

example

of

monitoring

of

a

real-life

workflow

from

the

K-Wf

Grid

Project

has

been

shown..

Currently

we

are

working

on

an

ontology-based

monitoring

data

model

which

can

be

used

to

represent

a

meaningful

information

about

previously

running

workflows

(experiments),

and

the

usage

of

this

information

to

extract

knowledge

about

the

experiments

and

the

computing

infrastructure.

There

are

few

systems

that

address

monitoring

of

Grid

scientific

workflows.

PPerfGrid

deals

with

collection

and

storage

of

large

amounts

of

heterogeneous

performance

data

of

scientific

parallel

applications.

Mercury

supports

semi-online

monitoring

of

parallel

MPI

applications

in

the

Grid.

The

J-OCM

monitoring

system

and

the

JMT

performance

measurement

tool

support

on-line

performance

measurement

of

Java

applications

using

custom

user-defined

metrics..

However,

of

the

mentioned

tools

address

the

instrumentation

and

monitoring

of

Grid

scientific

workflows.

of

those

tools

features

a

runtime

instrumentation

service

supporting

heterogeneous

applications,

developed

in

multiple

programming

languages..

Based

on

the

analysis

of

the

requirements

posed

by

Grid

scientific

workflows

and

a

review

of

existing

work,

some

aspects

of

our

solution

have

been

adopted

from

existing

ones,

others

have

been

genuinely

solved

within

this

work.

The

monitoring

and

instrumentation

protocols

used

in

our

work

have

been

conceived

in

SCALEA-G

and

later

developed

in

the

collaboration

of

the

authors

of

this

work

and

the

authors

of

the

SCALEA-G.

The

results

of

the

collaboration

have

been

published

in

a

number

of

papers

The

goal

of

the

collaboration

was

to

create

a

performance

monitoring

and

analysis

infrastructure

for

Grid

scientific

workflows.

SCALEA-G

focuses

mainly

on

the

performance

analysis

of

workflows,

and,

compared

to

our

approach,

it

lacks,

among

others,

the

support

for

monitoring

of

legacy

codes

in

a

unified

framework,

a

systematic

approach

to

the

correlation

of

the

monitoring

data,

and

a

support

for

scalable

on-line

collection

of

monitoring

events..

The

concept

of

a

Standardized

Intermediate

Representation

(SIR)

was

also

adopted

from

a

previous

work

within

the

APART

working

group

and

developed

into

SIRWF

(Standard

Intermediate

Representation

for

WorkFlows)

within

the

mentioned

collaboration..

For

monitoring

of

Grid

legacy

applications

running

within

scientific

workflows,

our

previous

work

on

the

OCM-G

monitoring

system

for

parallel

Grid

applications

was

used

However,

the

OCM-G

alone

was

not

fully

sufficient,

lacking,

among

others,

mechanisms

for

fine-grained

runtime

instrumentation.

It

was

therefore

extended

in

order

to

support

adequate

functionality

APART,

B O B B I B I O O O O O O O O O O O O O O O O O O O O B 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 B 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 B O O O O O O B B O O B I 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 B O O O B O O O O O B 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 B O O O O O O B I O O O O O B O O O O O O O B O B B I O O O O O O O O O O B O B 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 B O B B I O O O O O O O B O B 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 B O O O B O O O O O O O O O O O O O O O O O B B O O B I 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 B O B O O O O O O O O O O O O B B 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 B 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 B 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 B 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 B O B O B 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 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 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 B 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 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 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 B O B O O O O B I 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 B O O O O O O O O O O O O O O O O


Source Coding Algorithms Using the Randomness of a Past Sequence We propose source coding algorithms that use the randomness of a past sequence. The proposed algorithms solve the problems of multi-terminal source coding, rate-distortion source coding, and source coding with partial side information at the decoder. We analyze the encoding rate and the decoding error rate in terms of almost-sure convergence. key words: bits-back coding, lossy source coding, multiterminal source coding, random coding, simulated random coding algorithm, source coding with partial side information at the decoder The aim of this paper is providing an explicit constraction of deterministic mapping of source codes. The algorithm does not need any auxiliary random source. We propose source coding algorithms that use the randomness of a past sequence and analyze the encoding rate and decoding error rate. The proposed algorithms solve the problems of multiterminal source coding, rate-distortion source coding, and source coding with partial side information at the decoder.. Slepian and Wolf [46] introduced the source coding problem for multiple access networks ( Fig. 1 ) and determined the achievable rate region for the lossless source coding. We call this problem the multi-terminal source coding problem. The problem is generalized by Cover [6] , and Miyake and Kanaya [29] . Csiszár [8] proved that there is an optimal linear code for this problem. According to Witsenhausen [54] , there is no truly lossless code achieving the boundary of the Slepian-Wolf rate region. Therefore, we should focus on finding good lossless codes that satisfy either of the following two criteria.. • The decoding error probability should converge to zero as the length of a string tends to infinity. We call these types of codes source codes with arbitrary small decoding error probability. Uyematsu [50] constructed codes using a combination of concatenated codes and linear codes.. • The decoding error rate, which is the number of error letters divided by the length of a string, should converge to zero as the length of the string tends to infinity. This criterion is familiar in the context of convolutional codes. We call these types of codes source codes with arbitrary small decoding error rate. This criterion was introduced by Zhao and Effros [67] in the context of source coding problems for multiple access networks.. The main part of this paper discusses the performance of the algorithm in the sense of the second criterion. The first criterion is discussed in the appendix. The lossy source coding problem ( Fig. 2) , which is also called the rate-distortion problem, was introduced by Shannon [41] and the achievable rate region was determined by Shannon [42] , and Berger [3] . Detailed surveys are given in [4] and [24] . The construction of the universally optimal code was proposed by Ornstein and Shields [37] . This algorithm collects typical sequences and another code construction by Neuhoff and Shields [34] takes the same approach. Lossy string matching algorithms, which are analogous with the Lempel-Ziv '77 algorithm [68] , have been actively studied. Steinberg and Gutman [47] , and Kanaya and Muramatsu [22] studied a case where a database sequence is a past sequence. Koga and Arimoto [25] , Yang and Kieffer [62] , and Łuczak and Szpankowski [27] studied a case where a database sequence has an ideal distribution. The constructions of a universal database were proposed by Muramatsu and Kanaya [32] , and Kontoyiannis [26] . Zhang and Wei [66] proposed a universal code using the 'goldwashing' algorithm which renews the database every time the source block is encoded. Other algorithms, which renew a database at every encoding of blocks, were proposed by Sadeh [40] , and Zamir and Rose [65] . The algorithms derived from lossless data compression algorithms were introduced by Yang and Shen [63] with the KolmogorovChaitin complexity, Yang and Kieffer [61] with the LempelZiv '78 algorithm, Muramatsu and Kanaya [31] [33] , and Yang, Zhang, and Berger [64] with arbitrary lossless data compression algorithms. Some of the above algorithms are universally optimal, where we do not need to know the probability distribution of a source. In this paper, it is assumed that both the encoder and decoder have the knowledge of the probability distribution of a source. The problem of source coding with partial side information at the decoder (Fig. 3 ) was introduced by Wyner and Ziv [58] , and Wyner [55] . The achievable rate region of this problem was determined by Ahlswede and Körner [1] , Gray and Wyner [19] , Wyner [56] [57] , and Miyake and Kanaya [29] . This paper describes its construction.. The proposed algorithms can be called 'simulated random coding algorithms,' because they simulate the random generation of a codebook, which appears in 'random coding arguments.' The algorithms are outlined below.. The sequence is chunked into sub-blocks, which are encoded and decoded separately. The algorithm for coding one sub-block is explained. Figure 4 illustrates the configuration of the encoder and decoder, where arrows shows the data flow. In this figure, it is assumed that there is only one encoder.. The encoder is constructed of a block separator, a buffer, a random number generator, an encoding map generator, an encoding map, and a lossless source encoder. The decoder is constructed of a buffer, a random number generator, a decoding map generator, a decoding map, a lossless source decoder, and a block coupler, where the buffer and the random number generator are the same as in the encoder. The buffers store part of the past sequence, which has been transmitted by using the noiseless source code. Each sub-block is encoded and decoded by the following procedures. This paper has introduced a simulated random coding algorithm that uses the randomness of a past sequence. The algorithm does not need any auxiliary random source. This algorithm has been applied to multi-terminal source coding, lossy source coding, and source coding with partial side information at the decoder. Their encoding rate and decoding error rate were analyzed. These algorithms with i ≥ 0 can be regarded as sliding block source codes [18] . Our constructions of sliding block codes are explicit while other constructions in [10] , [18] , [23] , [43] , [44] use non-explicit block codes. Certain questions remain as regards the proposed algorithms. These include the following:. • An extension of the algorithms to a general class of sources is not presented.. • The construction of universal source coding algorithms is not presented.. • The proposed algorithm renews codebook in coding every sub-blocks. We can consider the situation that renewal of codebook is stopped at i = 0 in these algorithms. In the prove of theorems, we can easily check that the average decoding error rate goes to zero with this situation. It may require another analysis to prove the almost sure convergence of the decoding error rate, which is presented in this paper.. • It may require another analysis for algorithms of lossless codes in Sect. 3 and 5 if all source output and reproduction is used for generating codebooks.. • A typical set decoder is used in the proposed algorithm. When encoders are constructed with the ensemble of linear codes [8] or low density parity check codes [16] [28], it is possible to use the sum-product algorithm [13] to construct a maximal likelihood decoder. The sum-product algorithm is an iterated approximate algorithm and provides us with an effective decoding method. In addition, the construction of encoders requires a smaller memory size than the proposed algorithm. This topic will be discussed in [30] for the case of the multi-terminal source coding.. • The simulated random coding algorithm can be regard as a method of constructing codes from random coding arguments. In the future it may be interesting to apply the simulated random coding algorithm to other coding problems such as lossy source coding with side information at the decoder [60] . Application of the simulated random coding algorithm to a channel coding [41] is discussed in [21] .. Sections 3 and 5 considered lossless source coding with an arbitrary small decoding error rate. This appendix proves that it is possible to use these codes to construct codes with an arbitrary small block error probability. The construction of the proof is analogous to the concatenated codes proposed by Forney [12] and applied by Uyematsu [50] to the multi-terminal source coding. Forney used the Reed-Solomon codes as the outer code and Uyematsu used the generalized Hermitian codes as the outer code. We use the linear codes that achieve the GilbertVarsharmov lower bound as the outer code. Because there is no extension of the alphabets in the outer code and the inner and outer codes are completely separated, the outer code is simply a concatenation of the parity checks with the original sequence. However, it should noted here that it takes exponential time to construct the outer code.. We prepare the following lemma on the existence of linear codes that achieve the Gilbert-Varsharmov lower We prove the following theorem. To make the problem simple, it is assumed that we are encoding a source X. Let We have the following theorem on the rate region of source coding with an arbitrary small decoding error rate. From the following theorem and Theorem 4, the algorithm proposed in Sect. 5 can achieve asymptotically optimal coding rates.

O O O O O O O O O O O O O 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 I I I I I I I O O O O O O O O O O O O O O O O O B I B I I B I I B I O B I O B I I I I I I I 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 B I I O O O O B I I I I I I I 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 B I 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 B I I I I I I I 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 B I 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 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 I O B I I I I I I I 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 B I 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 I O O O O O O O B I I 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


Quantum logic synthesis by symbolic reachability analysis Reversible quantum logic plays an important role in quantum computing. In this paper, we propose an approach to optimally synthesize quantum circuits by symbolic reachability analysis where the primary inputs are purely binary. We present an exact synthesis method with optimal quantum cost and a speedup method with non-optimal quantum cost. Both our methods guarantee the synthesizeability of all reversible circuits. Unlike previous works which use permutative reversible gates, we use a lower level library which includes non-permutative quantum gates. Our approach obtains the minimum cost quantum circuits for Miller's gate, half-adder, and full-adder, which are better than previous results. In addition, we prove the minimum quantum cost (using our elementary quantum gates) for Fredkin, Peres, and Toffoli gates. Our work constitutes the first successful experience of applying satisfiability with formal methods to quantum logic synthesis. Reversible logic is needed in the synthesis of quantum computing circuits [5, 7, 12] . The synthesis of reversible logic circuits using elementary quantum gates [1, 21] is different from classical (non-reversible) logic synthesis. There are some works [13, 16, 19, 23] on reversible logic synthesis using permutative reversible gates (Toffoli [7] , Fredkin [21] or Feynman gates). However, these gates have different quantum costs (e.g. the cost of Feynman is lower than Toffoli). So finding the smallest number of gates to synthesize a reversible circuit does not necessarily result in a quantum implementation with the lowest cost (in terms of quantum gates). In this paper, we focus on synthesizing reversible circuits to quantum implementations with the low-Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. est cost. These circuits include common reversible gates that can be used at higher levels of logic synthesis or for technology mapping. We reduce the quantum logic synthesis problem to multiple-valued logic synthesis, which simplifies the search space and algorithm complexity. We formulate the quantum logic synthesis problem via symbolic reachability analysis [2, 14] . Our method not only guarantees to find a quantum implementation (for reversible circuits), but also the lowest quantum cost in the synthesized result. In contrast to previous works, which either use permutative reversible gates to design permutative circuits or universal quantum gates to design quantum circuits, we use a subset of quantum gates to design permutative circuits. We applied invariant checking, a formal verification technique, to the synthesis of quantum logic circuits. We reduced problems in quantum logic synthesis to those of multiplevalued logic synthesis, thus simplifying the search space and algorithm complexity. We created an optimal synthesis method and a speedup method with non-optimal quantum cost. Both our methods are guaranteed to synthesize the circuit. Our optimal synthesis method created minimum cost quantum circuits for Miller's gate, half-adder, and full-adder, which are better than previous results. We also proved the mini- mum quantum cost (using our elementary quantum gates) for Fredkin, Peres, and Toffoli gates. Our work is the first successful application of satisfiability with formal methods in quantum logic synthesis. It has been shown [1, 21] that any quantum logic can be constructed using elementary quantum XOR, controlled-V, controlled-V + , or NOT gates, as shown in Fig. 1 . The NOT gates are also known as inverters. The quantum XOR gates are also called Feynman gates or controlled-NOT (CNOT) gates. The controlled-V [17] gate's data output is the same as its data input (B) when its control input (A) value is 0 (FALSE). When its control value is 1 (TRUE), the data output becomes V(input). Similar rules apply to the controlled-V + gate, except that its data output becomes V + (input). According to [17] , the values V and V + are constructed such that V × V =V + × V + =NOT. For any unitary matrix X (e.g. V ), X + is its hermitian matrix where X × X + = I (identity). For quantum implementation, the cost of 2-qubit gates ( Fig. 1 b,c,d) far exceeds the cost of 1-qubit gates ( Fig. 1a ). Hence, in a first approximation the quantum cost of 1-qubit gates is usually ignored in the presence of 2-qubit implementations [1, 5] .. In this paper, we adopt the quantum gate cost evaluation introduced originally in [21] . Each 2-qubit gate has a quantum implementation cost of 1; and each symmetric gate pattern (shown in Fig. 2 ) has a cost of 1.. Given a reversible function, the quantum logic synthesis problem is to synthesize the function using the above Various heuristic methods have been applied to find low cost quantum implementations (using the elementary gates) for the functionality of the Fredkin [21] , Toffoli [20] and Peres [18] gates. Yet, nobody has been able to prove that they have the lowest cost implementation (based on the cost evaluation criteria above). We solve the quantum logic synthesis problem through reachability analysis. Symbolic reachability analysis is a well known technique in formal verification [14] . Its basic idea is to find all the reachable states of a finite state machine (FSM). Using a symbolic representation, we can check if an invariant (property) is true for all reachable states. This technique is used in invariant checking [14] where the state space is traversed exhaustively against an invariant. We use the state-of-the-art satisfiability (SAT) based bounded model checking (BMC) [2] to check invariants. If the invariant is false, it can automatically generate a counter-example. We can find the shortest counter-example by starting with a zero bound and gradually incrementing the bound. If the invariant is true and enough time is given, this method can also check that the bound is sufficiently large and establish the proof. SAT based applications have been successfully deployed in industry [4, 11, 22 ]. We constructed our invariant checking formulations using NuSMV with BerkMin [8] on a 850MHz Pentium r III processor running Linux. Our results are summarized in Table 1 . The "Prior" and "Our" columns indicate the best published quantum cost in previous literature and our synthesized quantum cost respectively. Our result for Miller's gate [15] is (cost=6) better than prior result (cost=7) [15, 25] . For the Fredkin [7] , Peres [18] and Toffoli [1, 20] gates, our synthesized results have the same quantum costs as reported in prior literature [21, 25] . But nobody was able to show that the cost was minimum until now. In the past, people have been synthesizing the 2-bit adder using a Toffoli gate and an XOR gate (total cost of 6) [6, 9] . Our method proved that the minimum quantum cost is actually 4, as shown in Fig. 6 .. Recent papers [13, 16] used two Toffoli gates and two Feynman gates to implement a full-adder (cost=12). We proved that the minimum quantum cost for a full-adder is 6, shown in Fig. 7 . To shorten the CPU runtime, we used a twostage strategy (Section 5), and obtained a cost of 9 (Fig. 8) . The CPU runtime is significantly reduced (from 7 hours to 140.83 seconds). Notice that the cost of this implementation can be reduced to 8 if we choose to omit the "propagate" logic (the last XOR gate).. We have also tried BDD based model checking [14] , but the computation depends largely on variable ordering [10] . It is not as efficient as SAT based model checking.

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 B O O O O O O O B I O O O O O O B I 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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 B 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 B I O O O O O O O O O O O O O O O O O O O O B I


A Decision-Tree Model of Balance Scale Development We present an alternative model of human cognitive development on the balance scale task. Study of this task has inspired a wide range of human and computational work. The task requires that children predict the outcome of placing a discrete number of weights at various distances on either side of a fulcrum. Our model, which features the symbolic learning algorithm C4.5 as a transition mechanism, exhibits regularities found in the human data including orderly stage progression, U-shaped development, and the torque difference effect. Unlike previous successful models of the task, the current model uses a single free parameter, is not restricted in the size of the balance scale that it can accommodate, and does not require the assumption of a highly structured output representation or a training environment biased towards weight or distance information. The model makes a number of predictions differing from those of previous computational efforts. Within the past decade a number of symbolic and connectionist learning methods have been applied to cognitive development's balance scale task. The aim of this body of research has been to investigate the use of machine learning methods as models of developmental transition, to explore the range of assumptions under which psychologically accurate models of the task can be achieved, and, most important, to assemble predictions about the task and the changes that children's thinking undergoes during the course of development.. The balance scale task consists of showing a child a balance scale supported by blocks so that it stays in the balanced position. Next, a discrete number of weights are placed around one of a number of evenly spaced pegs on either side of the fulcrum, and it becomes the child's task to predict which arm will go down, or whether the scale will balance, once the supporting blocks are removed. A five-peg, five-weight balance scale appears in Figure 1 .. The psychological task requires the integration of the dimensions of weight and distance through the course of development. Perfect performance on this task can be achieved by computing torques for both the left and right arms by multiplying weight by distance, and the side with the largest torque goes down. If torques are equal, then the scale will balance.. Siegler (1976, 1981 ) has partitioned the set of possible balance scale problems into the six sets of distinct problem types shown in Figure 1 .. 1 Performance on the different problem types is used to gage the level of expertise that the child has acquired and to gain insight into the types of information that the child uses to solve balance scale problems. The first three types of problems are referred to as simple problems since the dimension of greater magnitude determines the outcome. Balance problems have equal numbers of weights placed at equal distances from the fulcrum resulting in the scale balancing. Distances on either side of the fulcrum are equal for weight problems, resulting in the dropping of the side with more weight. For distance problems, the arm with weights placed at a greater distance goes down since the two sides have equal weights.. The final three problem types are referred to as conflict problems since the cue of weight conflicts with the cue of distance. These problems have greater weight on one arm and greater distance on the other, with no simple way of determining the outcome. The side with the greater weight or distance drops respectively in conflict-weight and conflict-distance problems, while the scale balances for conflict-balance problems. Siegler (1976 Siegler ( , 1981 has reported that children's performance on the balance scale task progresses through four distinct stages. In stage 1, children use only weight information to determine if the scale will balance. In stage 2, children emphasize weight information but use distance if weights on either side of the fulcrum are equal. In stage 3 both weight and distance information is utilized for simple problems, but children seem to respond indecisively when one arm has greater weight and the other greater distance. By stage 4, there is a correct integration of weight and distance information resulting in the near flawless performance of the task. Each of these rules makes specific predictions about the pattern of errors that can be expected to occur across the different problem types. Figure 1 presents the predicted percentages of correct responses, broken down by problem type, for each of these four stages.. While orderly stage progression constitutes a major regularity of balance scale development, a second regularity can be observed by examining the predicted pattern of errors in Figure 1 for conflict-weight problems. In stages 1 and 2, children answer these problems correctly since they generally rely on the weight dimension to determine their response. In stage 3 however, when weight and distance cues are in conflict, children often perform poorly on the same type of problems that they had previously answered correctly. This situation is rectified by stage 4 however, at which point correct answers re-occur. This trend is referred to in the developmental literature as U-shaped development, reflecting the pattern of the longitudinal plot of performance. The U is created by initially good performance followed by a regression and a later recovery, on conflict-weight problems.. A third major balance scale regularity was reported by Ferretti and Butterfield (1986) . These researchers discovered that the rule classifications of many children systematically varied when assessed with different sets of testing problems drawn from the theoretically equivalent problem types. It was discovered that children's judgements about problems with a greater absolute difference in the amount of torque between the two arms (torque difference) were more often correct than similar types of problems with smaller torque differences. As a result, children assessed with problems using larger torque differences are classified at a higher developmental stage by Siegler's rule assessment procedure than if they were assessed with smaller torque difference problems. This last phenomenon is dubbed the torque difference effect (TDE). In summary, we have presented a model of human cognitive development on the balance scale task using the symbolic C4.5 learning algorithm to induce decision trees capable of capturing the major trends present in the human developmental data. This model stands in contrast to the previously limited symbolic approaches to the problem, providing a successful alternative set of assumptions and competing predictions, to connectionist accounts of the data. Our demonstration suggests that symbolic learning algorithms warrant investigation as transition mechanisms in cognitive development.. 6. The use of a discrete, symbolic representation yields identical results, however this prevents generalization to continuously represented problems that the model was not trained on.

O O O O B I O O O O O O O O B I 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 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 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 B I 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 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 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 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 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 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 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 B I O O B I 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 B I I 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


TCAM Razor: A Systematic Approach Towards Minimizing Packet Classifiers in TCAMs Abstract-Packet classification is the core mechanism that enables many networking services on the Internet such as firewall packet filtering and traffic accounting. Using ternary content addressable memories (TCAMs) to perform high-speed packet classification has become the de facto standard in industry. TCAMs classify packets in constant time by comparing a packet with all classification rules of ternary encoding in parallel. Despite their high speed, TCAMs suffer from the well-known range expansion problem. As packet classification rules usually have fields specified as ranges, converting such rules to TCAM-compatible rules may result in an explosive increase in the number of rules. This is not a problem if TCAMs have large capacities. Unfortunately, TCAMs have very limited capacity, and more rules mean more power consumption and more heat generation for TCAMs. Even worse, the number of rules in packet classifiers has been increasing rapidly with the growing number of services deployed on the Internet. In this paper, we consider the following problem: given a packet classifier, how can we generate another semantically equivalent packet classifier that requires the least number of TCAM entries? In this paper, we propose a systematic approach, the TCAM Razor, that is effective, efficient, and practical. In terms of effectiveness, TCAM Razor achieves a total compression ratio of 29.0%, which is significantly better than the previously published best result of 54%. In terms of efficiency, our TCAM Razor prototype runs in seconds, even for large packet classifiers. Finally, in terms of practicality, our TCAM Razor approach can be easily deployed as it does not require any modification to existing packet classification systems, unlike many previous range encoding schemes.Index Terms-Algorithm, packet classification, router design, ternary content addressable memory (TCAM) optimization. Prior work on optimizing TCAM-based packet classification systems fall into three broad categories: TCAM modification, range reencoding, and classifier minimization.

O O O O O O O O O O O O O O O O O O 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 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 B I O O O O O O O O B I B I B I I I I I O O O O O B I O O O O O O O O O O O O O


Efficient location aware intrusion detection to protect mobile devices Abstract This paper addresses the problem of efficient intrusion detection for mobile devices via correlating the user's location and time data. We developed two statistical profiling approaches for modeling the normal spatio-temporal behavior of the users: one based on an empirical cumulative probability measure and the other based on the Markov properties of trajectories. An anomaly is detected when the probability of a particular (location, time) evolution matching the normal behavior of a given user becomes lower than a certain threshold, determined by controlling the recall rate of the model of the normal user's behavior. We used compression techniques to reduce processing overhead while maintaining high accuracy. Our evaluation based on the Reality Mining and Geolife data sets shows that the proposed system is capable of detecting a potential intrusion within 15 min and with 94 % accuracy. Recent technological advancements caused a huge increase in the use of mobile devices. Smart phones, notebooks, and iPads come with many capabilities including email, text messaging, gaming, web browsing, navigation, and recording pictures/videos. These devices store a lot of personal information and, if stolen, loss of control over the data may be more important than the loss of the smart mobile device.. Some prior works on mobile device security have focused on physical aspects and/or access control methods (e.g., strong passwords, voice recognition [26] , or fingerprints [21] ). However, such approaches do not protect the private data on stolen devices in the post-authentication state. Today's smart devices are already equipped with tools that allow us to obtain vast amount of data about user behavior, such as application usage logs. In addition, many mobile devices are equipped with location identification tools such as Global Positioning System (GPS) receivers, which can be used to track locations in case of theft. However, existing works using GPS-features to protect mobile devices (e.g., GadgetTrak [12] and RecoveryCop [25] ) depend on the owner to report the theft, and it may take hours before the owner realizes it, at which point private data may have already been exploited. Even Laptop Cop [23] requires user intervention to remotely/manually delete the data on stolen devices.. Our main goal is to develop efficient techniques for protecting data saved on mobile devices by detecting anomalous spatio-temporal behavior as compared to the regular motion patterns of the owners. A study performed by González et al. [14] on 100,000 trajectories of anonymized mobile phone users whose positions were tracked for a 6-month period has demonstrated that many individuals tend to have small sets of locations that they visit frequently (e.g. home, work, school) and tend to take the same path when moving between locations. Observations González et al. [14] imply that the user's presence at a certain time in a certain location is predictable-hence, we can utilize this to build a user profile which, in turn, can be used to perform anomaly detection.. In a previous study [34] , we used network access patterns and file system activities on laptops to build a behavioral model based on K-means clustering that permitted attack detection with a latency of 5 min and an accuracy of 90 %. In a recent work [35] , we used users' location information and trajectory data to build the profile of smart phone users, and we were able to detect attacks within 15 min with 81 % accuracy. This paper extends our results [35] as follows:. 1. We present an enhanced user model based on the previously discussed spatio-temporal information and trajectory data approach where we assumed a normal distribution histogram for the user profile. We eliminated the low end of the distribution (lower than 10 % values) during the detection analysis in order to achieve 96 % detection accuracy. 2. We propose, implement, and compare two data reduction techniques that enable us to reduce the memory requirements by &90 % and consequently reduce the processing time. Those techniques are the Row-Merge algorithm, which combines adjacent rows in our data structures and the MDLP algorithm, which is an adaptation of an existing statistical technique [3] to our settings. 3. We evaluated our techniques on an additional spatiotemporal data set-Geolife [36] [37] [38] .. In summary, this article makes the following main contributions.. -We develop two statistical profiling approaches and corresponding representations: one based on empirical cumulative probability measure and the other based on the Markov property, in order to model the normal behavior of a user in a fixed time-window. An anomaly is detected when the probability of a user window reflecting a normal behavior falls below a threshold that is determined by controlling the recall rate of the user's normal behavior. -We present two techniques that reduce user profile memory requirements while still allowing accurate attack detection.. -We present a detailed experimental evaluation of the proposed methodologies over two data sets, quantifying the benefits of our approaches.. In the rest of this paper, Sect. 2 places the work in the context of our system architecture and discusses the data and feature extraction methods. Section 3 presents the detail of the user profile representation and our anomalybased detection schemes. Section 4 presents the methods used to reduce the size of the user profile data. Section 5 presents a comprehensive experimental evaluation of our methods. Section 6 describes related work and Sect. 7 concludes the paper and indicates directions for future work. We presented an approach for detecting anomalous use of mobile devices. Our system uses spatio-temporal mobility data to build models that have high anomaly detection accuracy. Combining the spatio-temporal model (for users with few locations) and trajectory-based model (for users with many locations) allowed an average attack detection rate of 94.48 % for Model #1 and 96.13 % for Model #2, with a detection latency of 15 min. To further improve the efficiency of this system, we applied a couple of data reduction algorithms (Row-Merge, MDLP), which enabled us to obtain high reduction rate while still capable of detecting attacks with a 94 % accuracy.. One possible extension is to enrich the model by allowing nonzero probabilities to capture the cases of the owner visiting new locations. In addition, we would like to investigate the quality of accuracy, along with other tradeoffs that may be involved when our approach is dealing with prolonged disconnections from a server. We also plan to expand this study to incorporate/couple different context dimensions (e.g., call-patterns and application logs) in order to improve the detection accuracy.

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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


Privacy-preserving and accountable on-the-road prosecution of invalid vehicular mandatory authorizations Nowadays, improving road safety is one of the major challenges in developed countries and, to this regard, attaining more effectiveness in the enforcement of road safety policies has become a key target. In particular, enforcing the requirements related to the technical and administrative mandatory documentation of on-the-road motor vehicles is one of the critical issues. The use of modern technologies in the context of Intelligent Transportation Systems (ITS) could enable the design of a more convenient, frequent and effective enforcement system compared to the traditional human patrol controls. In this article we propose a novel system for the on-the-fly verification of mandatory technical and administrative documentation of motor vehicles. Vehicles not complying with the required regulations will be identified and sanctioned whereas those vehicles, observant of the mandatory regulations, will maintain anonymity and non-traceability of their whereabouts. The proposed system is based on the use of anonymous credentials which will be loaded onto the vehicle to automatically and on-the-fly prove holdership of required credentials without requiring the vehicle to stop beside the road. We also implement a prototype of the credential system and analyze the feasibility of our solution in terms of computational cost and time to perform such telematic controls. Nowadays, improving road safety is one of the major challenges in developed countries. Effectiveness of road safety policies enforcement is related to the intensity of controls and compliance with safety requirements. Regulating technical and administrative requirements on vehicles (such as registration certificates or mandatory periodic technical inspections) is part of current strategies to achieve a better road safety. Current regulations usually require a vehicle or its keeper to hold five different documents in order to assert its compliance with mandatory requirements: certificate of conformity (or technical characteristics certificate), registration certificate, valid and up-to-date technical inspection report, proofs of up-to-date motor vehicle local tax and compulsory third party insurance payment. However current situation is far away from its solution (e.g., in Spain 400.000 cars were reported of being driven without having passed the mandatory technical inspection in 2009 [1] ).. The use of information and communication technologies in vehicular environments has led to a new family of advanced services that have been referred to as Intelligent Transportation Systems (ITS). In this type of systems it is assumed that vehicles count with sensing, processing, and communicating capabilities. Under this assumption, it is possible to build a more convenient, frequent and effective telematic road enforcement system while reducing the number of human patrols deployed to control road stretches. The system will be more convenient because ITS can make possible the telematic on-the-road verification of the documents -that is, without the car needing to stop and presenting the documents to a traffic agent-, provided that a set of equivalent electronic documents are issued. With an ITS-based road enforcement system, the frequency of document inspection can be set as a dynamically configurable parameter, and its possibilities will be mainly limited by the size and availability of the deployed road side infrastructure. The system will be more effective in two ways. Firstly, well-designed electronic credentials will be more difficult to forge than current paper-based ones. Secondly, if such credentials verification is unsatisfactory, a fine could be immediately issued by the Traffic Authority and notified to the offender [2] .. Electronic License Plates (ELP) or Electronic Chasis Number (ECN) have already been suggested as long-term electronic identities for vehicles and it is assumed that vehicles will hold a public key certificate linked to that identity [3] . This credential could be understood as an electronic registration certificate.. Therefore, a first solution would consider the issuance of electronic credentials, such as attribute certificates, linked to that long-term identity, that attest each of the remaining mandatory requirements. Nodes of the road side infrastructure could require passing by vehicles to send these credentials and prove their holdership. However, creating such a system raises critical privacy concerns, as it may enable the Traffic Authority or other nearby entities to easily track vehicles and their drivers and know all attributes encoded in the credentials.. In ITS scenarios, the use of a set of pseudonyms has been devised as an alternative mechanism to authenticate vehicles. A public key certificate will be issued for each pseudonym, with a relatively short-term validity period, such as a week, and used only during a short period of time, such as a minute [4] . The certification authority issuing the certificates also serves as an identity escrow agent to satisfy the principle of accountability for malicious vehicle behaviors. Therefore, a second solution would consider the issuance of attribute certificates linked to each of the pseudonym-based certificates a vehicle holds. Alternatively, instead of issuing attribute certificates for all the pseudonym-based certificates hold by a vehicle, only a specific subset or a separate set of certificates may be considered. However, the most convenient option under this approach would be to issue the pseudonym-based certificates with attribute extensions representing the satisfaction of the mandatory requirements. However, besides the privacy issues arising in pseudonym-based credential systems [5] , the main problem of this type of solution is the credential life-cycle management (certificate issuance, revocation, refilling, etc.) of such a huge number of certificates. In the addressed scenario, this problem will be worse as the satisfaction of each mandatory requirement grants an authorization for a different validity period, starting at different times. In the more convenient pseudonym-based setting (certificates with attribute extensions), vehicles will only obtain valid credentials for the period in which all requirements are satisfied. Once the validity period of one requirement expires, vehicles will be forced to retrieve a new set of certificates. Moreover, if the verification of a set of credentials fails because the vehicle does not have valid credentials, it would not be possible to distinguish which requirement is not being fulfilled at the time of detection. Finally, public key and attribute certificates do not operate on the premises of minimal disclosure of information, i.e., when a certificate is shown, all attributes in the certificate are revealed at the same time.. By contrast, an anonymous attribute-based credential system (ABC-system) allows users authentication while guaranteeing partial information disclosure and unlinkability. Attribute-based anonymous credentials are certificates that provide the subject with a digital identity composed by a set of attributes. Users of anonymous credentials are able to prove, to a verifying entity, holdership of the credential, knowledge of all attribute values or that such values satisfy a given property (such as belonging to a range or satisfying a function). Moreover, users can choose to disclose a set of attributes while keeping others hidden (partial disclosure of information). Moreover, verifiers cannot link a request with a specific user or with other past requests (unlinkability). Finally, anonymous credential systems may allow for credential revocation and anonymity revocation (de-anonymity) ensuring accountability of misuses and misbehaviours.. Indeed, the privacy by design feature of anonymous credentials make them very attractive and highly suitable for the representation of authorizations required by regulations over motor vehicles. In this work we explore the feasibility of such an approach by proposing a privacy-preserving and accountable telematic on-the-road verification system of motor vehicle authorizations, being these authorizations represented by anonymous attribute-based credentials. To the best of our knowledge, this is the first proposal in the literature addressing this topic.. The main two technologies being currently developed for the implementation of anonymous credentials correspond to U-Prove [6, 7, 8] and Idemix [9, 10, 11] systems provided by Microsoft and IBM, respectively. Although, both systems present many core-concept similarities, they also differ on many other aspects, namely the mathematical foundations and the functionality features which have actually been implemented. Although our proposal is not based on any of these systems we briefly comment on their main characteristics. As for U-Prove, its current implementation offers the following features: (1) It allows proof of possession of the credential without disclosing the actual credential, (2) It preserves issuance-show unlinkability, this is, the authority issuing the credential cannot link the credential issued with the credential being shown to the verifying entity and, (3) It allows partial information disclosure, meaning that when showing the credential, the user can disclose only some of the attributes in the credential, proving to the verifying party that those attributes were certified by the issuer without disclosing the other attributes. By contrast, it does not offer multi-show unlinkability (different uses or shows of the same credential can be linked together) and the user (credential holder) cannot prove that two of its undisclosed attributes hold the same value when being encoded into the same or into two different credentials. Due to the latter two non-implemented features we have not adopted the U-Prove technology.. By contrast, Idemix is a much more featured and developed system offering the following interesting functionalities: (1) It allows proof of possession of the credential, (2) It preserves issuance-show unlinkability, (3) It allows partial information disclosure, (4) multi-show unlinkability and, (5) cross-credential proving (attributes encoded in one credential can be proven to hold a =, >=, <=, >,< relation with another attribute encoded in a different credential). However, despite the extra functionalities offered by Idemix, we have not adopted this system either. The intention of this work is to promote an alternative technology to the two major systems. Our work is based on the anonymous credential system presented by Persiano et al. in [12] , being the main reasons to adopt such an approach the following:. • Persiano et al.'s work is easy to understand and therefore easier to customize and modify.. • Similar features to those (1) to (5) of Idemix can be implemented.. • The showing credential protocol can be made non-interactive.. • Finally, as credential revocation would break the issuance-show property, it stands as the biggest challenge of anonymous credential technologies and not very practical approaches have been adopted for revocation in the two major systems. On one hand Idemix white-listing revocation process, based on accumulators [9] , is not really applicable in the vehicular network scenario because of scalability reasons. On the other hand, revocation in U-Prove is only possible when untraceability is not a requirement, which is not our case.. The specific contributions of this work are the following ones:. 1. We propose an anonymous ABC-system to represent main motor vehicle authorizations required by current regulations. The different parts of the overall system we propose are based on the anonymous credential system presented by Persiano et al. in [12] and the work of Camenisch et al. in [13] . A vehicle can prove that it holds the required credentials, all linked to the same long-term identity (license number), while guaranteeing minimal disclosure information of the private attributes encoded in the credentials and unlinkability between different credential shows. The system also uses a specific set of pseudonym-based certificates which allows for (1) the retrieval of the identity of vehicles unobservant of mandatory requirements, (2) the collection of non-repudiation evidences of such vehicles, and (3) the revocation of vehicular mandatory authorizations. The use of pseudonymbased certificates to provide these properties allows a smooth integration with current approaches in ITS [4] . 2. We have adapted Persiano and Visconti anonymous credential system to make it non-interactive and to allow the validation of multiple credentials held by the same entity and encoding the same private attribute (crosscredential proving). 3. We have implemented the adapted Persiano and Visconti anonymous credential system on a standard PC platform. To the best of the authors' knowledge, it is the first implementation of such a system. 4. We provide with a comprehensive analysis of the fullfilment of the security objectives and of the performance of the proposed system, showing that it is suitable for vehicular scenarios 1 .. After presenting related work and background in Sections 2 and 3, the model of the system is described in Section 4. Next, Section 5 contains a detailed description of the proposed system. The security and performance of the system are analyzed in Sections 6 and 7. Finally, conclusions are presented in Section 8. For completness purposes, Appendix A summarizes the mathematical foundations and assumptions of this work. Nowadays, the verification of the status of road traffic credentials incurs in a significant cost due to the required manpower. Moreover, it introduces a privacy threat as the credentials' content have to be fully shown to the verifier, enabling the chance of tracking. To contribute on this issue, in this work a novel privacy-preserving and accountable verification system for vehicular mandatory authorizations has been proposed. The process is designed to be performed electronically on-the-road. For this purpose, a set of anonymous credentials, based on existing driving authorizations, has been designed. In order to prove such credentials, several proof-of-knowledge cryptographic mechanisms have been adapted.. The system ensures that vehicles with valid credentials remain anonymous, no matter the amount of verifications performed. On the contrary, vehicles without valid credentials will have their identity revealed. In this way, the proposed approach constitutes a suitable tradeoff between privacy preservation and offenders' accountability. Experimental results show that the system is suitable for vehicular scenarios, considering both the limitation of available computational resources and the unreliability of communication networks.. Future work will be focused on three main issues. On the one hand, the system will be expanded to cope with more specific, fine-grained verification of authorizations, such as particular driving regulations for heavyweight vehicles. On the other hand, driver's credentials will be also considered, enabling further verifications such as ensuring that the driver is entitled to drive a given vehicle. Finally, the anonymous credential system will be evolved to comply with the architecture for attribute-based technology specified within the ABC4Trust project [34] . Additionally, it would be interesting to design similar systems to the one proposed herein but based on U-Prove and Idemix. Although there is a large body of research work related to the security and privacy in VANETs, very few of them address traffic law enforcement ( [14, 15, 16, 17] ). Most of them are focused in providing privacy-preserving systems (respect to vehicle's identity and location) for Electronic Toll Pricing (ETP), speeding ticketing, and 'Pay-As-You-Drive' (PAYD) systems. But none of these systems addresses the privacy-preserving verification of motor vehicles' mandatory authorizations. Moreover, none of these proposals are based on anonymous credentials systems although [14] suggests that they would be an interesting approach to complement parts of their proposal.. On the other hand, the European Commission (EC) is working on building credentials of motor vehicles and drivers in electronic format and has suggested the use of smart cards as the physical support for driving licenses [18, 19, 20] . Such electronic formats may constitute a significant barrier against illegal credential creation and an opportunity to apply new and more efficient enforcement mechanisms. As an example, the European Traffic Police Network (TISPOL) has envisioned a new automated driver identification system based on an electronic driver's license [21] . In Spain, it is already enacted that the vehicle's technical inspection card will be issued in electronic format (although vehicle's owners will still receive a copy in paper format) [22] . However, the options that are being considered to represent these electronic credentials are X.509 public key certificates and plain electronic signatures (such as XMLDSig).. Finally, as one of the contributions of this paper addresses the implementation of an anonymous credential system, several representative recent developments must be considered. Idemix has been already implemented in smart cards (e.g. [23] ), also including the selective disclosure feature [24] . Similarly, an implementation of U-Prove on these devices can be found at [25] . Nevertheless, to the best to the authors' knowledge there are no implementations of Persiano and Visconti credential system. In this Section, a short introduction to Intelligent Transportation Systems (ITS) and Vehicular Ad-hoc Networks (VANETs) is presented to the reader.. The use of information and communication technologies in vehicular environments has led to a new family of advanced services that have been referred to as Intelligent Transportation Systems (ITS). Thanks to ITSs, drivers can have more immediate and accurate information concerning the road traffic status and passengers can enjoy entertainment applications.. Given that vehicles are moving at a relatively high speed, connectivity is a critical issue in these environments. In order to promote a permanent communication to and from vehicles, a specific type of network (called Vehicular Ad-Hoc Network and usually referred to as VANET) has been proposed.. The usual elements appearing in a VANET scenario are depicted in Figure 1 . Thus, there exists a set of communication nodes placed aside the roads that are called Road-Side Units (RSUs). RSUs are assumed to have a resilient connection with other infrastructure nodes. Trusted Third Parties (TTPs), the road traffic authority or the ITS-related service providers belong to such set of infrastructure entities.. In order to exchange data to and from vehicles, they need to be equipped with specific communication and processing hardware and software. All these components are referred to as On-Board Equipment (OBE) and three main elements are usually considered [26] : first, a set of sensors that enables having a real-time vision of the vehicle status and its surroundings; second, a Hardware Security Module (HSM) which provides with secure storage, reliable time source and cryptographic capabilities; and third, an On-Board Unit (OBU) which is a communication device that enables exchanging data not only with RSUs, but also with other surrounding OBUs. System architectures, such as the one developed within the SeVeCom project [4, 27] , allow the implementation of secure vehicular communication systems.. Given the specific constraints that affect the vehicular data transmission, a new communication technology is being developed. It is commonly referred to as Dedicated Short Range Communications (DSRC) and it is specifically tailored for this context. The whole architecture of DSRC is being standardized in the IEEE 1609 family of standards [28] . 4. System model

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 B I 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 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 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 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 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 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 B O O O O O O O B I 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 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