Algorithms

for

Capacitated

Vehicle

Routing

Moses

Charikar

Samir

Khuller

y

Balaji

Raghavachari

z

November

Abstract

Given

n

identical

objects

-LRB-

pegs

-RRB-

placed

at

arbitrary

initial

locations

we

consider

the

problem

of

transporting

them

efficiently

to

n

target

locations

-LRB-

slots

-RRB-

with

a

vehicle

that

can

carry

at

most

k

pegs

at

a

time

This

problem

is

referred

to

as

k-delivery

TSP

and

it

is

a

generalization

of

the

Traveling

Salesman

Problem

We

give

a

algorithm

for

the

problem

of

minimizing

the

total

distance

traveled

by

the

vehicle

There

are

two

kinds

of

transportations

possible

one

that

could

drop

pegs

at

intermediate

locations

and

pick

them

up

later

in

the

route

for

delivery

-LRB-

preemptive

-RRB-

and

one

that

transports

pegs

to

their

targets

directly

-LRB-

non-preemptive

-RRB-

In

the

former

case

by

exploiting

the

freedom

to

drop

one

may

be

able

to

find

a

shorter

delivery

route

We

construct

a

non-preemptive

tour

that

is

within

a

factor

of

the

optimal

preemptive

tour

In

addition

we

show

that

the

ratio

of

the

distances

traveled

by

an

optimal

non-preemptive

tour

versus

a

preemptive

tour

is

bounded

by

AMS

Classification

Introduction

Vehicle

routing

and

delivery

problems

have

been

widely

studied

in

Computer

Science

and

Operations

Research

Many

of

these

problems

are

NP-hard

and

a

lot

of

research

has

been

done

on

analyzing

heuristics

to

find

good

solutions

to

these

problems

These

transportation

problems

occur

in

real

life

in

areas

such

as

robotics

and

transportation

of

packages

Methods

for

obtaining

good

solutions

to

the

problems

are

of

great

practical

significance

For

example

Casco

et

al

-LSB-

-RSB-

report

that

combining

deliveries

and

pickups

for

supermarkets

led

to

an

industry

wide

savings

of

million

a

year

The

problem

that

we

consider

in

this

paper

is

that

of

transporting

a

single

commodity

from

a

set

of

suppliers

to

a

set

of

demand

points

using

a

vehicle

of

limited

capacity

Department

of

Computer

Science

Stanford

University

Stanford

CA

Supported

by

an

ARO

MURI

Grant

and

NSF

Award

with

matching

funds

from

IBM

Schlumberger

Foundation

Shell

Foundation

and

Xerox

Corporation

E-mail

moses@cs.stanford.edu

yDepartment

of

Computer

Science

and

Institute

for

Advanced

Computer

Studies

University

of

Maryland

College

Park

MD

Research

supported

by

NSF

Research

Initiation

Award

and

an

NSF

CAREER

Award

E-mail

samir@cs.umd.edu

zDepartment

of

Computer

Science

The

University

of

Texas

at

Dallas

Richardson

TX

Research

supported

in

part

by

NSF

Research

Initiation

Award

E-mail

rbk@utdallas.edu

One

way

to

analyze

the

performance

of

a

heuristic

is

to

compute

the

worst-case

ratio

between

the

cost

of

a

solution

produced

by

the

algorithm

to

the

cost

of

an

optimal

solution

If

this

ratio

is

bounded

by

ae

we

refer

to

this

algorithm

as

an

approximation

algorithm

with

performance

ratio

ae

or

simply

as

a

ae-approximation

algorithm

k-Delivery

Traveling

Salesman

Problem

Given

n

identical

pegs

placed

at

arbitrary

locations

a

vehicle

with

a

maximum

capacity

of

k

pegs

and

n

slots

-LRB-

demand

points

-RRB-

each

requiring

a

peg

the

problem

is

to

find

a

shortest

tour

for

the

vehicle

in

which

all

the

pegs

can

be

transported

to

their

slots

without

exceeding

the

capacity

of

the

vehicle

This

problem

is

referred

to

as

k-delivery

TSP

It

is

a

generalization

of

the

traveling

salesman

problem

-LRB-

TSP

-RRB-

and

is

therefore

NP-hard

The

distances

between

the

given

points

satisfies

the

triangle

inequality

since

the

vehicle

can

always

take

a

shortest

path

between

any

two

points

Replacing

the

distances

between

each

pair

of

points

by

the

shortest-path

distance

between

them

ensures

that

the

triangle

inequality

is

satisfied

Haimovich

and

Rinnooy

Kan

-LSB-

-RSB-

studied

a

special

case

of

this

problem

when

all

the

pegs

are

located

at

one

central

depot

and

are

delivered

with

a

vehicle

of

capacity

k

They

provided

an

approximation

algorithm

that

obtains

a

performance

ratio

of

For

geometric

graphs

graphs

induced

by

points

in

the

plane

with

Euclidean

distances

as

edge-weights

they

provided

a

polynomial

time

approximation

scheme

for

constant

k.

Christofides

-LSB-

-RSB-

surveys

various

issues

including

problem

formulation

and

algorithms

related

to

the

vehicle

routing

problem

where

the

vehicles

originate

at

a

central

depot

In

STOC

Asano

et

al

-LSB-

-RSB-

gave

a

polynomial-time

approximation

scheme

for

the

same

special

case

in

the

geometric

setting

when

k

is

O

-LRB-

log

n

log

log

n

-RRB-

Anily

and

Hassin

-LSB-

-RSB-

demonstrated

an

algorithm

that

obtains

a

ratio

of

for

the

TSP

The

first

constant

factor

approximation

algorithm

for

the

general

problem

was

given

by

Chalasani

Motwani

and

Rao

-LSB-

-RSB-

We

will

refer

to

their

algorithm

as

the

CMR

algorithm

They

obtained

an

approximation

ratio

of

They

also

gave

better

algorithms

for

the

cases

k

and

k

that

obtain

ratios

of

in

both

cases

Independent

of

our

work

Anily

and

Bramel

-LSB-

-RSB-

showed

that

a

modification

of

the

CMR

algorithm

improves

the

approximation

ratio

to

-LRB-

in

fact

we

show

that

one

can

obtain

a

better

bound

of

by

modifying

the

CMR

approach

-RRB-

They

also

gave

another

algorithm

with

an

approximation

ratio

of

c

-LRB-

k

-RRB-

k

where

c

-LRB-

k

-RRB-

Our

Results

We

summarize

the

results

presented

in

this

paper

below

ffl

For

the

k-delivery

TSP

we

provide

a

natural

approximation

algorithm

that

runs

in

polynomial

time

and

show

that

its

performance

ratio

is

at

most

Since

the

proof

is

complex

we

first

prove

a

simpler

bound

of

this

proof

contains

some

of

the

basic

ideas

ffl

For

geometrical

instances

such

as

points

in

the

plane

the

algorithms

of

Arora

-LSB-

-RSB-

and

Mitchell

-LSB-

-RSB-

-RRB-

can

be

used

to

obtain

an

-LRB-

ffl

-RRB-

approximation

of

the

TSP

and

this

leads

to

an

approximation

factor

of

-LRB-

ffl

-RRB-

for

these

instances

ffl

We

also

describe

a

simple

algorithm

that

finds

a

preemptive

tour

whose

length

is

at

most

times

the

length

of

an

optimal

preemptive

tour

Significance

of

our

work

We

explain

below

how

our

algorithm

fundamentally

differs

from

previous

algorithms

and

why

it

is

likely

to

return

far

better

solutions

in

practice

than

them

The

previous

methods

for

solving

the

general

k-delivery

TSP

suffer

from

the

following

drawback

They

start

with

two

tours

one

containing

all

the

pegs

-LRB-

source

nodes

-RRB-

and

the

other

containing

all

the

slots

-LRB-

delivery

nodes

-RRB-

The

basic

idea

is

to

traverse

the

cycle

of

pegs

collecting

k

pegs

then

switch

over

to

the

other

cycle

and

deliver

the

k

pegs

repeating

the

process

until

all

pegs

are

delivered

The

delivery

route

thus

alternates

between

the

two

cycles

it

turns

out

that

it

is

easy

to

analyze

the

cost

of

shuttling

between

the

cycles

in

this

scheme

Such

a

scheme

suffers

from

the

drawback

that

the

individual

tours

for

the

pegs

and

slots

do

not

take

advantage

of

the

proximity

of

pegs

and

slots

In

most

instances

one

can

do

better

by

alternating

pickups

and

deliveries

without

waiting

for

the

vehicle

to

become

either

completely

full

or

completely

empty

We

derive

a

natural

algorithm

that

uses

a

single

tour

containing

all

points

combines

pickups

and

deliveries

arbitrarily

and

takes

corrective

action

only

when

the

vehicle

becomes

either

full

or

empty

The

main

hurdle

is

in

proving

a

good

analysis

of

this

more

natural

scheme

Our

analysis

shows

significantly

better

approximation

ratios

for

our

algorithm

than

the

previous

algorithms

In

addition

preliminary

experimental

studies

show

that

our

algorithm

returns

much

better

solutions

Note

We

will

assume

that

we

can

start

the

vehicle

's

tour

at

any

location

If

the

starting

point

is

fixed

our

method

still

applies

with

an

additive

factor

of

in

the

approximation

factors

Preemptive

Tours

A

fundamental

issue

is

that

of

preemptive

versus

non-preemptive

traversals

In

a

preemptive

traversal

pegs

may

be

dropped

at

intermediate

locations

in

other

words

we

may

pick

up

a

peg

and

leave

it

at

some

location

and

return

later

to

collect

it

and

deliver

it

In

a

non-preemptive

solution

we

carry

a

peg

from

its

source

to

its

destination

without

ever

unloading

it

from

the

vehicle

at

intermediate

nodes

The

nature

of

the

problem

and

algorithms

to

find

solutions

can

change

if

drops

are

permitted

Fig.

shows

an

example

in

which

the

best

preemptive

tour

is

shorter

than

the

best

nonpreemptive

tour

The

edges

shown

cost

unit

each

A

tour

with

a

vehicle

that

leaves

a

peg

at

point

A

and

delivers

it

later

costs

units

If

we

are

not

allowed

to

drop

a

peg

at

intermediate

locations

we

incur

a

higher

cost

-LRB-

regardless

of

where

the

tour

starts

-RRB-

and

an

optimal

non-preemptive

tour

costs

units

This

raises

a

very

fundamental

question

what

is

the

worstcase

ratio

of

the

cost

of

an

optimal

non-preemptive

tour

to

that

of

an

optimal

preemptive

tour

Our

example

shows

that

the

ratio

is

at

least

A

Pegs

Slots

Figure

Example

to

show

that

intermediate

drops

help

even

for

k

We

show

that

the

ratio

between

the

optimal

non-preemptive

and

preemptive

tours

is

at

most

by

showing

that

given

a

preemptive

tour

of

length

L

we

can

find

a

non-preemptive

tour

of

length

at

most

This

theorem

is

proven

by

using

a

variety

of

different

ideas

One

interesting

method

is

a

general

technique

for

simulating

a

preemptive

tour

of

a

unit

capacity

vehicle

by

a

non-preemptive

tour

that

travels

the

same

distance

-LRB-

Lemma

-RRB-

We

also

develop

many

other

methods

that

are

needed

in

showing

that

the

constants

are

fairly

small

one

idea

is

to

collect

pegs

and

to

deliver

them

rather

than

waiting

to

collect

k

pegs

Related

Work

A

closely

related

problem

is

the

stacker-crane

problem

This

problem

too

is

that

of

making

deliveries

with

a

vehicle

of

capacity

k.

But

in

the

stacker-crane

problem

the

objects

are

not

identical

and

each

object

has

a

specific

target

destination

The

goal

is

to

find

a

shortest

tour

that

performs

the

transportation

For

the

unit

capacity

case

Frederickson

Hecht

and

Kim

-LSB-

-RSB-

gave

an

algorithm

with

an

approximation

factor

of

For

the

case

when

the

underlying

metric

is

a

tree

Frederickson

and

Guan

-LSB-

-RSB-

have

given

fast

algorithms

to

compute

optimal

solutions

for

the

preemptive

case

and

fast

approximation

algorithms

for

the

non-preemptive

case

-LRB-

the

problems

are

NP-hard

even

for

trees

-RRB-

Knuth

-LSB-

Section

-RSB-

discusses

Karp

's

work

-LSB-

-RSB-

on

the

problem

for

paths

and

trees

Fast

algorithms

were

given

by

Atallah

and

Kosaraju

-LSB-

-RSB-

for

the

cases

in

which

the

graph

is

either

a

simple

cycle

or

path

The

algorithms

are

slightly

faster

for

the

cases

when

drops

are

permitted

Frederickson

-LSB-

-RSB-

showed

improved

running

times

for

a

cycle

when

no

drops

are

allowed

The

issue

of

tours

under

various

types

of

restrictions

has

also

been

investigated

by

Arkin

Hassin

and

Klein

-LSB-

-RSB-

Outline

of

the

paper

In

Section

we

describe

an

approximation

algorithm

for

the

k-delivery

TSP

that

obtains

an

approximation

ratio

of

We

first

prove

a

simpler

bound

of

in

Section

and

then

in

Section

we

provide

a

better

analysis

of

our

algorithm

We

also

show

how

to

convert

a

preemptive

tour

to

a

non-preemptive

tour

We

prove

that

the

total

length

of

the

non-preemptive

tour

obtained

by

our

algorithm

is

at

most

times

the

length

of

the

preemptive

tour

In

Section

we

describe

a

simple

algorithm

that

finds

a

preemptive

tour

whose

length

is

at

most

times

the

length

of

an

optimal

preemptive

tour

Notation

An

optimal

non-preemptive

tour

for

the

k-delivery

TSP

is

denoted

by

Ck

and

an

optimal

preemptive

tour

is

denoted

by

We

will

use

Ck

or

to

denote

the

length

of

the

tour

as

well

and

one

can

distinguish

between

the

two

meanings

from

the

context

An

approximation

algorithm

for

k-delivery

TSP

In

this

section

we

provide

an

approximation

algorithm

and

an

analysis

for

its

performance

We

also

show

how

to

simulate

a

preemptive

tour

by

a

non-preemptive

tour

In

particular

we

show

that

-LRB-

Lemma

-RRB-

-LRB-

This

also

shows

the

interesting

result

that

-RRB-

We

prove

the

following

theorems

Theorem

Consider

an

arbitrary

instance

of

k-delivery

TSP

There

is

a

polynomial-time

approximation

algorithm

that

finds

a

non-preemptive

tour

whose

length

is

at

most

times

the

length

of

an

optimal

tour

-LRB-

possibly

preemptive

-RRB-

In

the

special

case

when

the

points

are

specified

on

the

plane

and

edge-costs

are

specified

by

Euclidean

distances

the

approximation

ratio

can

be

improved

to

-LRB-

ffl

-RRB-

for

any

constant

ffl

Theorem

The

length

of

an

optimal

non-preemptive

tour

of

a

k-delivery

TSP

instance

is

at

most

times

the

length

of

an

optimal

preemptive

tour

i.e.

Ck

Overview

of

the

algorithm

The

main

idea

is

the

following

first

construct

a

tour

of

all

the

given

points

Starting

from

some

initial

vertex

we

traverse

the

tour

picking

up

pegs

and

delivering

them

to

slots

on-line

In

other

words

when

the

vehicle

passes

through

a

node

with

a

peg

it

picks

up

the

peg

and

when

it

passes

through

a

slot

it

drops

a

peg

there

We

show

that

if

the

vehicle

has

unbounded

capacity

then

there

is

always

a

starting

point

such

that

the

vehicle

can

complete

all

deliveries

without

ever

running

out

of

pegs

If

the

vehicle

has

bounded

capacity

k

the

simple

scheme

outlined

above

does

not

work

directly

We

need

to

address

the

following

two

situations

-LRB-

a

-RRB-

the

vehicle

is

full

when

a

peg

is

visited

and

-LRB-

b

-RRB-

the

vehicle

is

empty

when

a

slot

is

visited

In

the

following

discussion

we

assume

that

k

is

even

We

will

describe

how

to

handle

the

case

when

k

is

odd

later

The

performance

ratio

is

at

most

for

odd

k

We

treat

the

vehicle

as

full

when

it

has

k

pegs

on

it

and

the

remaining

capacity

is

used

as

a

buffer

The

tour

is

broken

up

into

segments

of

kinds

-LRB-

i

-RRB-

neutral

segments

with

equal

number

of

pegs

and

slots

-LRB-

ii

-RRB-

positive

segments

that

have

k

more

pegs

than

slots

and

-LRB-

iii

-RRB-

negative

segments

that

have

k

more

slots

than

pegs

Neutral

segments

are

processed

as

mentioned

in

the

above

scheme

In

most

practical

situations

most

parts

of

the

tour

constructed

may

be

neutral

segments

and

in

this

case

our

algorithm

would

do

very

well

since

neutral

segments

are

processed

by

traversing

them

only

once

By

definition

there

are

as

many

positive

segments

as

negative

segments

We

compute

a

minimum-weight

perfect

matching

between

the

positive

and

the

negative

segments

When

the

vehicle

is

passing

through

a

positive

segment

on

its

tour

it

delivers

the

excess

pegs

to

the

negative

segment

to

which

the

positive

segment

is

matched

The

main

difficulty

in

analyzing

such

a

scheme

is

that

the

cost

of

a

matching

between

the

positive

and

the

negative

segments

has

to

be

bounded

with

respect

to

an

optimal

tour

Note

that

the

matching

does

not

include

all

nodes

in

the

original

problem

and

therefore

it

could

possibly

be

arbitrarily

expensive

Another

complication

is

that

the

segments

do

not

have

the

same

number

of

points

on

them

The

techniques

used

in

the

previous

results

-LSB-

-RSB-

do

not

yield

a

bound

on

the

cost

of

such

a

matching

We

show

how

to

bound

the

cost

of

the

matching

with

respect

to

an

optimal

tour

and

use

it

to

derive

a

better

approximation

bound

We

now

describe

the

algorithm

in

detail

The

algorithm

Construct

a

tour

T

that

visits

all

the

points

Fix

a

reference

point

P

on

the

tour

T

Traverse

the

tour

T

in

some

direction

starting

from

P

Compute

the

excess

function

excess

-LRB-

e

-RRB-

for

each

edge

e

of

T

excess

-LRB-

e

-RRB-

pegs

-LRB-

e

-RRB-

slots

-LRB-

e

-RRB-

where

pegs

-LRB-

e

-RRB-

is

the

number

of

pegs

encountered

before

e

is

traversed

and

slots

-LRB-

e

-RRB-

is

defined

analogously

as

the

number

of

slots

encountered

before

e.

For

each

value

of

i

-LSB-

k

-RRB-

do

-LRB-

a

-RRB-

Break

the

tour

into

pieces

by

removing

all

edges

with

excess

-LRB-

e

-RRB-

i

mod

k

Call

these

edges

cut

edges

Fig.

shows

a

sample

tour

and

a

plot

of

the

excess

function

for

a

counterclockwise

traversal

of

the

tour

-LRB-

with

k

and

i

-RRB-

-LRB-

b

-RRB-

We

get

p-pieces

-LRB-

positive

pieces

-RRB-

n-pieces

-LRB-

negative

pieces

-RRB-

and

-LRB-

zero

or

neutral

pieces

-RRB-

as

follows

ffl

A

p-piece

is

one

where

the

excess

function

is

x

on

the

cut

edge

preceding

the

piece

and

x

k

on

the

cut

edge

following

the

piece

for

all

edges

e

in

the

piece

excess

-LRB-

e

-RRB-

-LRB-

x

x

k

-RRB-

ffl

A

n-piece

is

one

where

the

excess

function

is

x

on

the

cut

edge

preceding

the

piece

and

x?k

on

the

cut

edge

following

the

piece

for

all

edges

e

in

the

piece

excess

-LRB-

e

-RRB-

-LRB-

x

k

x

-RRB-

cut

edges

Pegs

Slots

P

Figure

A

tour

and

the

excess

function

plotted

for

k

and

i

ffl

A

is

one

where

the

excess

function

is

x

on

the

cut

edge

preceding

the

piece

and

x

on

the

cut

edge

following

the

piece

for

all

edges

e

in

the

piece

either

excess

-LRB-

e

-RRB-

-LRB-

x

k

x

-RRB-

-LRB-

such

a

piece

is

called

decreasing

-RRB-

or

excess

-LRB-

e

-RRB-

-LRB-

x

x

k

-RRB-

-LRB-

such

a

piece

is

called

increasing

-RRB-

-LRB-

c

-RRB-

Compute

a

matching

on

the

p

and

n-pieces

as

follows

ffl

Construct

a

weighted

bipartite

graph

B

-LRB-

V

V

E

-RRB-

on

p

and

n-pieces

as

follows

ffl

There

is

one

vertex

in

V

for

each

p-piece

and

one

vertex

in

V

for

each

n-piece

For

each

p-piece

u

and

each

n-piece

w

the

edge

-LRB-

u

w

-RRB-

has

weight

equal

to

the

minimum-weight

edge

connecting

a

vertex

in

u

and

a

vertex

in

w

ffl

Compute

a

minimum-weight

perfect

matching

M

in

the

bipartite

graph

B

A

p-piece

and

a

n-piece

that

are

matched

to

each

other

are

said

to

form

a

p

n-pair

-LRB-

d

-RRB-

Now

traverse

the

tour

starting

from

any

point

in

both

clockwise

and

anticlockwise

directions

as

follows

-LRB-

Assume

for

now

that

we

start

each

traversal

at

the

beginning

of

a

piece

with

exactly

k

pegs

Lemma

shows

how

this

assumption

is

unnecessary

-RRB-

ffl

On

encountering

a

we

move

along

the

piece

picking

up

pegs

and

delivering

them

Since

we

start

with

k

pegs

we

can

do

this

in

a

single

traversal

and

reach

the

end

of

the

piece

with

k

pegs

Note

that

we

leave

the

piece

with

k

pegs

ffl

When

we

encounter

the

first

piece

of

a

p

n-pair

we

service

the

pair

as

follows

suppose

we

encounter

a

p-piece

P

which

is

matched

with

n-piece

P

by

edge

e

M

Note

that

there

must

be

an

edge

corresponding

to

e

such

that

connects

some

vertex

in

P

to

some

vertex

in

P

and

the

weight

of

is

the

same

as

that

of

e.

Traverse

P

performing

pickups

and

deliveries

until

is

encountered

Now

move

to

the

beginning

of

P

and

traverse

P

performing

pickups

and

deliveries

Then

move

back

to

the

point

in

P

where

we

left

off

and

continue

performing

pickups

and

deliveries

Note

that

after

servicing

a

p

n-pair

thus

we

finish

with

k

pegs

The

case

when

the

n-piece

is

encountered

before

the

p-piece

is

handled

similarly

ffl

When

we

encounter

the

second

piece

of

a

p

n-pair

we

simply

traverse

the

piece

without

performing

any

pickups

and

deliveries

-LRB-

since

it

has

already

been

serviced

-RRB-

-LRB-

e

-RRB-

For

both

the

tours

-LRB-

clockwise

and

anticlockwise

-RRB-

described

above

find

a

valid

starting

point

-LRB-

i.e.

a

starting

point

such

that

we

never

run

out

of

pegs

and

the

number

of

pegs

carried

is

at

most

k

-RRB-

Lemma

guarantees

the

existence

of

such

a

starting

point

Return

a

shortest

tour

from

amongst

the

k

tours

constructed

-LRB-

two

for

each

i

-LSB-

k

-RRB-

-RRB-

Analysis

a

weaker

bound

We

can

prove

an

upper

bound

of

on

the

approximation

ratio

achieved

by

the

above

algorithm

Since

the

proof

is

complex

we

prove

a

simpler

bound

of

that

contains

the

basic

ideas

In

fact

for

the

simpler

proof

we

can

fix

i

in

the

above

algorithm

To

prove

the

better

bound

we

need

to

try

all

values

of

i.

Section

contains

the

proof

for

the

bound

of

We

also

prove

the

relationship

between

the

tour

generated

by

the

algorithm

and

-LRB-

Theorem

-RRB-

Lemma

A

valid

starting

point

is

guaranteed

to

exist

in

Step

of

the

algorithm

Proof

Suppose

we

started

the

tour

constructed

by

the

algorithm

at

the

beginning

of

any

piece

with

a

vehicle

preloaded

with

k

pegs

Then

the

following

invariant

is

maintained

throughout

the

tour

The

vehicle

has

exactly

k

pegs

when

it

traverses

a

cut

edge

from

one

piece

to

another

We

can

verify

that

the

number

of

pegs

carried

by

the

vehicle

always

lies

in

the

interval

-LSB-

k

-RSB-

This

would

be

a

valid

tour

except

for

the

fact

that

we

assumed

that

we

started

with

k

pegs

initially

Let

n

-LRB-

e

-RRB-

be

the

number

of

pegs

carried

by

the

vehicle

as

it

traverses

edge

e

-LRB-

beginning

with

k

pegs

-RRB-

Consider

the

edge

emin

where

n

-LRB-

e

-RRB-

reaches

its

minimum

value

say

x

-LRB-

break

ties

arbitrarily

-RRB-

Suppose

we

start

a

new

vehicle

with

no

pegs

from

edge

emin

Let

-LRB-

e

-RRB-

be

the

number

of

pegs

carried

by

the

new

vehicle

as

it

traverses

edge

e

It

can

be

verified

that

-LRB-

e

-RRB-

n

-LRB-

e

-RRB-

x.

By

the

choice

of

emin

this

ensures

that

the

number

of

pegs

carried

by

the

vehicle

always

lies

in

the

interval

-LSB-

k

-RSB-

This

proves

the

existence

of

a

valid

starting

point

for

the

tour

and

in

fact

also

gives

a

simple

method

to

find

such

a

starting

point

Based

on

the

above

lemma

we

can

also

show

the

following

Lemma

There

is

a

polynomial-time

approximation

algorithm

for

the

TSP

-LRB-

i.e.

the

vehicle

has

infinite

capacity

-RRB-

with

a

performance

ratio

of

For

geometric

instances

on

the

plane

the

approximation

ratio

is

ffl

for

any

ffl

Proof

Let

TOPT

be

a

minimum

length

tour

of

all

the

points

Since

is

a

tour

of

the

points

TOPT

The

algorithm

constructs

a

tour

T

of

all

the

points

For

the

algorithm

we

will

assume

that

an

ff-approximation

of

TSP

tour

is

used

and

therefore

the

weight

of

the

tour

is

at

most

ffTOPT

If

Christofides

algorithm

is

used

then

ff

For

geometric

instances

such

as

points

in

the

plane

the

algorithms

of

Arora

-LSB-

-RSB-

and

Mitchell

-LSB-

-RSB-

can

be

used

to

obtain

a

-LRB-

ffl

-RRB-

approximation

of

the

TSP

tour

In

this

case

ff

ffl

for

any

constant

ffl

Using

the

same

ideas

as

in

the

above

lemma

we

can

show

that

there

is

always

a

valid

starting

point

on

this

tour

such

that

we

never

run

out

of

pegs

In

Step

we

find

a

matching

M

on

the

p

and

n-pieces

We

need

to

bound

the

weight

of

the

matching

M

We

can

not

bound

the

weight

of

the

matching

by

the

method

used

in

-LSB-

-RSB-

since

the

matching

is

not

being

found

on

a

graph

that

involves

all

the

pegs

and

slots

We

use

a

different

approach

to

bound

the

weight

of

the

matching

Let

A

be

a

minimum-weight

perfect

matching

between

pegs

and

slots

where

a

peg

must

be

matched

to

a

slot

We

use

A

to

denote

the

matching

and

its

weight

One

can

distinguish

between

the

two

meanings

from

the

context

Bounding

the

matching

A

The

following

lemmas

derive

an

upper

bound

on

the

ratio

of

the

weight

of

matching

A

to

the

weight

of

an

optimal

preemptive

solution

Even

though

there

are

other

ways

of

proving

this

directly

these

proof

methods

also

show

how

to

simulate

a

preemptive

solution

with

a

non-preemptive

solution

Our

main

goal

is

to

prove

the

following

theorem

Theorem

A

This

theorem

follows

once

we

establish

the

following

lemmas

Lemma

-LRB-

Chalasani

Motwani

and

Rao

-LSB-

-RSB-

-RRB-

A

We

now

prove

that

a

non-preemptive

unit-capacity

vehicle

can

simulate

a

preemptive

capacity-k

vehicle

with

an

increase

of

the

length

of

the

tour

by

a

factor

of

k

One

could

attempt

to

prove

this

by

walking

around

the

cycle

k

times

but

the

problem

is

that

we

may

attempt

to

pick

up

a

peg

that

is

not

yet

available

Lemma

k

Proof

Consider

a

tour

which

delivers

pegs

to

slots

and

is

allowed

intermediate

dropping

points

We

will

show

that

we

can

convert

this

tour

into

one

of

length

k

where

the

pegs

are

carried

to

slots

with

no

intermediate

drops

by

a

unit

capacity

vehicle

Assume

the

vehicle

of

capacity

k

starts

at

s

and

returns

to

s

We

construct

an

auxiliary

multigraph

G

-LRB-

V

E

-RRB-

from

the

tour

as

follows

The

vertex

set

of

graph

is

defined

to

be

V

fsg

-LSB-

fxjx

is

an

intermediate

drop

point

g

Imagine

that

we

store

the

pegs

on

numbered

compartments

in

the

vehicle

The

numbers

are

k

The

tour

starts

from

s

and

visits

pegs/slots

and

intermediate

drop

points

We

can

view

the

tour

as

segments

where

it

goes

back

and

forth

between

the

vertices

of

the

graph

we

constructed

-LRB-

see

Fig

-RRB-

We

create

k

edges

in

G

for

each

movement

done

by

the

vehicle

between

two

vertices

of

G.

Each

edge

corresponds

to

a

numbered

compartment

We

associate

with

each

such

edge

the

pegs

which

were

placed

into

this

compartment

and

the

slots

which

were

serviced

by

removing

a

peg

from

this

compartment

Thus

each

edge

is

associated

with

an

alternating

sequence

of

pegs

and

slots

As

the

vehicle

moves

from

vertex

x

to

vertex

y

of

G

each

numbered

compartment

undergoes

various

changes

Lose

a

peg

-LRB-

leave

x

with

a

peg

arrive

at

y

with

no

peg

-RRB-

The

corresponding

edge

is

associated

with

a

peg/slot

sequence

of

the

form

sps

ps

-LRB-

Here

p

represents

a

peg

and

s

a

slot

-RRB-

Gain

a

peg

-LRB-

leave

x

with

no

peg

arrive

at

y

with

a

peg

-RRB-

The

corresponding

edge

is

associated

with

a

sequence

of

the

form

psp

sp

Move

without

carrying

anything

from

x

to

y

-LRB-

we

may

load

and

unload

pegs

in

this

compartment

during

the

motion

-RRB-

The

corresponding

edge

is

associated

with

a

sequence

of

the

form

psp

ps

-LRB-

possibly

empty

-RRB-

Move

carrying

a

peg

from

a

vertex

to

another

vertex

-LRB-

we

may

unload

and

load

pegs

in

this

compartment

during

the

motion

-RRB-

The

corresponding

edge

is

associated

with

a

sequence

of

the

form

sps

sp

-LRB-

possibly

empty

-RRB-

Each

edge

corresponding

to

a

compartment

is

a

labeled

edge

in

the

multigraph

Type

-LRB-

-RRB-

edges

are

labeled

as

edges

Type

-LRB-

-RRB-

edges

are

labeled

as

edges

We

subdivide

edges

of

type

-LRB-

-RRB-

by

a

vertex

xy

The

edge

from

x

to

xy

gets

the

label

and

the

edge

from

xy

to

y

is

labeled

as

a

edge

We

subdivide

edges

of

type

-LRB-

-RRB-

by

a

vertex

xy

The

edge

from

x

to

xy

gets

the

label

and

the

edge

from

xy

to

y

is

labeled

as

a

edge

We

can

think

of

a

edge

as

being

associated

with

an

odd

length

alternating

peg/slot

sequence

that

begins

and

ends

with

a

peg

Similarly

a

edge

can

be

thought

of

as

being

associated

with

an

odd

length

alternating

peg/slot

sequence

that

begins

and

ends

with

a

slot

Lemma

For

each

vertex

of

the

auxiliary

multigraph

G

the

number

of

labels

incident

to

it

is

equal

to

the

number

of

labels

incident

to

it

Proof

For

each

compartment

the

contribution

to

the

and

label

is

the

same

Consider

a

vertex

v

that

is

a

dropping

point

The

number

of

pegs

that

are

carried

to

it

are

carried

away

-LRB-

Formally

each

vertex

v

occurs

a

number

of

times

on

the

tour

There

are

cases

-LRB-

a

-RRB-

come

with

a

peg

leave

it

here

and

go

-LRB-

v

-RRB-

-LRB-

b

-RRB-

come

with

a

peg

leave

with

a

peg

-LRB-

v

-RRB-

-LRB-

c

-RRB-

come

with

no

peg

go

with

no

peg

-LRB-

v

-RRB-

-LRB-

d

-RRB-

come

with

no

peg

go

with

a

peg

-LRB-

v

-RRB-

Number

of

case

-LRB-

a

-RRB-

and

-LRB-

d

-RRB-

are

the

same

since

-LRB-

a

-RRB-

increases

peg

count

and

-LRB-

d

-RRB-

decreases

peg

count

-RRB-

In

order

to

construct

a

solution

that

does

not

drop

pegs

at

intermediate

locations

we

need

to

construct

an

alternating

sequence

of

pegs

and

slots

which

visits

every

peg

and

every

slot

Find

an

Euler

tour

that

alternates

using

and

edges

in

this

multigraph

-LRB-

When

we

enter

a

vertex

on

a

edge

we

can

leave

on

a

edge

and

vice-versa

-RRB-

The

Euler

tour

can

be

interpreted

as

a

non-drop

tour

solution

for

a

vehicle

with

unit

capacity

The

unit

capacity

vehicle

simply

traverses

the

edges

in

the

order

of

the

Euler

tour

When

we

traverses

a

particular

edge

we

service

the

sequence

of

pegs

and

slots

associated

with

that

edge

The

definition

of

and

edges

ensures

that

we

encounter

pegs

and

slots

in

an

alternating

fashion

This

therefore

gives

a

non-drop

tour

solution

with

unit

capacity

This

completes

the

proof

of

Lemma

We

illustrate

this

construction

by

an

example

in

Figure

Suppose

we

are

given

the

preemptive

tour

that

starts

at

s

pick

up

a

peg

on

path

A

and

drop

it

off

at

the

first

drop

off

point

We

then

take

the

loop

marked

B

performing

one

delivery

come

back

to

pick

up

the

dropped

off

peg

and

take

the

loop

marked

C

We

return

with

a

peg

drop

it

off

at

the

same

place

we

then

take

the

path

D

drop

off

a

second

peg

come

back

to

pick

up

the

first

peg

on

path

E

deliver

it

on

path

F

pick

up

the

second

peg

and

take

path

G

returning

to

s.

Corresponding

to

this

traversal

we

construct

the

auxiliary

multigraph

G

We

have

three

vertices

to

begin

with

Path

A

gains

a

peg

and

is

marked

Path

B

is

a

loop

on

which

we

leave

without

a

peg

and

return

without

a

peg

we

subdivide

this

edge

and

it

is

a

edge

Path

C

is

a

loop

on

which

we

leave

with

a

peg

and

return

with

a

peg

and

so

we

subdivide

it

and

mark

it

a

edge

In

a

similar

manner

we

finish

the

construction

of

the

multigraph

An

Euler

tour

in

this

multigraph

that

alternates

between

and

edges

is

easy

to

find

This

corresponds

to

a

non-preemptive

traversal

s

Pegs

Slots

A

B

C

D

E

F

G

Auxiliary

Multigraph

G

Figure

Illustrating

construction

of

auxiliary

multigraph

G

-LRB-

V

E

-RRB-

for

a

unit

capacity

vehicle

Bounding

the

matching

M

Let

W

be

a

matching

-LRB-

which

we

call

a

wiggly

matching

-RRB-

that

matches

pegs

to

slots

such

that

all

points

are

matched

except

for

some

k

pegs

in

each

p-piece

and

k

slots

in

each

n-piece

We

use

the

wiggly

matching

to

bound

the

cost

of

the

matching

M

as

follows

Lemma

M

k

-LRB-

A

W

-RRB-

-LRB-

-RRB-

Proof

Consider

the

symmetric

difference

of

A

and

W

A

is

a

perfect

matching

and

W

is

a

matching

where

all

the

pegs

and

slots

in

the

are

matched

and

in

each

p

-LRB-

n

-RRB-

piece

there

are

unmatched

pegs

-LRB-

slots

-RRB-

The

symmetric

difference

has

even

length

cycles

and

paths

Since

A

is

a

perfect

matching

the

symmetric

difference

is

a

collection

of

disjoint

augmenting

paths

-LRB-

with

respect

to

W

-RRB-

that

start

and

end

with

edges

from

A

at

vertices

of

degree

in

the

graph

A

-LSB-

W

The

only

vertices

having

degree

are

pegs

in

the

p-pieces

and

slots

in

the

n-pieces

Each

augmenting

path

with

respect

to

W

has

a

peg

at

one

end

and

a

slot

at

the

other

end

This

gives

us

paths

from

pegs

to

slots

such

that

each

p-piece

has

k

paths

emerging

from

it

and

each

n-piece

has

k

paths

ending

on

it

This

collection

of

paths

can

be

decomposed

into

k

perfect

matchings

between

pand

n-pieces

-LRB-

because

the

edges

of

a

d-regular

bipartite

graph

can

be

decomposed

into

d

perfect

matchings

-LSB-

-RSB-

-RRB-

It

follows

that

the

weight

of

the

minimum

weight

perfect

matching

on

the

p

and

n-pieces

is

at

most

the

average

weight

of

the

matchings

we

found

By

triangle

inequality

the

weight

of

the

symmetric

difference

is

at

most

the

sum

of

the

weights

of

the

matchings

This

proves

the

lemma

Recall

that

T

is

the

tour

of

all

the

points

constructed

by

the

algorithm

Let

T

-LRB-

-RRB-

be

the

total

length

of

the

p

n-pieces

and

let

T

-LRB-

-RRB-

be

the

total

length

of

the

Let

T

-LRB-

C

-RRB-

by

the

total

length

of

the

cut

edges

Then

T

T

-LRB-

-RRB-

T

-LRB-

-RRB-

T

-LRB-

C

-RRB-

Bounding

the

matching

W

Lemma

W

k

-LRB-

-RRB-

T

-LRB-

-RRB-

-LRB-

-RRB-

Proof

We

will

construct

the

wiggly

matching

separately

for

and

p

n-pieces

A

can

be

traversed

in

one

of

the

two

directions

by

a

vehicle

with

no

pegs

initially

such

that

pegs

are

picked

up

and

delivered

without

having

to

back

up

Suppose

this

vehicle

operates

like

a

stack

pushing

and

popping

pegs

For

each

j

-LSB-

k

-RRB-

consider

the

pegs

which

were

placed

in

location

j

of

this

stack

and

the

slots

which

were

serviced

by

popping

a

peg

from

location

j

of

this

stack

This

defines

a

path

of

the

form

psp

s

where

p

stands

for

a

peg

and

s

stands

for

a

slot

We

match

each

peg

on

this

path

with

the

slot

immediately

following

it

The

total

length

of

the

matching

edges

is

at

most

the

length

of

the

path

But

the

length

of

the

path

is

at

most

the

length

of

the

Since

we

construct

k

paths

the

total

length

of

the

matching

within

this

is

at

most

k

times

the

length

of

the

A

p-piece

can

be

traversed

-LRB-

in

either

direction

-RRB-

by

a

vehicle

with

no

pegs

initially

such

that

pegs

are

picked

up

and

delivered

without

having

to

back

up

The

vehicle

ends

up

with

k

pegs

at

the

end

Analogous

to

the

construction

for

a

we

define

a

path

corresponding

to

each

location

j

of

the

stack

Each

path

is

of

the

form

psp

sp

Now

we

can

match

pegs

with

slots

either

starting

from

the

left

or

the

right

In

either

case

one

peg

is

left

unmatched

We

choose

the

lower

cost

matching

amongst

the

two

The

total

cost

of

the

two

matchings

is

exactly

the

cost

of

the

path

Thus

the

smaller

of

the

two

matchings

costs

at

most

half

the

length

of

the

path

Again

the

length

of

each

path

is

at

most

the

length

of

the

p-piece

Since

we

construct

k

paths

the

total

length

of

the

matching

within

this

p-piece

is

at

most

k

times

the

length

of

the

p-piece

A

similar

construction

can

be

done

for

n-pieces

Hence

the

lemma

follows

Theorem

bounds

the

weight

of

the

matching

A

to

be

at

most

Substituting

into

-LRB-

-RRB-

for

A

from

the

theorem

and

for

W

from

-LRB-

-RRB-

we

get

M

-LRB-

-RRB-

T

-LRB-

-RRB-

-LRB-

-RRB-

Proof

of

Theorems

and

Note

that

in

the

two

tours

constructed

by

the

algorithm

each

is

traversed

once

and

each

cut

edge

is

traversed

once

Also

the

first

of

each

p

n-pair

is

traversed

once

while

the

second

is

traversed

thrice

Averaging

over

the

two

traversals

we

charge

each

p

n-piece

twice

Each

edge

in

M

is

traversed

twice

Hence

the

average

length

of

the

two

tours

constructed

is

at

most

T

-LRB-

-RRB-

-LRB-

-RRB-

T

-LRB-

C

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

T

-LRB-

C

-RRB-

-LRB-

-RRB-

Since

ff

we

obtain

a

worst

case

approximation

ratio

of

We

can

also

view

this

as

a

constructive

proof

bounding

the

ratio

of

Ck

to

In

that

case

ff

and

we

obtain

an

upper

bound

of

on

the

ratio

In

Section

we

show

a

bound

of

-LRB-

-LRB-

-RRB-

ff

-RRB-

Using

this

improved

bound

we

get

an

approximation

ratio

of

and

we

can

bound

the

ratio

of

Ck

to

by

Also

for

geometric

instances

-LRB-

consisting

of

points

in

the

plane

with

Euclidean

distances

-RRB-

using

an

-LRB-

ffl

-RRB-

optimal

tour

-LSB-

-RSB-

in

the

first

step

of

the

algorithm

we

obtain

a

ratio

of

-LRB-

ffl

-RRB-

If

we

are

given

a

fixed

starting

point

q

we

obtain

a

tour

that

starts

and

ends

at

q

as

follows

We

apply

the

algorithm

as

usual

Suppose

this

constructs

a

tour

that

starts

and

ends

at

which

is

a

peg

without

loss

of

generality

We

first

move

from

q

to

traverse

the

tour

constructed

by

the

algorithm

and

on

reaching

again

move

back

to

q

We

pay

an

additional

cost

of

twice

the

distance

between

q

and

which

is

at

most

the

cost

of

the

optimal

tour

since

the

optimal

tour

includes

paths

between

q

to

This

adds

to

our

approximation

ratios

A

better

analysis

Notice

that

the

previous

analysis

did

not

use

the

fact

that

we

try

different

break-points

and

average

over

them

We

now

present

a

better

analysis

that

builds

on

the

basic

ideas

from

Section

to

show

that

the

average

tour

length

for

the

k

tours

constructed

is

actually

at

most

-LRB-

-LRB-

-RRB-

ff

-RRB-

Examining

the

proof

of

Lemma

we

observe

that

the

proof

constructs

k

paths

within

each

piece

of

the

tour

The

contribution

to

the

total

length

of

the

final

tour

is

the

average

path-length

in

the

p

n-pieces

plus

twice

the

average

path-length

in

the

Here

average

refers

to

the

average

length

of

the

k

paths

The

earlier

proof

bounded

each

path-length

by

the

length

of

the

entire

piece

We

will

improve

the

analysis

by

getting

better

estimates

for

the

average

path-lengths

by

averaging

over

all

values

of

i

used

to

define

the

cut

edges

of

the

tour

For

a

node

v

-LRB-

peg

or

slot

-RRB-

in

the

tour

T

define

before

-LRB-

v

-RRB-

to

be

the

edge

preceding

v

in

T

and

after

-LRB-

v

-RRB-

to

be

the

edge

following

v

in

T

It

will

be

useful

to

identify

the

paths

constructed

by

the

proof

of

Lemma

with

the

values

of

the

excess

function

on

edges

within

a

piece

In

the

following

discussion

we

fix

a

value

of

i

used

to

define

the

cut-edges

For

a

given

i

for

every

integer

j

-LSB-

k

-RRB-

we

construct

a

path

in

each

piece

based

on

the

values

of

the

excess

function

as

follows

An

edge

e

is

said

to

be

a

j-edge

if

excess

-LRB-

e

-RRB-

j

-LRB-

mod

k

-RRB-

For

a

p

n-piece

the

path

consists

of

the

pegs

p

such

that

before

-LRB-

p

-RRB-

is

a

j-edge

and

the

slots

s

such

that

after

-LRB-

s

-RRB-

is

a

j-edge

For

a

we

define

the

paths

differently

depending

on

whether

the

piece

is

increasing

or

decreasing

For

a

increasing

the

path

consists

of

the

pegs

p

such

that

after

-LRB-

p

-RRB-

is

a

j-edge

and

the

slots

s

such

that

before

-LRB-

s

-RRB-

is

a

j-edge

For

a

decreasing

the

path

consists

of

the

slots

s

such

that

after

-LRB-

s

-RRB-

is

a

j-edge

and

the

pegs

p

such

that

before

-LRB-

p

-RRB-

is

a

j-edge

See

Figure

for

an

illustration

of

this

definition

of

paths

Observe

that

by

this

definition

for

all

cases

the

path

for

j

i

always

has

zero

length

For

a

p-piece

it

consists

of

a

single

peg

For

a

n-piece

it

consists

of

a

single

slot

For

a

the

path

for

j

i

is

empty

The

reader

can

verify

that

the

paths

constructed

by

this

definition

are

identical

to

the

paths

constructed

in

the

proof

of

Lemma

Let

l

-LRB-

-RRB-

ij

be

the

total

length

of

the

paths

corresponding

to

j

-LRB-

by

the

above

correspondence

-RRB-

within

the

p

n-pieces

when

i

is

used

to

define

the

cut

edges

We

define

l

-LRB-

-RRB-

ij

similarly

for

the

paths

within

the

p

s

j

p

p

s

j

s

j

j

s

j

j

j

j

p

s

j

j

p

j

j

s

j

j

j

j

s

s

j

p

s

jj

p

p

s

pp

-LRB-

increasing

-RRB-

-LRB-

decreasing

-RRB-

Peg

Slot

j-edge

j-sandwiched

edges

p-piece

n-piece

Figure

Illustrating

the

definition

of

paths

in

terms

of

the

excess

function

Call

an

edge

e

in

a

piece

j-sandwiched

if

e

is

not

a

j-edge

and

there

is

some

j-edge

before

e

and

some

j

edge

after

e

in

the

piece

-LRB-

the

j-edges

need

not

be

immediately

before

and

after

e

-RRB-

Note

that

the

property

of

being

a

j-edge

is

independent

of

the

value

of

i

however

the

property

of

being

a

j-sandwiched

edge

depends

on

the

value

of

i

used

to

define

the

cut-edges

In

any

piece

the

path

corresponding

to

j

-LRB-

described

above

-RRB-

consists

of

j-sandwiched

edges

and

j-edges

Thus

the

length

of

this

path

is

bounded

by

the

sum

of

the

total

length

of

the

j-sandwiched

edges

and

the

total

length

of

the

j-edges

in

the

piece

Let

p

-LRB-

-RRB-

ij

be

the

total

length

of

the

j-sandwiched

edges

within

the

p

n-pieces

when

i

is

used

to

define

the

cut

edges

We

define

p

-LRB-

-RRB-

ij

similarly

for

the

the

Let

q

-LRB-

-RRB-

ij

be

the

total

length

of

the

j-edges

within

the

p

n-pieces

when

i

is

used

to

define

the

cut

edges

We

define

q

-LRB-

-RRB-

ij

similarly

for

the

By

the

above

definitions

we

have

l

-LRB-

-RRB-

ij

p

-LRB-

-RRB-

ij

q

-LRB-

-RRB-

ij

l

-LRB-

-RRB-

ij

p

-LRB-

-RRB-

ij

q

-LRB-

-RRB-

ij

Also

when

i

is

used

to

define

the

cut

edges

let

T

-LRB-

-RRB-

i

be

the

total

length

of

the

p

n-pieces

let

T

-LRB-

-RRB-

i

be

the

total

length

of

the

and

let

T

-LRB-

C

-RRB-

i

be

the

total

length

of

the

cut

edges

Note

that

X

j

i

q

-LRB-

-RRB-

ij

T

-LRB-

-RRB-

i

X

j

i

q

-LRB-

-RRB-

ij

T

-LRB-

-RRB-

i

Now

the

analysis

of

the

previous

section

bounded

the

average

length

of

the

two

tours

produced

when

a

particular

value

of

i

is

used

to

define

the

cut

edges

In

terms

of

the

notation

introduced

this

bound

can

be

written

as

kA

k

X

j

i

l

-LRB-

-RRB-

ij

k

X

j

i

l

-LRB-

-RRB-

ij

-LRB-

-RRB-

i

T

-LRB-

-RRB-

i

T

-LRB-

C

-RRB-

i

k

X

j

i

p

-LRB-

-RRB-

ij

q

-LRB-

-RRB-

ij

k

X

j

i

p

-LRB-

-RRB-

ij

q

-LRB-

-RRB-

ij

-LRB-

-RRB-

i

T

-LRB-

-RRB-

i

T

-LRB-

C

-RRB-

i

k

X

j

i

p

-LRB-

-RRB-

ij

k

X

j

i

p

-LRB-

-RRB-

ij

k

T

-LRB-

-RRB-

i

k

T

-LRB-

-RRB-

i

T

-LRB-

C

-RRB-

i

Let

L

be

the

length

of

the

constructed

tour

averaged

over

all

the

k

values

of

i.

Summing

up

the

above

bound

over

all

values

of

i

we

get

k

k

X

i

X

j

i

p

-LRB-

-RRB-

ij

-LCB-

z

-RCB-

k

X

i

X

j

i

p

-LRB-

-RRB-

ij

-LCB-

z

-RCB-

k

X

i

T

-LRB-

-RRB-

i

-LCB-

z

-RCB-

k

X

i

T

-LRB-

-RRB-

i

-LCB-

z

-RCB-

X

i

T

-LRB-

C

-RRB-

i

-LCB-

z

-RCB-

-LRB-

-RRB-

We

will

compute

a

bound

for

sum

of

the

last

five

terms

of

the

right

hand

side

of

-LRB-

-RRB-

in

terms

of

T

Consider

a

particular

edge

e

of

the

tour

Let

us

calculate

its

contribution

to

the

various

terms

in

-LRB-

-RRB-

Suppose

e

is

an

r-edge

For

each

value

of

i

-LSB-

k

-RRB-

i

r

we

scan

to

the

left

and

right

of

e

for

the

closest

i-edges

before

and

after

e.

Let

Ai

be

the

portion

of

the

path

between

-LRB-

and

not

including

-RRB-

these

two

i-edges

When

i

is

chosen

to

define

the

cut

edges

of

the

tour

Ai

is

a

-LRB-

p

n

or

-RRB-

piece

Accordingly

we

label

the

segment

Ai

as

p

n

or

Note

that

we

use

the

term

segment

as

opposed

to

piece

as

a

segment

Ai

may

or

may

not

be

a

piece

depending

on

the

value

used

to

define

the

cut

edges

Edge

e

contributes

to

l

-LRB-

-RRB-

ij

iff

Ai

is

a

p

n

segment

and

e

is

j-sandwiched

within

Ai

i.e.

iff

Aj

is

completely

contained

within

Ai

The

edge

e

contributes

to

l

-LRB-

-RRB-

ij

iff

Ai

is

a

and

e

is

j-sandwiched

within

Ai

i.e.

iff

Aj

is

completely

contained

within

Ai

The

edge

e

contributes

to

T

-LRB-

-RRB-

i

iff

Ai

is

a

p

n

segment

and

contributes

to

T

-LRB-

-RRB-

i

iff

Ai

is

a

It

contributes

to

T

-LRB-

C

-RRB-

i

iff

i

r.

Claim

If

Ai

is

a

p

n

segment

it

can

not

be

contained

in

any

other

segment

Aj

-LRB-

j

i

-RRB-

Proof

Since

Ai

is

a

p

n

segment

the

excess

function

changes

by

k

from

one

end

to

the

other

Hence

there

must

be

some

point

within

it

where

the

excess

function

is

j

mod

k

Hence

one

of

the

end

points

of

Aj

must

be

within

Ai

proving

the

claim

Suppose

x

of

the

segments

Ai

are

and

-LRB-

x

-RRB-

of

them

are

p

n

segments

Let

us

calculate

the

number

of

times

edge

e

is

counted

in

the

various

terms

in

-LRB-

-RRB-

The

contribution

to

is

the

number

of

pairs

-LRB-

Aj

Ai

-RRB-

such

that

Aj

is

contained

in

Ai

and

Ai

is

a

p

n

segment

By

the

above

claim

Aj

must

be

a

Thus

the

number

of

such

pairs

is

at

most

x

-LRB-

x

-RRB-

The

contribution

to

is

the

number

of

pairs

-LRB-

Aj

Ai

-RRB-

such

that

Aj

is

contained

in

Ai

and

Ai

is

a

By

the

above

claim

Aj

must

be

a

Note

that

if

Aj

is

contained

in

Ai

then

Ai

is

not

contained

in

Aj

Thus

the

number

of

such

pairs

is

at

most

x

-LRB-

x

-RRB-

The

contribution

to

is

x

The

contribution

to

is

x

The

contribution

to

is

Thus

the

contribution

of

edge

e

to

the

sum

of

the

last

five

terms

in

-LRB-

-RRB-

is

at

most

kx

k

x

k

x

-LRB-

x

-RRB-

k

k

x

k

x

k

k

k

k

k

Hence

the

sum

of

the

last

five

terms

in

-LRB-

-RRB-

is

at

most

-LRB-

k

-RRB-

T

Using

this

bound

in

-LRB-

-RRB-

we

get

k

k

k

T

and

hence

L

T

Since

ff

we

obtain

a

approximation

algorithm

As

before

we

can

also

view

this

as

a

constructive

proof

bounding

the

ratio

of

Ck

to

In

that

case

ff

and

we

obtain

an

upper

bound

of

on

the

ratio

Odd

values

of

k

When

k

is

odd

we

can

use

our

algorithm

using

k

as

the

capacity

of

the

vehicle

Theorem

and

Lemmas

and

are

true

for

all

values

of

k

independent

of

its

parity

In

Lemmas

and

k

should

be

replaced

by

k

If

the

proof

is

repeated

with

these

modifications

the

performance

ratio

increases

by

an

additive

term

of

The

performance

ratio

in

this

case

is

at

most

-LRB-

k

-RRB-

A

preemptive

algorithm

In

this

section

we

describe

a

simple

strategy

that

also

achieves

an

approximation

factor

of

for

the

preemptive

k-delivery

TSP

Our

algorithm

outputs

a

preemptive

solution

-LRB-

i.e.

may

drop

pegs

at

intermediate

locations

during

the

course

of

the

algorithm

-RRB-

and

the

length

traveled

by

the

vehicle

is

compared

to

the

length

of

an

optimal

preemptive

solution

This

algorithm

is

a

modification

of

the

strategy

given

by

Chalasani

Motwani

and

Rao

-LSB-

-RSB-

The

CMR

Algorithm

We

first

review

the

algorithm

given

by

Chalasani

Motwani

and

Rao

-LSB-

-RSB-

for

this

problem

We

then

show

that

a

modification

of

the

algorithm

improves

the

approximation

ratio

to

without

preemption

and

with

preemption

We

will

assume

for

simplicity

that

n

is

a

multiple

of

k

and

that

k

is

even

The

former

assumption

can

be

made

to

hold

by

adding

at

most

k

dummy

peg/slot

pairs

Find

tours

-LRB-

of

almost

minimum

weight

-RRB-

Tp

and

Ts

of

the

pegs

and

slots

points

respectively

-LRB-

This

step

could

be

implemented

using

Christofides

heuristic

for

the

TSP

-RRB-

Break

Tp

and

Ts

into

paths

containing

k

vertices

each

by

deleting

every

k

th

edge

from

each

cycle

View

each

k-path

as

a

super-node

and

construct

an

auxiliary

complete

bipartite

graph

which

has

one

vertex

for

each

of

the

super-nodes

in

Tp

and

Ts

The

weight

of

an

edge

in

this

bipartite

graph

is

the

shortest

distance

between

a

pair

of

points

belonging

to

the

respective

super-nodes

Find

a

minimum-weight

perfect

matching

M

in

this

bipartite

graph

Traverse

the

tour

Tp

and

at

the

end

of

each

segment

use

the

matching

M

to

transport

the

k

pegs

to

the

corresponding

delivery

point

-LRB-

super-node

-RRB-

in

Ts

The

total

length

of

such

a

tour

is

shown

to

be

at

most

Ck

A

As

shown

in

-LSB-

-RSB-

A

kCk

Using

Christofides

approximation

for

the

TSP

Tp

and

Ts

are

at

most

Ck

The

approximation

ratio

obtained

is

therefore

at

most

For

geometrical

instances

such

as

points

in

the

plane

the

algorithms

of

Arora

-LSB-

-RSB-

and

Mitchell

-LSB-

-RSB-

-RRB-

can

be

used

to

obtain

an

-LRB-

ffl

-RRB-

approximation

of

the

TSP

and

this

leads

to

better

approximation

factors

for

these

instances

Theorem

shows

that

A

Since

Ck

we

also

have

A

Ck

Using

this

improved

upper

bound

on

the

weight

of

A

the

approximation

ratio

of

the

algorithm

improves

from

to

A

small

change

to

the

algorithm

improves

it

further

to

an

approximation

factor

of

as

follows

We

can

traverse

Tp

in

two

ways

A

clockwise

traversal

and

an

anticlockwise

traversal

gives

us

two

tours

whose

total

length

is

at

most

Ts

M

-LRB-

-RRB-

The

smaller

of

these

two

tours

has

length

at

most

the

average

of

these

two

tour

lengths

which

is

Figure

illustrates

why

each

segment

of

the

tour

Tp

is

charged

at

most

times

by

the

two

tours

Observe

that

each

segment

of

Tp

is

traversed

once

in

one

of

the

tours

and

thrice

in

the

other

tour

An

improved

non-preemptive

algorithm

We

now

present

an

improved

algorithm

that

obtains

an

approximation

ratio

of

Find

tours

Tp

and

Ts

as

before

Break

Tp

and

Ts

into

paths

containing

k

vertices

each

View

each

segment

of

Tp

and

Ts

as

a

super-node

and

construct

the

auxiliary

bipartite

graph

as

before

Find

a

minimum-weight

perfect

matching

M

in

this

auxiliary

graph

Mark

the

segments

of

Tp

sequentially

as

around

the

cycle

Each

edge

in

M

matches

a

segment

in

Tp

to

a

segment

in

Ts

Let

the

segment

matched

to

Bi

i

be

called

Ri

and

let

Mi

be

the

edge

of

M

connecting

Bi

and

Mi

Pegs

Slots

Edge

in

M

Clockwise

Tour

Anticlockwise

Tour

Figure

Two

tours

in

Tp

The

delivery

schedule

is

as

follows

Assume

that

the

vehicle

starts

at

the

beginning

of

segment

with

k

pegs

and

proceeds

along

Tp

picking

the

pegs

in

its

path

For

i

when

it

reaches

the

vertex

in

Bi

incident

to

the

matched

edge

-LRB-

Mi

-RRB-

in

M

it

travels

across

this

edge

and

delivers

to

Ri

the

pegs

that

were

collected

from

Bi

-LRB-

when

i

we

deliver

the

pegs

we

started

with

-RRB-

After

delivering

the

pegs

it

retraces

back

on

Mi

and

continues

along

Tp

Finally

when

the

vehicle

returns

to

the

starting

location

it

is

carrying

k

pegs

Lemma

guarantees

that

there

exists

a

valid

starting

point

on

this

traversal

such

that

the

vehicle

never

run

out

of

pegs

or

exceeds

its

carrying

capacity

The

algorithm

above

generates

a

valid

vehicle

routing

without

violating

the

capacity

constraints

of

the

vehicle

due

to

the

following

reason

When

it

is

on

a

segment

of

Bi

that

precedes

Mi

on

Tp

it

is

carrying

k

pegs

from

Bi

and

the

other

pegs

that

have

been

collected

from

Bi

Since

Bi

has

at

most

k

pegs

the

total

number

of

pegs

that

it

is

carrying

does

not

exceed

k.

On

reaching

Mi

the

vehicle

goes

to

Ri

and

delivers

the

k

pegs

that

were

collected

from

Bi

Therefore

when

it

returns

to

Bi

and

resumes

its

journey

it

reaches

the

end

of

Bi

with

k

pegs

that

were

on

Bi

The

reason

that

the

algorithm

gives

a

better

approximation

ratio

is

as

follows

Observe

that

the

algorithm

goes

around

Tp

only

once

-LRB-

except

for

segment

-RRB-

instead

of

twice

This

decreases

the

length

traveled

But

the

cost

of

M

is

now

more

since

there

are

twice

as

many

segments

as

before

in

each

of

Ts

and

Tp

-LRB-

because

the

segments

have

only

k

vertices

each

-RRB-

Extending

the

analysis

from

the

previous

algorithm

we

get

M

The

vehicle

traverses

Tp

once

Ts

twice

and

M

twice

We

get

the

following

result

the

distance

traveled

by

the

vehicle

in

the

scheme

devised

by

the

above

algorithm

is

at

most

Tp

Ck

Therefore

the

approximation

ratio

is

at

most

An

improved

preemptive

algorithm

In

this

section

we

consider

the

vehicle

routing

problem

when

the

vehicle

is

allowed

to

drop

some

pegs

at

intermediate

points

in

the

route

and

pick

them

up

later

for

delivery

We

show

that

the

previous

algorithm

can

be

modified

into

a

preemptive

algorithm

with

an

approximation

ratio

of

a

little

over

In

the

previous

algorithm

instead

of

delivering

the

pegs

directly

to

the

slots

in

Ri

when

we

cross

Mi

we

do

the

following

the

vehicle

crosses

Mi

and

leaves

k

pegs

there

to

be

delivered

to

the

slots

later

Once

the

tour

along

the

peg

cycle

is

completed

the

vehicle

switches

to

the

slot

tour

and

delivers

the

pegs

but

this

time

picking

them

up

at

intermediate

points

on

the

Ts

as

it

reaches

them

In

all

the

vehicle

travels

around

each

of

the

cycles

Tp

and

Ts

once

each

twice

around

M

and

once

extra

on

the

segments

and

By

selecting

and

appropriately

over

all

possible

segments

our

algorithm

obtains

a

tour

with

a

ratio

of

k

n

ss

Acknowledgment

We

are

grateful

to

Greg

Frederickson

for

useful

discussions

We

thank

Shoshana

Anily

and

Julien

Bramel

for

making

their

paper

available

to

us

We

also

thank

Rafi

Hassin

for

useful

comments

on

an

earlier

draft

of

this

paper

References

-LSB-

-RSB-

S.

Anily

and

J.

Bramel

Approximation

algorithms

for

the

capacitated

traveling

salesman

problem

with

pick-ups

and

deliveries

Manuscript

-LRB-

-RRB-

-LSB-

-RSB-

S.

Anily

and

R.

Hassin

The

swapping

problem

Networks

-LRB-

-RRB-

-LSB-

-RSB-

E.

Arkin

R.

Hassin

and

L.

Klein

Restricted

delivery

problems

on

a

network

Networks

-LRB-

-RRB-

-LSB-

-RSB-

S.

Arora

Polynomial

time

approximation

schemes

for

Euclidean

TSP

and

other

Geometric

problems

Proc

of

Annual

Symp

on

Foundations

of

Comp

Sci

-LRB-

-RRB-

Pages

-LSB-

-RSB-

S.

Arora

Nearly

linear

time

approximation

schemes

for

Euclidean

TSP

and

other

Geometric

problems

Proc

of

Annual

Symp

on

Foundations

of

Comp

Sci

-LRB-

-RRB-

Pages

-LSB-

-RSB-

T.

Asano

N.

Katoh

H.

Tamaki

and

T.

Tokuyama

Covering

points

in

the

plane

by

k-tours

towards

a

polynomial

time

approximation

scheme

for

general

k

Proc

of

Annual

ACM

Symp

on

Theory

of

Computing

-LRB-

STOC

-RRB-

-LRB-

-RRB-

Pages

-LSB-

-RSB-

M.

J.

Atallah

and

S.

R.

Kosaraju

Efficient

solutions

to

some

transportation

problems

with

applications

to

minimizing

robot

arm

travel

SIAM

J.

Comput.

-LRB-

-RRB-

-LRB-

-RRB-

-LSB-

-RSB-

J.

A.

Bondy

and

U.

S.

R.

Murty

Graph

Theory

with

Applications

American

Elsevier

New

York

-LRB-

-RRB-

-LSB-

-RSB-

D.

O.

Casco

B.

L.

Golden

and

E.

A.

Wasil

Vehicle

routing

with

backhauls

models

algorithms

and

case

studies

Vehicle

Routing

Methods

and

Studies

Eds

Golden

and

Assad

North

Holland

Amsterdam

-LRB-

-RRB-

-LSB-

-RSB-

P.

Chalasani

R.

Motwani

and

A.

Rao

Algorithms

for

robot

grasp

and

delivery

International

Workshop

on

Algorithmic

Foundations

of

Robotics

-LRB-

-RRB-

-LSB-

-RSB-

N.

Christofides

Vehicle

routing

in

The

traveling

salesman

problem

edited

by

E.

L.

Lawler

J.

K.

Lenstra

A.

H.

G.

Rinnooy

Kan

and

D.

B.

Shmoys

John

Wiley

Sons

New

York

Pages

-LRB-

-RRB-

-LSB-

-RSB-

G.

N.

Frederickson

A

note

on

the

complexity

of

a

simple

transportation

problem

SIAM

J.

Comput.

-LRB-

-RRB-

-LRB-

-RRB-

-LSB-

-RSB-

G.

N.

Frederickson

and

D.

J.

Guan

Non-preemptive

ensemble

motion

planning

on

a

tree

Journal

of

Algorithms

-LRB-

-RRB-

-LRB-

-RRB-

-LSB-

-RSB-

G.

N.

Frederickson

and

D.

J.

Guan

Preemptive

ensemble

motion

planning

on

a

tree

SIAM

J.

Comput.

-LRB-

-RRB-

-LRB-

-RRB-

-LSB-

-RSB-

G.

N.

Frederickson

M.

S.

Hecht

and

C.

E.

Kim

Approximation

algorithms

for

some

routing

problems

SIAM

J.

Comput.

-LRB-

-RRB-

-LRB-

-RRB-

-LSB-

-RSB-

M.

R.

Garey

and

D.

S.

Johnson

Computers

and

intractability

A

guide

to

the

theory

of

NP-completeness

Freeman

San

Francisco

-LRB-

-RRB-

-LSB-

-RSB-

M.

Haimovich

and

A.

H.

G.

Rinnooy

Kan

Bounds

and

heuristics

for

capacitated

routing

problems

Math

Oper

Res

-LRB-

-RRB-

-LSB-

-RSB-

R.

M.

Karp

Two

combinatorial

problems

associated

with

external

sorting

Combinatorial

Algorithms

Courant

Comp

Sci

Symp.

Pages

Algorithmics

Press

New

York

-LRB-

-RRB-

-LSB-

-RSB-

D.

E.

Knuth

The

art

of

computer

programming

vol

Sorting

and

Searching

Addison

Wesley

-LRB-

-RRB-

-LSB-

-RSB-

J.

Mitchell

Guillotine

subdivisions

approximate

polygonal

subdivisions

Part

II

-LCB-

A

simple

polynomial-time

approximation

scheme

for

geometric

k-MST

TSP

and

related

problems

Manuscript

-LRB-

-RRB-

approximation algorithms
graphs
traveling salesman problem
vehicle routing